Click here to Skip to main content
15,911,789 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: When is CWnd valid? Pin
led mike4-Sep-07 11:54
led mike4-Sep-07 11:54 
QuestionWindows message order? Pin
charlieg4-Sep-07 3:26
charlieg4-Sep-07 3:26 
AnswerRe: Windows message order? Pin
Hamed Musavi4-Sep-07 5:50
Hamed Musavi4-Sep-07 5:50 
GeneralRe: Windows message order? Pin
charlieg4-Sep-07 5:56
charlieg4-Sep-07 5:56 
GeneralRe: Windows message order? Pin
Hamed Musavi4-Sep-07 6:32
Hamed Musavi4-Sep-07 6:32 
AnswerRe: Windows message order? Pin
Mark Salsbery4-Sep-07 6:15
Mark Salsbery4-Sep-07 6:15 
GeneralRe: Windows message order? Pin
charlieg4-Sep-07 6:33
charlieg4-Sep-07 6:33 
GeneralRe: Windows message order? Pin
Mark Salsbery4-Sep-07 6:49
Mark Salsbery4-Sep-07 6:49 
charlieg wrote:
how then does one determine when a windows object is fully instantiated?


If you create a window yourself, then the returned HWND from the create API
is (obviously) valid.

*Sorry, I hit the Post message button LOL*

From the window proc's point of view, the effective lifetime of the window is from
WM_CREATE/WM_INITDIALOG to WM_NCDESTROY.

As far as documentation, you can kind of follow it from CreateWindow...

CreateWindow()
"Before returning, CreateWindow sends a WM_CREATE message to the window procedure."

WM_CREATE
"The window procedure of the new window receives this message after the window is created,
but before the window becomes visible.
"

WM_DESTROY
"It is sent to the window procedure of the window being destroyed after the window is removed
from the screen.
"
"During the processing of the message, it can be assumed that all child windows still exist."

WM_NCDESTROY
"The WM_NCDESTROY message is sent after the child windows have been destroyed. In contrast,
WM_DESTROY
is sent before the child windows are destroyed.
"

Mark



Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

QuestionAbout IHTML Interface ... need your help Pin
Ryu Jin4-Sep-07 3:21
Ryu Jin4-Sep-07 3:21 
QuestionHelp - clistctrl drag image only showing icon, no text Pin
Derrick Becker4-Sep-07 3:14
Derrick Becker4-Sep-07 3:14 
QuestionRe: Help - clistctrl drag image only showing icon, no text Pin
Derrick Becker4-Sep-07 5:17
Derrick Becker4-Sep-07 5:17 
QuestionPlease Help :( [modified] Pin
Programm3r4-Sep-07 2:11
Programm3r4-Sep-07 2:11 
QuestionVC++ AND MS ACCESS connection Pin
himuskanhere4-Sep-07 2:08
himuskanhere4-Sep-07 2:08 
AnswerRe: VC++ AND MS ACCESS connection Pin
chandu0044-Sep-07 2:30
chandu0044-Sep-07 2:30 
AnswerRe: VC++ AND MS ACCESS connection Pin
Hamid_RT4-Sep-07 3:38
Hamid_RT4-Sep-07 3:38 
QuestionHow to terminate a thread? Pin
kcynic4-Sep-07 0:52
kcynic4-Sep-07 0:52 
AnswerRe: How to terminate a thread? Pin
Roger Stoltz4-Sep-07 1:02
Roger Stoltz4-Sep-07 1:02 
GeneralRe: How to terminate a thread? Pin
kcynic4-Sep-07 1:15
kcynic4-Sep-07 1:15 
GeneralRe: How to terminate a thread? Pin
Cedric Moonen4-Sep-07 1:25
Cedric Moonen4-Sep-07 1:25 
GeneralRe: How to terminate a thread? Pin
Roger Stoltz4-Sep-07 1:51
Roger Stoltz4-Sep-07 1:51 
AnswerRe: How to terminate a thread? Pin
aks.4-Sep-07 1:52
aks.4-Sep-07 1:52 
GeneralRe: How to terminate a thread? Pin
kcynic4-Sep-07 1:57
kcynic4-Sep-07 1:57 
GeneralRe: How to terminate a thread? Pin
Stephen Hewitt4-Sep-07 14:03
Stephen Hewitt4-Sep-07 14:03 
QuestionReadFile Pin
Waldermort4-Sep-07 0:32
Waldermort4-Sep-07 0:32 
AnswerRe: ReadFile Pin
Naveen4-Sep-07 1:44
Naveen4-Sep-07 1:44 

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.