Page 1 of 1

PB5.30; Win7; 32bit; event handling on sizing window;

Posted: Thu May 21, 2015 1:31 pm
by HanPBF
Hello!

I did put a BindEvent for the resizing of an app window like this

Code: Select all

BindEvent(#PB_Event_SizeWindow, @onSizeMainWindow(), *W\PB)
BindEvent(#PB_Event_MaximizeWindow, @onSizeMainWindow(), *W\PB)
BindEvent(#PB_Event_MoveWindow, @onSizeMainWindow(), *W\PB)
BindEvent(#PB_Event_RestoreWindow, @onSizeMainWindow(), *W\PB)
What seems not to be handled in Windows 7 is an event for double-clicking on top or bottom border of the window.
Those double clicks upsize the window height to screen height.

How can this event be recognized?
Possible without windows subclassing?
Can this double click be prevented for the user?

Thanks a lot in advance!

Re: PB5.30; Win7; 32bit; event handling on sizing window;

Posted: Thu May 21, 2015 1:58 pm
by Thunder93
With Windows 7 64bit here.

Double-clicking on top or bottom Window border causes event to trigger.

Code: Select all

Procedure SizeWindowHandler()
  Debug "Size event on window #" + EventWindow()
EndProcedure


OpenWindow(0, 100, 100, 200, 200, "Resize test", #PB_Window_SizeGadget | #PB_Window_SystemMenu)

BindEvent(#PB_Event_SizeWindow, @SizeWindowHandler())

Repeat
  Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow

Re: PB5.30; Win7; 32bit; event handling on sizing window;

Posted: Thu May 21, 2015 7:01 pm
by HanPBF
Thanks for the checking.

It may be a duplicated post from me; had a post with a canvasgadget "stealing" the events.

Maybe this is the same.

Will check it further tomorrow and clarify it then.

Thanks a lot for Your time spent on this!!!