issues reading lParam

Hello all, im trying to read the message WM_SHOWWINDOW to know when my parent
window is being restored after being minimized.
But it appears that i cant read the lParam the right way ( or that i did not understood why and when that message is sent ?)

should it works this way :

case WM_SHOWWINDOW:
if(lParam == SW_PARENTOPENING)
{
do something there.
}
return 0;

?

thanks
Try this to see what you get:
1
2
3
4
5
6
7
    case WM_SHOWWINDOW:
    {
      char buffer[256] = {0};
      sprintf(buffer, "WM_SHOWWINDOW - lParam = %d", lParam);
      ::MessageBoxA(0, buffer, "Info", MB_OK);
    }
    return 0;


You need to include <stdio.h>
WM_SHOWWINDOW - lParam = 0, at the lauch of the program.
(i had to use sprintf_s, visualstudio saying me sprintf was unsafe ?)

not sure what you expected ?
WM_SHOWWINDOW - lParam = 0, at the lauch of the program.

Well this normal, does it mean the message box was only shown once?

How is the second created?
Could you maybe post the code?
only once, yes.

well.. the code is pretty big. what do you want to see ?
1
2
3
4
5
6
7
8
	case WM_SIZE:
		if (wParam == SIZE_MINIMIZED)
			FUK = 1;
		if (wParam == SIZE_RESTORED && FUK == 1)
		{
			InvalidateRect(hWnd, NULL, TRUE);
			FUK = 0;
		}

this, is working. should i be ashamed and keep searching ? ^^
should i be ashamed and keep searching ? ^^

Why be ashamed? To err is human. :-)

what do you want to see ?

The code where you create the windows.
Topic archived. No new replies allowed.