PureRESIZE requests
Posted: Fri Sep 02, 2005 12:19 pm
previous thread : viewtopic.php?t=13349&start=15
1 - new command
Here is some infos to help you
1 - new command
2 - new flag for monitoringPureRESIZE_HideWindowResizing(WindowNumber.l, flag.l)
- #TRUE
- #FALSE
PureRESIZE_SetWindowMonitoring( WindowNumber, #PureRESIZE_Monitoring_DontResizeIfMinimized )
Here is some infos to help you
Code: Select all
;Get state of Full-Drawing mode
Global CurrentDrawMode
Global DrawLocked
SystemParametersInfo_( #SPI_GETDRAGFULLWINDOWS, 0, @CurrentDrawMode, 0) ;-> CurrentDrawMode=1
#WM_CAPTURECHANGED=$215
Procedure CB(Window, Message, wParam, lParam)
Result = #PB_ProcessPureBasicEvents
If Window=WindowID(0)
Select Message
Case #WM_NCLBUTTONDOWN
If DrawLocked=0
;disable full-drawing mode
SystemParametersInfo_( #SPI_SETDRAGFULLWINDOWS, 0, 0, #SPIF_SENDWININICHANGE)
Debug "disable"
DrawLocked=1
EndIf
Case #WM_CAPTURECHANGED
If DrawLocked And lParam<>Window
;restore full-drawing mode
SystemParametersInfo_( #SPI_SETDRAGFULLWINDOWS, CurrentDrawMode, 0, #SPIF_SENDWININICHANGE )
Debug "enable"
DrawLocked=0
EndIf
EndSelect
EndIf
ProcedureReturn Result
EndProcedure
If OpenWindow(0,100,100,200,200,#PB_Window_SystemMenu|#PB_Window_SizeGadget,"No Drawing") And CreateGadgetList(WindowID(0))
OpenWindow(1,400,100,200,200,#PB_Window_SystemMenu|#PB_Window_SizeGadget,"Full Drawing") And CreateGadgetList(WindowID(0))
SetWindowCallback(@CB())
Repeat : Until WaitWindowEvent()=#PB_Event_CloseWindow
EndIf
Code: Select all
; CallBack
Procedure MyCallback(Window,Message,wParam,lParam)
Result = #PB_ProcessPureBasicEvents
If (GetWindowLong_(Window,#GWL_STYLE) & #WS_MINIMIZE) = 0
Result = PureRESIZE_CallBack(Window, Message, wParam, lParam, Result)
EndIf
ProcedureReturn Result
EndProcedure