Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualTispe

Posted 30 October 2013 - 08:43 AM

Ok, SWP_NOSENDCHANGING works, but it is not a cure! It only prevents WM_WINDOWPOSCHANGING from being sent from SetWindowPos(), it does not prevent WM_WINDOWPOSCHANGING from being sent at another time by the OS.

 

You see, I can SetWindowPos() with this flag and get a 1920x1080 client area window. But as soon as I want to drag that window around on the desktop the OS sends another WM_WINDOWPOSCHANGING message messing it up again.

 

I have to capture the message in the winproc function and prevent it from doing anything.

LRESULT CALLBACK WindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
	switch(message){
	case WM_WINDOWPOSCHANGING:
		return 0;		       //We stop the message here! 
		break;
.
.
.
.
.
.
}

#1Tispe

Posted 30 October 2013 - 08:42 AM

Ok, I SWP_NOSENDCHANGING works, but it is not a cure! It only prevents WM_WINDOWPOSCHANGING from being sent from SetWindowPos(), it does not prevent WM_WINDOWPOSCHANGING from being sent at another time by the OS.

 

You see, I can SetWindowPos() with this flag and get a 1920x1080 client area window. But as soon as I want to drag that window around on the desktop the OS sends another WM_WINDOWPOSCHANGING message messing it up again.

 

I have to capture the message in the winproc function and prevent it from doing anything.

LRESULT CALLBACK WindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
	switch(message){
	case WM_WINDOWPOSCHANGING:
		return 0;		       //We stop the message here! 
		break;
.
.
.
.
.
.
}

PARTNERS