MrCreatoR Posted October 12, 2007 Share Posted October 12, 2007 (edited) Hi all,Is there a method to disable displaying the content of window while i am draging resizing it?And i mean onle for my App, not for all (from the «Display Options»).I guesing that this will involve some API-Calls, but where to start?I know that there is one nice command to make dragable gui by any place:DllCall("user32.dll","long","SendMessage","hwnd",$HWnd,"int",$WM_SYSCOMMAND,"int",0xF009,"int",0)But what is the message (if there is any at all) to resize and display only the edges of the window (using GuiRegistrMsg with WM_SIZING)?Thanks. Edited October 12, 2007 by MsCreatoR Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
BrettF Posted October 12, 2007 Share Posted October 12, 2007 $GUI_EVENT_MAXIMIZE, $GUI_EVENT_RESIZED Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
MrCreatoR Posted October 12, 2007 Author Share Posted October 12, 2007 $GUI_EVENT_MAXIMIZE, $GUI_EVENT_RESIZEDPlease, read my post first Thanks for replying. Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
BrettF Posted October 12, 2007 Share Posted October 12, 2007 Ahhh... I see. You meant while you were resizing... Shows you how much I can read Sorry for not giving you an answer Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Siao Posted October 12, 2007 Share Posted October 12, 2007 I guesing that this will involve some API-Calls, but where to start?M$ has an example - http://support.microsoft.com/kb/121541 "be smart, drink your wine" Link to comment Share on other sites More sharing options...
MrCreatoR Posted October 12, 2007 Author Share Posted October 12, 2007 M$ has an example - http://support.microsoft.com/kb/121541Oh, if i could understand C/C++ functions/syntax, then propably i was a really happy man But thanks anyway, it's a start... Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
BrettF Posted October 12, 2007 Share Posted October 12, 2007 I worked it out! W00t! I'm proud of myself #include <GUIConstants.au3> Global Const $WM_ENTERSIZEMOVE = 0x231 Opt("GUICoordMode", 2) Opt("GUIResizeMode", 1) Opt("GUIOnEventMode", 1) GUICreate("GUI", 200, 400, -1, -1, $WS_SIZEBOX) GUIRegisterMsg ($WM_ENTERSIZEMOVE, "_Resize") ;GUISetOnEvent($WM_ENTERSIZEMOVE, "_Resize") GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit") GUISetState(@SW_SHOW) While 1 Sleep(10) WEnd Func _Resize() ToolTip("Resizing Started", 0, 0) EndFunc ;==>_Resize Func _Exit() Exit EndFunc ;==>_Exit Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
martin Posted October 12, 2007 Share Posted October 12, 2007 I worked it out! W00t! I'm proud of myself #include <GUIConstants.au3> Global Const $WM_ENTERSIZEMOVE = 0x231 Opt("GUICoordMode", 2) Opt("GUIResizeMode", 1) Opt("GUIOnEventMode", 1) GUICreate("GUI", 200, 400, -1, -1, $WS_SIZEBOX) GUIRegisterMsg ($WM_ENTERSIZEMOVE, "_Resize") ;GUISetOnEvent($WM_ENTERSIZEMOVE, "_Resize") GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit") GUISetState(@SW_SHOW) While 1 Sleep(10) WEnd Func _Resize() ToolTip("Resizing Started", 0, 0) EndFunc ;==>_Resize Func _Exit() Exit EndFunc ;==>_Exit Adding to that a bit, the code below hides the contents of the window while it's being resized. (Hope I understood what was wanted.) expandcollapse popup#include <GUIConstants.au3> Global Const $WM_ENTERSIZEMOVE = 0x231,$WM_EXITSIZEMOVE = 0x232 Global $child = 0 Opt("GUICoordMode", 2) Opt("GUIResizeMode", 1) Opt("GUIOnEventMode", 1) $parent = GUICreate("GUI", 200, 400, -1, -1, $WS_SIZEBOX) GUIRegisterMsg ($WM_ENTERSIZEMOVE, "_Resize") GUIRegisterMsg ($WM_EXITSIZEMOVE, "_Downsize") GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit") GUICtrlCreateButton("a button",50,100,100,21) GUIRegisterMsg($WM_PAINT,"_Newsize") GUISetState(@SW_SHOW) While 1 Sleep(10) WEnd Func _Resize() $wp = WinGetPos($parent) $cp = WinGetClientSize($parent) $border = ($wp[2] - $cp[0])/2 $TitleHt = $wp[3] - $cp[1] - $border If $child = 0 Then $child = GUICreate("",$cp[0],$cp[1],$wp[0] + $border,$wp[1] + $TitleHt,$WS_POPUP,$WS_EX_TOPMOST) GUISetState(@SW_SHOW,$child) ToolTip("Resizing Started", 0, 0) Else WinMove($child,'',$wp[0] + $border,$wp[1] + $TitleHt,$cp[0],$cp[1]) EndIf EndFunc ;==>_Resize Func _Downsize() ToolTip("") GUIDelete($child) $child = 0 EndFunc Func _Newsize() If $child = 0 Then Return $GUI_RUNDEFMSG $wp = WinGetPos($parent) $cp = WinGetClientSize($parent) $border = ($wp[2] - $cp[0])/2 $TitleHt = $wp[3] - $cp[1] - $border WinMove($child,'',$wp[0] + $border,$wp[1] + $TitleHt,$cp[0],$cp[1]) EndFunc Func _Exit() Exit EndFunc ;==>_Exit Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
BrettF Posted October 12, 2007 Share Posted October 12, 2007 Thanks martin. I figured OP could do it, because he is a very smart guy Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
martin Posted October 13, 2007 Share Posted October 13, 2007 Thanks martin. I figured OP could do it, because he is a very smart guy Yes you're right, I just couldn't resist having a go. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
BrettF Posted October 13, 2007 Share Posted October 13, 2007 Some fun for the time being... MMmmmm... Never really played with the wm messages before. Was a good learning curve Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
MrCreatoR Posted October 13, 2007 Author Share Posted October 13, 2007 Thanks guys, but i need something like this: expandcollapse popup#include <GUIConstants.au3> Global Const $WM_ENTERSIZEMOVE = 0x231 Opt("GUIOnEventMode", 1) $parent = GUICreate("GUI", 200, 400, -1, -1, $WS_SIZEBOX) GUIRegisterMsg($WM_ENTERSIZEMOVE, "WM_ENTERSIZEMOVE") GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit") $Button = GUICtrlCreateButton("Button",50,100,100,21) GUISetState(@SW_SHOW) While 1 Sleep(10) WEnd Func WM_ENTERSIZEMOVE() GUISetState(@SW_LOCK) EndFunc ;==>_Resize Func _Exit() Exit EndFunc ;==>_ExitoÝ÷ Ù*-ç(ק¶íì"Ú0Â)e[yج¦V²yÖî·bêÞ²,â§yçm«mçë(§v.Â)emïîv+)¬u³Òý¶æj»böÁMf(¹Æ§'^¶¢{k¢[0)^ë"Î)à)¶¬jëh×6#include <GUIConstants.au3> #include <Constants.au3> Global Const $WM_ENTERSIZEMOVE = 0x231, $WM_EXITSIZEMOVE = 0x232 Opt("GUICoordMode", 2) Opt("GUIOnEventMode", 1) $parent = GUICreate("GUI", 200, 400, -1, -1, $WS_SIZEBOX) GUIRegisterMsg($WM_ENTERSIZEMOVE, "WM_ENTERSIZEMOVE") GUIRegisterMsg($WM_EXITSIZEMOVE, "WM_EXITSIZEMOVE") GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit") $Button = GUICtrlCreateButton("Button",50,100,100,21) GUISetState(@SW_SHOW) While 1 Sleep(10) WEnd Func WM_ENTERSIZEMOVE() For $i = 3 To $Button GUICtrlSetState($i, $GUI_HIDE) Next EndFunc ;==>_Resize Func WM_EXITSIZEMOVE() For $i = 3 To $Button GUICtrlSetState($i, $GUI_SHOW) Next EndFunc Func _Exit() Exit EndFunc ;==>_Exit Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
MrCreatoR Posted October 13, 2007 Author Share Posted October 13, 2007 I found solution(?) here, but i can't get it work... Why not set the redraw flag on the dialog and all of its children to FALSE (SendMessage(hwnd, WM_SETREDRAW, TRUE or FALSE, 0)); I am trying like this: #include <GUIConstants.au3> #include <Misc.au3> Opt("GUIOnEventMode", 1) Global Const $WM_ENTERSIZEMOVE = 0x231 Global Const $WM_EXITSIZEMOVE = 0x232 Global Const $WM_SETREDRAW = 0x000B $parent = GUICreate("GUI", 200, 400, -1, -1, $WS_SIZEBOX) GUIRegisterMsg($WM_ENTERSIZEMOVE, "WM_ENTERSIZEMOVE") GUIRegisterMsg($WM_EXITSIZEMOVE, "WM_EXITSIZEMOVE") GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit") $Button = GUICtrlCreateButton("Button",50,100,100,21) GUISetState(@SW_SHOW) While 1 Sleep(10) WEnd Func WM_ENTERSIZEMOVE() _SendMessage($parent, $WM_SETREDRAW, False, 0) EndFunc Func WM_EXITSIZEMOVE() _SendMessage($parent, $WM_SETREDRAW, True, 0) EndFunc Func _Exit() Exit EndFunc ;==>_Exit But the window is freezing while i am resizing it ... Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
BrettF Posted October 13, 2007 Share Posted October 13, 2007 From Microsoft Website:An application sends the WM_SETREDRAW message to a window to allow changes in that window to be redrawn or to prevent changes in that window from being redrawn.Well if you can't redraw the window, then it will freeze? I think maybe you need to have another solution... So let me get this straight, you want to hide the window contents when resizing? Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
MrCreatoR Posted October 14, 2007 Author Share Posted October 14, 2007 you want to hide the window contents when resizing?No, i need that the window will not resized until i release the mose... but, while resizing i want to display the edges of the window... Just run this example, and then resize the GUI window, you will see that the edges are drawned, but the content not displayed... #include <GUIConstants.au3> $OldParam = ToggleDragFullWindows(0) GUICreate("Test", 400, 200, -1, -1, $WS_OVERLAPPEDWINDOW) GUICtrlCreateLabel("Now try to resize the window ;)", 70, 70, 300, 40) GUICtrlSetFont(-1, 14, 800) GUISetState() While GUIGetMsg() <> -3 WEnd ToggleDragFullWindows($OldParam) Func ToggleDragFullWindows($SetParam=-1) Local $OldParam = RegRead("HKEY_CURRENT_USER\Control Panel\Desktop", "DragFullWindows") If $SetParam = -1 Then $SetParam = 0 If $OldParam <> 1 Then $SetParam = 1 EndIf RegWrite("HKEY_CURRENT_USER\Control Panel\Desktop", "DragFullWindows", "REG_SZ", $SetParam) DllCall("user32.dll", "int", "SystemParametersInfo", "int", 0x0025, "int", $SetParam, "int", 0, "int", 0) Return $OldParam EndFunc I need the same, but when "Show window contents while resizing/draging" is enabled (from performance options). BTW: The function ToggleDragFullWindows() i wrote specialy to show this example (i just do not know better way to explain what i need ). Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
Siao Posted October 14, 2007 Share Posted October 14, 2007 (edited) WM_SETREDRAW doesn't do anything you hadn't achieved before with GUISetState(@SW_LOCK).You still have to draw the outline rectangle by yourself - catch WM_WINDOWPOSCHANGING or WM_SIZING+WM_MOVING to get current coordinates during the drag, and draw some look-alike on screen with LineTo() or Rectangle().Or you can do like this to toggle that system mode during your drag:expandcollapse popup#include <GUIConstants.au3> #include <Misc.au3> Opt("GUIOnEventMode", 1) ;~ Global Const $WM_ENTERSIZEMOVE = 0x231 Global Const $WM_EXITSIZEMOVE = 0x232 ;~ Global Const $WM_SETREDRAW = 0x000B Const $WM_SYSCOMMAND = 0x0112 Const $SC_MOVE = 0xF010 Const $SC_SIZE = 0xF000 Global $OldParam $parent = GUICreate("GUI", 200, 400, -1, -1, $WS_SIZEBOX) ;~ GUIRegisterMsg($WM_ENTERSIZEMOVE, "WM_ENTERSIZEMOVE") GUIRegisterMsg($WM_EXITSIZEMOVE, "WM_EXITSIZEMOVE") GUIRegisterMsg($WM_SYSCOMMAND, "On_WM_SYSCOMMAND") GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit") $Button = GUICtrlCreateButton("Button",50,100,100,21) GUISetState(@SW_SHOW) While 1 Sleep(100) WEnd Func On_WM_SYSCOMMAND($hWnd, $Msg, $wParam, $lParam) Switch BitAND($wParam, 0xFFF0) Case $SC_MOVE, $SC_SIZE ;Const $SPI_SETDRAGFULLWINDOWS = 37 ;Const $SPI_GETDRAGFULLWINDOWS = 38 ;Const SPIF_SENDWININICHANGE = 2 $tBool = DllStructCreate("int") DllCall("user32.dll", "int", "SystemParametersInfo", "int", 38, "int", 0, "ptr", DllStructGetPtr($tBool), "int", 0) $OldParam = DllStructGetData($tBool, 1) DllCall("user32.dll", "int", "SystemParametersInfo", "int", 37, "int", 0, "ptr", 0, "int", 2) EndSwitch EndFunc Func WM_EXITSIZEMOVE() DllCall("user32.dll", "int", "SystemParametersInfo", "int", 37, "int", $OldParam, "ptr", 0, "int", 2) EndFunc Func _Exit() Exit EndFunc ;==>_Exit Edited October 14, 2007 by Siao "be smart, drink your wine" Link to comment Share on other sites More sharing options...
MrCreatoR Posted October 14, 2007 Author Share Posted October 14, 2007 SiaoOr you can do like this to toggle that system mode during your dragGineus! Thanks again for you help, thats what i needed!!! Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now