Click here to Skip to main content
15,913,722 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalsorry David Crow Pin
kriaz29-Aug-04 23:41
kriaz29-Aug-04 23:41 
GeneralRe: sorry David Crow Pin
David Crow30-Aug-04 3:08
David Crow30-Aug-04 3:08 
GeneralDisable a editbox Pin
Larsson29-Aug-04 22:59
Larsson29-Aug-04 22:59 
GeneralRe: Disable a editbox Pin
Anonymous29-Aug-04 23:11
Anonymous29-Aug-04 23:11 
GeneralRe: Disable a editbox Pin
Larsson29-Aug-04 23:23
Larsson29-Aug-04 23:23 
GeneralRe: Disable a editbox Pin
Maximilien30-Aug-04 1:02
Maximilien30-Aug-04 1:02 
GeneralRe: Disable a editbox Pin
Larsson30-Aug-04 1:15
Larsson30-Aug-04 1:15 
GeneralRe: Disable a editbox Pin
David Crow30-Aug-04 3:24
David Crow30-Aug-04 3:24 
Larsson wrote:
CEdit *EditDis; // Dialog2
EditDis->m_Company.EnableWindow(FALSE); // m_Company is EDIT1


This code makes no sense. If EditDis is an edit control, there is no (logical) way that m_Company can also be an edit control.

Based on the little bit of information you've provided, here's my take:

void Dialog2::SomeFunction( void )
{
    Dialog1 dlg(this); // instead of using the 'this' pointer, you could
                       // pass a pointer to the edit control that Dialog1
                       // needs to operate on.  that would be a 'cleaner'
                       // solution.
    dlg.DoModal();
}
 
class Dialog1 : public CDialog
{
    Dialog1(Dialog2 *pDialog2, CWnd *pParent );
    Dialog2 *m_pDialog2;
};
 
Dialog1::Dialog1(Dialog2 *pDialog2, CWnd *pParent )
{
    m_pDialog2 = pDialog2;
}
 
void Dialog1::SomeFunction( void )
{
    m_pDialog2->m_Company.EnableWindow(FALSE);
}



"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen


GeneralTemplate classes and dllimport Pin
WilliamD29-Aug-04 22:18
WilliamD29-Aug-04 22:18 
GeneralRe: Template classes and dllimport Pin
Joaquín M López Muñoz30-Aug-04 0:05
Joaquín M López Muñoz30-Aug-04 0:05 
GeneralRe: Template classes and dllimport Pin
WilliamD30-Aug-04 1:34
WilliamD30-Aug-04 1:34 
GeneralRe: Template classes and dllimport Pin
Joaquín M López Muñoz30-Aug-04 2:27
Joaquín M López Muñoz30-Aug-04 2:27 
GeneralMaximizing the Frame Window Pin
kdehairy29-Aug-04 22:03
kdehairy29-Aug-04 22:03 
GeneralModifying contents of a .txt-file using MFC Pin
anderslundsgard29-Aug-04 21:52
anderslundsgard29-Aug-04 21:52 
GeneralRe: Modifying contents of a .txt-file using MFC Pin
David Crow30-Aug-04 3:33
David Crow30-Aug-04 3:33 
GeneralRe: Modifying contents of a .txt-file using MFC Pin
anderslundsgard30-Aug-04 3:40
anderslundsgard30-Aug-04 3:40 
QuestionChecking whether application is unning or not?? Pin
aparajita29-Aug-04 21:30
aparajita29-Aug-04 21:30 
AnswerRe: Checking whether application is unning or not?? Pin
Anonymous29-Aug-04 21:57
Anonymous29-Aug-04 21:57 
AnswerRe: Checking whether application is unning or not?? Pin
David Crow30-Aug-04 3:34
David Crow30-Aug-04 3:34 
QuestionHow to write a Generic DLL ?? Pin
zahid_ash29-Aug-04 21:28
zahid_ash29-Aug-04 21:28 
AnswerRe: How to write a Generic DLL ?? Pin
Alexander M.,30-Aug-04 4:33
Alexander M.,30-Aug-04 4:33 
QuestionHow BBS ansi code to html? Pin
HungtaoHsu29-Aug-04 21:07
HungtaoHsu29-Aug-04 21:07 
QuestionHow can check the path of a a folder? Pin
zahid_ash29-Aug-04 21:01
zahid_ash29-Aug-04 21:01 
AnswerRe: How can check the path of a a folder? Pin
David Crow30-Aug-04 3:36
David Crow30-Aug-04 3:36 
GeneralCrashing when you call DoModal Pin
nnvidya29-Aug-04 20:50
nnvidya29-Aug-04 20:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.