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

Windows specific forum
HanPBF
Enthusiast
Enthusiast
Posts: 570
Joined: Fri Feb 19, 2010 3:42 am

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

Post 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!
User avatar
Thunder93
Addict
Addict
Posts: 1788
Joined: Tue Mar 21, 2006 12:31 am
Location: Canada

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

Post 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
ʽʽSuccess is almost totally dependent upon drive and persistence. The extra energy required to make another effort or try another approach is the secret of winning.ʾʾ --Dennis Waitley
HanPBF
Enthusiast
Enthusiast
Posts: 570
Joined: Fri Feb 19, 2010 3:42 am

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

Post 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!!!
Post Reply