Search the Community
Showing results for tags '_winapi_createwindowex'.
-
#include <GUIConstants.au3> #include <WinAPI.au3> ; for _WinAPI_CreateWindowEx() Opt("MustDeclareVars", 1) ; example from "https://www.autoitscript.com/forum/topic/178961-resize-control/?do=findComment&comment=1336645" Global Const $SBS_SIZEBOX = 0x08 Global Const $SBS_SIZEGRIP = 0x10 Global $hGui, $hSizebox Example() Func Example() Local $iW = 250, $iH = 50 $hGui = GUICreate("Resize corner", $iW, $iH, -1, -1, $WS_OVERLAPPEDWINDOW) GUISetBkColor(0x00FF) Local $idResizeLabel = GUICtrlCreateLabel("", $iW - 20, $iH - 20, 22, 22) GUICtrlSetResizing(-1, $GUI_DOCKRIGHT + $GUI_DOCKBOTTOM + $GUI_DOCKWIDTH + $GUI_DOCKHEIGHT) GUICtrlSetCursor(-1, 12) $hSizebox = _WinAPI_CreateWindowEx(0, "Scrollbar", "", $WS_CHILD + $WS_VISIBLE + $SBS_SIZEBOX, $iW - 20, $iH - 20, 20, 20, $hGui) ; $SBS_SIZEBOX or $SBS_SIZEGRIP GUIRegisterMsg($WM_SIZE, "WM_SIZE") GUISetState() Local $iResize = 0 While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $GUI_EVENT_PRIMARYUP If $iResize Then $iResize = 0 ; restore the default mouse behaviour GUISetCursor(2, 0, $hGui) GUICtrlSetState($idResizeLabel, $GUI_SHOW) EndIf Case $idResizeLabel $iResize = 1 GUICtrlSetState($idResizeLabel, $GUI_HIDE) GUISetCursor(12, 1, $hGui) MouseDown("MAIN") ; ..now that the Ctrl is hidden, nothing is held down, so we fake it ;) EndSwitch WEnd GUIDelete($hGui) Exit EndFunc ;==>Example Func WM_SIZE($hWnd, $iMsg, $wParam, $lParam) Local $aSize = WinGetClientSize($hGui) WinMove($hSizebox, "", $aSize[0] - 20, $aSize[1] - 20) EndFunc ;==>WM_SIZE The question is: how do I color that CreateWindowEx ? Thanks
- 9 replies
-
- sbs_sizebox
- sbs_sizegrip
-
(and 3 more)
Tagged with:
-
Hi all this is an Photoshop edited image but i want to create a window like that it should have an extra button for specific tasks. Can anyone give me a clue to create a GUI like that