Click here to Skip to main content
16,010,392 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralWM_DRAWITEM & CFrameWnd Pin
AJ1231-Oct-01 6:25
AJ1231-Oct-01 6:25 
GeneralRe: WM_DRAWITEM & CFrameWnd Pin
Tomasz Sowinski1-Oct-01 7:24
Tomasz Sowinski1-Oct-01 7:24 
GeneralAdding Menus to Dialog Boxes Pin
1-Oct-01 6:21
suss1-Oct-01 6:21 
GeneralRe: Adding Menus to Dialog Boxes Pin
JerzyPeter1-Oct-01 6:46
JerzyPeter1-Oct-01 6:46 
GeneralFancy text in ListCtrl cell Pin
john john mackey1-Oct-01 6:11
john john mackey1-Oct-01 6:11 
GeneralRe: Fancy text in ListCtrl cell Pin
Tomasz Sowinski1-Oct-01 7:22
Tomasz Sowinski1-Oct-01 7:22 
GeneralWindow's message queue Pin
1-Oct-01 6:01
suss1-Oct-01 6:01 
GeneralRe: Window's message queue Pin
Tim Deveaux1-Oct-01 6:52
Tim Deveaux1-Oct-01 6:52 
Each thread that creates a window is allotted its own message queue, and must include a message pump like the one you've litsed in order to process messages for that thread.

Think thread, not application. Here's a snip from the "Multiple Threads in the User Interface" article in the MSDN:

Changes to the Message Loop

"Applications with multiple threads must include a message loop in each thread that creates a window. The message loop and window procedure for a window must be processed by the thread that created the window. If the message loop does not reside in the same thread that created the window, the DispatchMessage function will not get messages for the window. As a result, the window will appear but won't show activation and won't repaint, be moved, receive mouse messages, or generally work as you expect it to."

later... as usual...
Hmmm - maybe this is more helpful - from the PSDK docs on windowing and messages:

"The system maintains a single system message queue and one thread-specific message queue for each GUI thread. To avoid the overhead of creating a message queue for non-GUI threads, all threads are created initially without a message queue. The system creates a thread-specific message queue only when the thread makes its first call to one of the Win32 User or GDI functions."
GeneralRe: Window's message queue Pin
1-Oct-01 15:51
suss1-Oct-01 15:51 
GeneralImporting a TLB Problem Pin
Joseph Dempsey1-Oct-01 5:59
Joseph Dempsey1-Oct-01 5:59 
GeneralProblem with CTreeCtrl in Windows98 Pin
Yolanda1-Oct-01 5:33
Yolanda1-Oct-01 5:33 
GeneralOutput Window Pin
1-Oct-01 5:32
suss1-Oct-01 5:32 
GeneralRe: Output Window Pin
Mike Nordell1-Oct-01 10:07
Mike Nordell1-Oct-01 10:07 
QuestionWhy do I get an asserion error? Pin
1-Oct-01 3:49
suss1-Oct-01 3:49 
AnswerRe: Why do I get an asserion error? Pin
Carlos Antollini1-Oct-01 4:08
Carlos Antollini1-Oct-01 4:08 
GeneralRe: Why do I get an asserion error? Pin
1-Oct-01 4:17
suss1-Oct-01 4:17 
GeneralRe: Why do I get an asserion error? Pin
Chris Meech1-Oct-01 4:42
Chris Meech1-Oct-01 4:42 
GeneralBasic Statistics Pin
Paul Selormey1-Oct-01 3:48
Paul Selormey1-Oct-01 3:48 
GeneralRe: Basic Statistics Pin
Mukkie1-Oct-01 5:50
Mukkie1-Oct-01 5:50 
GeneralRe: Basic Statistics Pin
Paul Selormey2-Oct-01 14:02
Paul Selormey2-Oct-01 14:02 
QuestionUse Dll that created in VC++ in Delphi ? Pin
1-Oct-01 3:14
suss1-Oct-01 3:14 
AnswerRe: Use Dll that created in VC++ in Delphi ? Pin
Michael P Butler1-Oct-01 3:22
Michael P Butler1-Oct-01 3:22 
GeneralConnection Point Hell, now with added MFC... Pin
Christian Graus1-Oct-01 3:03
protectorChristian Graus1-Oct-01 3:03 
GeneralRe: Connection Point Hell, now with added MFC... Pin
NormDroid1-Oct-01 3:18
professionalNormDroid1-Oct-01 3:18 
GeneralRe: Connection Point Hell, now with added MFC... Pin
Christian Graus1-Oct-01 3:26
protectorChristian Graus1-Oct-01 3:26 

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.