Click here to Skip to main content
15,914,111 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Clarification Pin
Ravi Bhavnani13-Mar-05 13:12
professionalRavi Bhavnani13-Mar-05 13:12 
GeneralRe: Clarification Pin
Ravi Bhavnani24-Mar-05 4:14
professionalRavi Bhavnani24-Mar-05 4:14 
GeneralRe: Clarification Pin
Ravi Bhavnani13-Mar-05 12:57
professionalRavi Bhavnani13-Mar-05 12:57 
QuestionNetwork problem? Pin
dSolariuM13-Mar-05 10:11
dSolariuM13-Mar-05 10:11 
AnswerRe: Network problem? Pin
Ravi Bhavnani13-Mar-05 10:24
professionalRavi Bhavnani13-Mar-05 10:24 
GeneralComunications with Dialogs Pin
HackPrince13-Mar-05 6:08
HackPrince13-Mar-05 6:08 
GeneralRe: Comunications with Dialogs Pin
John R. Shaw13-Mar-05 6:25
John R. Shaw13-Mar-05 6:25 
GeneralRe: Comunications with Dialogs Pin
Ravi Bhavnani13-Mar-05 7:58
professionalRavi Bhavnani13-Mar-05 7:58 
This is easily done by passing a pointer to DialogOne to DialogTwo, thereby allowing DialogTwo to manipulate controls in DialogOne.

That being said, it's poor programming practice to simply modify controls in another dialog at whim. It's better (imho) that DialogOne expose well defined public methods to manipulate its controls. For example, if you want to repopulate DialogOne's list control (m_someListCtrl) member from DialogTwo, expose a method in DialogOne like this:
//! Repopulates the list control.
void repopulateListCtrl()
When DialogTwo wants DialogOne to reload its list control, it makes the following call:
DialogOne* m_pDialogOne = ptr to a DialogOne instance;
ASSERT (m_pDialogOne != NULL);
ASSERT (m_pDialogOne->GetSafeHwnd() != NULL);
ASSERT (::IsWindow (m_pDialogOne->GetSafeHwnd());
m_pDialogOne->repopulateListCtrl();
The implementation of DialogOne::repopulateListCtrl() method should PostMessage() a command to itself which causes the dialog's list control to be populated. This allows dialog specific UI actions to be properly serviced by each dialog's message queue.

/ravi

My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com

GeneralFind the files in a folder Pin
Cedric Moonen13-Mar-05 6:00
Cedric Moonen13-Mar-05 6:00 
GeneralRe: Find the files in a folder Pin
Steve Mayfield13-Mar-05 6:03
Steve Mayfield13-Mar-05 6:03 
GeneralRe: Find the files in a folder Pin
Cedric Moonen13-Mar-05 6:08
Cedric Moonen13-Mar-05 6:08 
GeneralRe: Find the files in a folder Pin
John R. Shaw13-Mar-05 6:31
John R. Shaw13-Mar-05 6:31 
QuestionHow to get Rect value ????? HELP !!!! Pin
13-Mar-05 5:39
suss13-Mar-05 5:39 
AnswerRe: How to get Rect value ????? HELP !!!! Pin
Mohsen Saad13-Mar-05 6:18
Mohsen Saad13-Mar-05 6:18 
GeneralRe: How to get Rect value ????? HELP !!!! Pin
Member 143833713-Mar-05 6:58
Member 143833713-Mar-05 6:58 
GeneralRe: How to get Rect value ????? HELP !!!! Pin
JohnCz18-Mar-05 10:53
JohnCz18-Mar-05 10:53 
AnswerRe: How to get Rect value ????? HELP !!!! Pin
Member 143833713-Mar-05 11:22
Member 143833713-Mar-05 11:22 
AnswerRe: How to get Rect value ????? HELP !!!! Pin
Maximilien13-Mar-05 13:11
Maximilien13-Mar-05 13:11 
QuestionHow can I detect a CODEC was installed? And detect its version. Pin
Behzad Ebrahimi13-Mar-05 5:00
Behzad Ebrahimi13-Mar-05 5:00 
General[Q]: Number of overloaded functions... Pin
rbid13-Mar-05 4:40
rbid13-Mar-05 4:40 
GeneralRe: [Q]: Number of overloaded functions... Pin
David Crow14-Mar-05 3:30
David Crow14-Mar-05 3:30 
GeneralGNU diff.exe this code ins't working :( Pin
YaronNir13-Mar-05 4:05
YaronNir13-Mar-05 4:05 
GeneralRe: GNU diff.exe this code ins't working :( Pin
Gary R. Wheeler13-Mar-05 4:22
Gary R. Wheeler13-Mar-05 4:22 
GeneralRe: GNU diff.exe this code ins't working :( Pin
YaronNir13-Mar-05 4:29
YaronNir13-Mar-05 4:29 
GeneralRe: GNU diff.exe this code ins't working :( Pin
Gary R. Wheeler13-Mar-05 5:11
Gary R. Wheeler13-Mar-05 5:11 

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.