Click here to Skip to main content
15,900,907 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: What is the difference among the OnClose(),OnDestroy() and the DestroyWindow()? Pin
Michael Dunn28-Sep-08 12:34
sitebuilderMichael Dunn28-Sep-08 12:34 
Questionreading text file Pin
nomi khan27-Sep-08 12:55
nomi khan27-Sep-08 12:55 
AnswerRe: reading text file Pin
David Crow27-Sep-08 16:40
David Crow27-Sep-08 16:40 
AnswerRe: reading text file Pin
Hamid_RT29-Sep-08 7:31
Hamid_RT29-Sep-08 7:31 
QuestionMessage Queues for MFC windows classes Pin
sawerr27-Sep-08 7:51
sawerr27-Sep-08 7:51 
AnswerRe: Message Queues for MFC windows classes Pin
Mark Salsbery27-Sep-08 8:24
Mark Salsbery27-Sep-08 8:24 
GeneralRe: Message Queues for MFC windows classes Pin
sawerr27-Sep-08 9:58
sawerr27-Sep-08 9:58 
GeneralRe: Message Queues for MFC windows classes Pin
Mark Salsbery27-Sep-08 10:08
Mark Salsbery27-Sep-08 10:08 
sawerr wrote:
Here we create a "control". That control has a message loop in its source code which was written by controls developer.


No, it doesn't. It has a window procedure implemented by the control developer.
You are still responsible for providing a message loop.

You're confusing message loops with window procedures.

Window procs are related to the window class. MFC subclasses windows so
the MFC framework gets first peek at messages before forwarding unhandled
(i.e. no message map entry) messages to the original window proc.


sawerr wrote:
If view window has a message loop, is that mean it is created by a new thread?


That doesn't make sense. Windows don't have message loops.
Threads can implement a message loop. Windows have window procedures,
which are functions called by the system to send a window a message.


Study the link I gave you on windowing. It's the fundamentals
of Windows programming, and in my opinion, essential to know and
understand completely to be an effective Windows programmer.

If you need more drawn-out documentation on how it all works, then I
recommend the book "Windows Programming" by Charles Petzold.

Mark

Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

GeneralRe: Message Queues for MFC windows classes Pin
sawerr27-Sep-08 10:46
sawerr27-Sep-08 10:46 
Questionan always-wrong password Pin
Joseph Marzbani27-Sep-08 4:50
Joseph Marzbani27-Sep-08 4:50 
AnswerRe: an always-wrong password Pin
Paul Conrad27-Sep-08 7:18
professionalPaul Conrad27-Sep-08 7:18 
AnswerRe: an always-wrong password Pin
Iain Clarke, Warrior Programmer27-Sep-08 11:23
Iain Clarke, Warrior Programmer27-Sep-08 11:23 
QuestionHow to decode a wav file Pin
ice87111727-Sep-08 4:04
ice87111727-Sep-08 4:04 
JokeRe: How to decode a wav file Pin
followait27-Sep-08 4:11
followait27-Sep-08 4:11 
GeneralRe: How to decode a wav file Pin
Joseph Marzbani27-Sep-08 4:54
Joseph Marzbani27-Sep-08 4:54 
QuestionRe: How to decode a wav file [modified] Pin
CPallini27-Sep-08 6:04
mveCPallini27-Sep-08 6:04 
AnswerRe: How to decode a wav file Pin
Hamid_RT29-Sep-08 7:28
Hamid_RT29-Sep-08 7:28 
AnswerRe: How to decode a wav file Pin
Hamid_RT29-Sep-08 7:27
Hamid_RT29-Sep-08 7:27 
QuestionPrint all the running Applications using C++, win APIs. Pin
Subrat 470826627-Sep-08 1:16
Subrat 470826627-Sep-08 1:16 
AnswerRe: Print all the running Applications using C++, win APIs. Pin
CPallini27-Sep-08 1:21
mveCPallini27-Sep-08 1:21 
GeneralRe: Print all the running Applications using C++, win APIs. Pin
Subrat 470826627-Sep-08 2:46
Subrat 470826627-Sep-08 2:46 
GeneralRe: Print all the running Applications using C++, win APIs. Pin
CPallini27-Sep-08 3:28
mveCPallini27-Sep-08 3:28 
GeneralRe: Print all the running Applications using C++, win APIs. Pin
Subrat 470826627-Sep-08 3:51
Subrat 470826627-Sep-08 3:51 
AnswerRe: Print all the running Applications using C++, win APIs. Pin
Mark Salsbery27-Sep-08 8:45
Mark Salsbery27-Sep-08 8:45 
GeneralRe: Print all the running Applications using C++, win APIs. Pin
Subrat 470826629-Sep-08 1:24
Subrat 470826629-Sep-08 1:24 

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.