Home > Back-end >  Add MessageBox WM_SIZE, why will perform in the WM_PAINT content, to implement MessageBox back then,
Add MessageBox WM_SIZE, why will perform in the WM_PAINT content, to implement MessageBox back then,

Time:09-29


ShowWindow - & gt; WM_SIZE
In the WM_SIZE execution to "MessageBox (HWND, TEXT (" the system sends the WM_SIZE message"), TEXT (" CREATE "), MB_OK);" , jump to the WM_PAINT and return after the WM_PAINT carry out the "MessageBox (HWND, TEXT (" the system sends the WM_SIZE message"), TEXT (" CREATE "), MB_OK);"

Why not performed WM_SIZE in to perform the WM_PAINT, which statement in the WM_SIZE sends a WM_PAINT message?
MLGB this problem bothering me for several days, just contact API, so tired,

CodePudding user response:

Debugging, as far as possible do not use the means of the output message box, you pop up in a WM_SIZE message processing MessageBox dialog, shown in the form before the form was blocked out, so will cause weight painted window, of course there's going to be a WM_PAINT message,

You change the MessageBox to use OutputDebugString output to see, sure wood problem,

CodePudding user response:

reference 1st floor ccrun response:
debugging, as far as possible do not use the means of the output message box, you pop up in a WM_SIZE message processing MessageBox dialog, shown in the form before the form was blocked out, so will cause weight painted window, of course there's going to be a WM_PAINT message,

You change the MessageBox to use OutputDebugString output to see, sure wood problem,

But haven't pop-up MessageBox (haven't keep out), how the WM_PAINT message is sent? If a MessageBox hides send the WM_PAINT message window, then the WM_PAINT message should be infinite loop?

CodePudding user response:

How do you trigger the WM_SIZE message?

CodePudding user response:

The
reference 3 floor ccrun response:
how to trigger the WM_SIZE message are you?

ShowWindow
  • Related