Click here to Skip to main content
15,888,816 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Dialog box margins Pin
mo149221-Feb-19 10:02
mo149221-Feb-19 10:02 
GeneralRe: Dialog box margins Pin
leon de boer22-Feb-19 6:05
leon de boer22-Feb-19 6:05 
GeneralRe: Dialog box margins Pin
mo149222-Feb-19 10:01
mo149222-Feb-19 10:01 
AnswerRe: Dialog box margins Pin
Maximilien22-Feb-19 4:23
Maximilien22-Feb-19 4:23 
GeneralRe: Dialog box margins Pin
leon de boer22-Feb-19 5:39
leon de boer22-Feb-19 5:39 
GeneralRe: Dialog box margins Pin
Maximilien23-Feb-19 1:49
Maximilien23-Feb-19 1:49 
GeneralRe: Dialog box margins Pin
leon de boer23-Feb-19 4:30
leon de boer23-Feb-19 4:30 
AnswerRe: Dialog box margins Pin
leon de boer22-Feb-19 5:37
leon de boer22-Feb-19 5:37 
In standard Win32 API the dialog will be passed a WM_INITDIALOG message after it is created but before it is displayed.
WM_INITDIALOG message - Windows applications | Microsoft Docs[^]

You can simply do a call to GetClientRect to get the parent area and change the dialog that is what the message is for. You can also use CreateDialogIndirectParam, CreateDialogParam, DialogBoxIndirectParam, or DialogBoxParam and pass
a pointer to the area or anything else you may want to do at runtime.

If you have not got access to the dialogs parent window handle you can get it by using the dialog handle with
GetParent function | Microsoft Docs[^]
The dialog has been created and all functions on the handle work it just has not been made visible at that point.

You can also move and resize your child windows by handle or ID, they have all been created but nothing is visible at that point. You can also manually add child windows if you so desire at that point.

The WM_PAINT message to draw the dialog will be straight after that message and if it's a modal dialog it will then enter modal mode.

I am not sure how MFC encapsulates the WM_INITDIALOG probably ONINITDIALOG or something like that.
In vino veritas


modified 22-Feb-19 12:18pm.

GeneralRe: Dialog box margins Pin
Alexander Kindel22-Feb-19 9:04
Alexander Kindel22-Feb-19 9:04 
GeneralRe: Dialog box margins Pin
leon de boer22-Feb-19 10:00
leon de boer22-Feb-19 10:00 
SuggestionRe: Dialog box margins Pin
David Crow24-Feb-19 16:23
David Crow24-Feb-19 16:23 
QuestionTraceability of Dynamic Memory Allocation Faults Pin
HS_C_Student16-Feb-19 22:24
HS_C_Student16-Feb-19 22:24 
AnswerRe: Traceability of Dynamic Memory Allocation Faults Pin
leon de boer17-Feb-19 20:53
leon de boer17-Feb-19 20:53 
AnswerRe: Traceability of Dynamic Memory Allocation Faults Pin
Stefan_Lang18-Feb-19 0:15
Stefan_Lang18-Feb-19 0:15 
AnswerRe: Traceability of Dynamic Memory Allocation Faults Pin
jschell23-Feb-19 10:41
jschell23-Feb-19 10:41 
QuestionCeratingNameePipe Server Application Using C++ Classes Pin
Member 1271142615-Feb-19 0:23
Member 1271142615-Feb-19 0:23 
AnswerRe: CeratingNameePipe Server Application Using C++ Classes Pin
Victor Nijegorodov15-Feb-19 1:03
Victor Nijegorodov15-Feb-19 1:03 
GeneralRe: CeratingNameePipe Server Application Using C++ Classes Pin
Member 1271142615-Feb-19 4:53
Member 1271142615-Feb-19 4:53 
GeneralRe: CeratingNameePipe Server Application Using C++ Classes Pin
Richard Andrew x6415-Feb-19 13:48
professionalRichard Andrew x6415-Feb-19 13:48 
GeneralRe: CeratingNameePipe Server Application Using C++ Classes Pin
Victor Nijegorodov15-Feb-19 13:53
Victor Nijegorodov15-Feb-19 13:53 
GeneralRe: CeratingNameePipe Server Application Using C++ Classes Pin
Richard Andrew x6415-Feb-19 14:11
professionalRichard Andrew x6415-Feb-19 14:11 
GeneralRe: CeratingNameePipe Server Application Using C++ Classes Pin
Victor Nijegorodov15-Feb-19 14:18
Victor Nijegorodov15-Feb-19 14:18 
AnswerRe: CeratingNameePipe Server Application Using C++ Classes Pin
Richard MacCutchan15-Feb-19 3:18
mveRichard MacCutchan15-Feb-19 3:18 
GeneralRe: CeratingNameePipe Server Application Using C++ Classes Pin
Member 1271142615-Feb-19 4:55
Member 1271142615-Feb-19 4:55 
QuestionWants guidance. Pin
Member 1415146014-Feb-19 23:46
Member 1415146014-Feb-19 23:46 

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.