Click here to Skip to main content
15,889,096 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: MFC code to move a train in two directions Pin
Patrice T14-Dec-16 12:45
mvePatrice T14-Dec-16 12:45 
AnswerRe: MFC code to move a train in two directions Pin
Munchies_Matt30-Dec-16 7:35
Munchies_Matt30-Dec-16 7:35 
QuestionTiny Encryption Algorithm Pin
Rhonnn12-Dec-16 20:42
Rhonnn12-Dec-16 20:42 
AnswerRe: Tiny Encryption Algorithm Pin
Jochen Arndt12-Dec-16 20:55
professionalJochen Arndt12-Dec-16 20:55 
AnswerRe: Tiny Encryption Algorithm Pin
Patrice T14-Dec-16 12:39
mvePatrice T14-Dec-16 12:39 
QuestionKnow when a child popup dialog is opened Pin
_Flaviu11-Dec-16 23:06
_Flaviu11-Dec-16 23:06 
SuggestionRe: Know when a child popup dialog is opened Pin
Richard MacCutchan11-Dec-16 23:18
mveRichard MacCutchan11-Dec-16 23:18 
AnswerRe: Know when a child popup dialog is opened Pin
Jochen Arndt11-Dec-16 23:56
professionalJochen Arndt11-Dec-16 23:56 
See the hwndParent parameter at FindWindowEx function (Windows)[^]:
Quote:
If hwndParent is NULL, the function uses the desktop window as the parent window. The function searches among windows that are child windows of the desktop.
You did not show us the full Create call but if you have passed CDialogBar or any other window of your application as parent you must also pass it to FindWindowEx (using this for the CDialogBar here):
CWnd* pWnd = FindWindowEx(this->GetSafeHwnd(), NULL, _T("Dialog"), NULL);


But you should think about using a member variable. The only thing to do then is clearing the pointer when the dialog is closed. Otherwise you have to check for existance also in your SomeButton function to avoid creating multiple instances of your dialog.
GeneralRe: Know when a child popup dialog is opened Pin
_Flaviu12-Dec-16 1:38
_Flaviu12-Dec-16 1:38 
GeneralRe: Know when a child popup dialog is opened Pin
Jochen Arndt12-Dec-16 2:06
professionalJochen Arndt12-Dec-16 2:06 
GeneralRe: Know when a child popup dialog is opened Pin
_Flaviu13-Dec-16 0:08
_Flaviu13-Dec-16 0:08 
GeneralRe: Know when a child popup dialog is opened Pin
Jochen Arndt13-Dec-16 0:25
professionalJochen Arndt13-Dec-16 0:25 
QuestionRe: Know when a child popup dialog is opened Pin
David Crow12-Dec-16 3:15
David Crow12-Dec-16 3:15 
AnswerRe: Know when a child popup dialog is opened Pin
_Flaviu12-Dec-16 5:24
_Flaviu12-Dec-16 5:24 
GeneralRe: Know when a child popup dialog is opened Pin
Victor Nijegorodov12-Dec-16 7:46
Victor Nijegorodov12-Dec-16 7:46 
GeneralRe: Know when a child popup dialog is opened Pin
_Flaviu12-Dec-16 23:48
_Flaviu12-Dec-16 23:48 
AnswerRe: Know when a child popup dialog is opened Pin
leon de boer13-Dec-16 16:47
leon de boer13-Dec-16 16:47 
GeneralRe: Know when a child popup dialog is opened Pin
_Flaviu15-Dec-16 23:24
_Flaviu15-Dec-16 23:24 
QuestionProper declaration of array with volatile values inside it? Pin
arnold_w7-Dec-16 3:30
arnold_w7-Dec-16 3:30 
AnswerRe: Proper declaration of array with volatile values inside it? Pin
Jochen Arndt7-Dec-16 4:22
professionalJochen Arndt7-Dec-16 4:22 
AnswerRe: Proper declaration of array with volatile values inside it? Pin
leon de boer7-Dec-16 6:39
leon de boer7-Dec-16 6:39 
QuestionTree Ctrl Object Selection Pin
raajpatel4-Dec-16 20:57
raajpatel4-Dec-16 20:57 
GeneralRe: Tree Ctrl Object Selection Pin
Richard MacCutchan4-Dec-16 21:16
mveRichard MacCutchan4-Dec-16 21:16 
GeneralRe: Tree Ctrl Object Selection Pin
raajpatel5-Dec-16 1:20
raajpatel5-Dec-16 1:20 
GeneralRe: Tree Ctrl Object Selection Pin
Peter_in_27805-Dec-16 1:36
professionalPeter_in_27805-Dec-16 1:36 

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.