IonicWind Software

IWBasic => GUI Central => Topic started by: LarryMc on October 28, 2010, 03:20:40 PM

Title: @IDSIZE / @IDSIZING
Post by: LarryMc on October 28, 2010, 03:20:40 PM
I need to execute some code when a window has been resized.
I know @IDSIZE / @IDSIZING will tell me when a window has been resized or is in the process of being resized.

I need to execute the code after the resizing has been completed and not while it is being resized.
That means I don't want to use @IDSIZING.

MS says @IDSIZE (WM_SIZE) is sent after the window is resized.

The reality is that the @IDSIZE  message is sent multiple times while the window is being resized(dragging a corner)

Does anyone have a slick way of implementing a delay timer to have the code execute after the resizing is indeed over?

LarryMc
Title: Re: @IDSIZE / @IDSIZING
Post by: sapero on October 28, 2010, 03:32:15 PM
Larry, catch WM_EXITSIZEMOVE message. I use it successfully to redraw the right egde of my owner-drawn listbox.
QuoteThe WM_EXITSIZEMOVE message is sent one time to a window, after it has exited the moving or sizing modal loop. The window enters the moving or sizing modal loop when the user clicks the window's title bar or sizing border, or when the window passes the WM_SYSCOMMAND message to the DefWindowProc function and the wParam parameter of the message specifies the SC_MOVE or SC_SIZE value.
Title: Re: @IDSIZE / @IDSIZING
Post by: LarryMc on October 28, 2010, 03:47:07 PM
Extract of my code:

case WM_SYSCOMMAND
   if (@wParam & 0xfff0)=SC_CLOSE then return 1
   if (@wParam & 0xfff0)=SC_MOVE then return 1
   if (@wParam & 0xfff0)=SC_MAXIMIZE then return 1
   if (@wParam & 0xfff0)=SC_MINIMIZE then return 1

case WM_SIZE
   print "wmsize"

case WM_EXITSIZEMOVE 
   print "it works"


I'm using the case WM_SYSCOMMAND  to keep the window from being closed,moved, or resized using the max/min buttons.

when I drag the lower right corner of the window I get multiple "wmsize" printed.

I NEVER get an "it works" printed out.

LarryMc
Title: Re: @IDSIZE / @IDSIZING
Post by: sapero on October 28, 2010, 04:30:10 PM
Then try with the first message - WM_NCLBUTTONUP, posted when the user releases the left mouse button while the cursor is within the nonclient area of a window. If a window has captured the mouse, this message is not posted.
wParam Specifies the hit-test value HTBORDER, HTCAPTION, HTRIGHT...