Valuater Posted September 26, 2006 Share Posted September 26, 2006 in the script below, the main window has a picture... the child window does not show, however if you comment out the pic .... the child window will show #include <GUIConstants.au3> $XSkinGui = GUICreate( "My GUI", 400, 450) ; comment out this line and the child window will show GUICtrlCreatePic(@SystemDir & "\setup.bmp", 0,0, 400, 450) GUICtrlSetState( -1, $GUI_DISABLE) GUISetState() $XClose = XSkinCloseButton($XSkinGui,1) While 1 $msg = GUIGetMsg() If $msg = $XClose Then Exit Sleep(10) WEnd Func XSkinCloseButton($XS_hWin,$XS_cH = 1) If $XS_hWin = "" Then Return Local $XS_Choice, $XS_win, $XS_Pos = 20, $XSPos $XSPos = WinGetPos($XS_hWin) $XS_Choice = StringSplit("215,324,221,217,112", ",") If $XS_cH > $XS_Choice[0] Then Return $XS_winA = GUICreate("", $XS_Pos, $XS_Pos, $XSPos[2] - $XS_Pos * 3, $XS_Pos * 3, $WS_CHILD, $WS_EX_TOPMOST , $XS_hWin) $XS_winB = GUICtrlCreateButton("", 0, 0, $XS_Pos, $XS_Pos, $BS_ICON, $WS_EX_TOPMOST ) GUICtrlSetImage (-1, "shell32.dll", $XS_Choice[$XS_cH]) GUISetState() Return $XS_winB EndFunc is this a bug,,, or normal thx 8) Link to comment Share on other sites More sharing options...
GaryFrost Posted September 26, 2006 Share Posted September 26, 2006 (edited) I tried adding in $WS_POPUP didn't work, this is the only way I've been able to get all to show. expandcollapse popup#include <GUIConstants.au3> $XSkinGui = GUICreate("My GUI", 400, 450) $BUTTON = GUICtrlCreateButton('TEST', 10, 10, 90, 20) GUISetState() $XClose = XSkinCloseButton($XSkinGui, 1) GUISwitch($XSkinGui) GUICtrlCreatePic(@SystemDir & "\setup.bmp", 0, 0, 400, 450) ; comment out this line and the child window will show ;~ GUICtrlSetState( -1, $GUI_DISABLE) While 1 $msg = GUIGetMsg() Select Case $msg = $XClose Or $msg = -3 Exit Case $msg = $BUTTON ConsoleWrite("BUTTON TEST" & @LF) EndSelect WEnd Func XSkinCloseButton($XS_hWin, $XS_cH = 1) If $XS_hWin = "" Then Return Local $XS_Choice, $XS_win, $XS_Pos = 20, $XSPos $XSPos = WinGetPos($XS_hWin) $XS_Choice = StringSplit("215,324,221,217,112", ",") If $XS_cH > $XS_Choice[0] Then Return $XS_winA = GUICreate("", $XS_Pos, $XS_Pos, $XSPos[2] - $XS_Pos * 3, $XS_Pos * 3, $WS_CHILD, $WS_EX_TOPMOST, $XS_hWin) $XS_winB = GUICtrlCreateButton("", 0, 0, $XS_Pos, $XS_Pos, $BS_ICON, $WS_EX_TOPMOST) GUICtrlSetImage(-1, "shell32.dll", $XS_Choice[$XS_cH]) GUISetState() Return $XS_winB EndFunc ;==>XSkinCloseButton Edited September 26, 2006 by gafrost SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Valuater Posted September 26, 2006 Author Share Posted September 26, 2006 add $WS_POPUP to your functions GUICreate() LAr. I seen your other post too expandcollapse popup#include <GUIConstants.au3> #include <WindowsConstants.au3> $win1 = GUICreate("test",400,400,-1,-1,BitOR($WS_SIZEBOX,$WS_POPUP)) GUICtrlCreateLabel("",0,0,400,24) GUICtrlSetBkColor(-1,0x0000FF) GUISetState() $XClose = XSkinCloseButton($win1,1) Sleep(3000) ;Exit $XSkinGui = GUICreate( "My GUI", 400, 450, -1,-1,BitOR($WS_SIZEBOX,$WS_POPUP)) ; comment out this line and the child window will show GUICtrlCreatePic(@SystemDir & "\setup.bmp", 0,0, 400, 450) GUICtrlSetState( -1, $GUI_DISABLE) GUISetState() $XClose = XSkinCloseButton($XSkinGui,1) While 1 $msg = GUIGetMsg() If $msg = $XClose Then Exit Sleep(10) WEnd Func XSkinCloseButton($XS_hWin,$XS_cH = 1) If $XS_hWin = "" Then Return Local $XS_Choice, $XS_win, $XS_Pos = 20, $XSPos $XSPos = WinGetPos($XS_hWin) $XS_Choice = StringSplit("215,324,221,217,112", ",") If $XS_cH > $XS_Choice[0] Then Return $XS_winA = GUICreate("", $XS_Pos, $XS_Pos, $XSPos[2] - $XS_Pos,10, $WS_CHILD, $WS_EX_TOPMOST , $XS_hWin) $XS_winB = GUICtrlCreateButton("", 0, 0, $XS_Pos, $XS_Pos, $BS_ICON, $WS_EX_TOPMOST ) GUICtrlSetImage (-1, "shell32.dll", $XS_Choice[$XS_cH]) GUISetState() Return $XS_winB EndFunc I tried every way i could think of... for the child with and without BitOr( child, popup ) and main with and withoutBitOr( sizebox, popup ) ???? 8) Link to comment Share on other sites More sharing options...
Valuater Posted September 26, 2006 Author Share Posted September 26, 2006 Wow... that seems strange... but it works... 8) Thanks Gary 8) Link to comment Share on other sites More sharing options...
Valuater Posted September 26, 2006 Author Share Posted September 26, 2006 (edited) thats because its not using the "Child" environment with $WS_POPUP the coord are correct and Gary's way wont work for my skins because they are already created 8) Edited September 26, 2006 by Valuater Link to comment Share on other sites More sharing options...
Valuater Posted September 26, 2006 Author Share Posted September 26, 2006 (edited) thanks Larry... I do appreciate your time ( and code ) 8) Edited September 26, 2006 by Valuater 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