Search the Community
Showing results for tags 'splitbutton'.
-
Hi, I've created a custom tool for use in a Windows PE enviroment. Because of the number of buttons in use in de UI, I've planned on using the splitbutton in de UI. When I test the script under Windows, the button works perfectly, but when the button is tested under Windows PE, de button appears correctly (with dropdown arrow), but no dropdown menu is showing when the button is pressed. Is there a special requirement for this dropdown menu, that is not available under Windows PE? It's a Windows PE 3.1 (Win Vista/7) enviroment, so I think it should work. Code for the button: $doPC = _GUICtrlButton_Create($main, "Computer -> ", 255, 285, 90, 25, $BS_SPLITBUTTON) ;==> Create knop ;==> Code from Autoit site Func WM_NOTIFY($hWnd, $Msg, $wParam, $lParam) #forceref $hWnd, $Msg, $wParam Local Const $BCN_HOTITEMCHANGE = -1249 Local $tNMBHOTITEM = DllStructCreate("hwnd hWndFrom;int IDFrom;int Code;dword dwFlags", $lParam) Local $nNotifyCode = DllStructGetData($tNMBHOTITEM, "Code") Local $nID = DllStructGetData($tNMBHOTITEM, "IDFrom") Local $hCtrl = DllStructGetData($tNMBHOTITEM, "hWndFrom") Local $dwFlags = DllStructGetData($tNMBHOTITEM, "dwFlags") Local $sText = "" Switch $nNotifyCode Case $BCN_DROPDOWN _Popup_Menu($hCtrl) Case $BN_PUSHED _Popup_Menu($hCtrl) EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==> WM_NOTIFY Func _Popup_Menu($hCtrl) Local $hMenu Local Enum $idReboot = 1000, $idShutdown, $idInfo $hMenu = _GUICtrlMenu_CreatePopup() _GUICtrlMenu_InsertMenuItem($hMenu, 0, "Herstarten", $idReboot) _GUICtrlMenu_InsertMenuItem($hMenu, 1, "Afsluiten", $idShutdown) Switch _GUICtrlMenu_TrackPopupMenu($hMenu, $hCtrl, -1, -1, 1, 1, 2) Case $idReboot ;~ Shutdown(6) Exit Case $idShutdown ;~ Shutdown(13) Exit EndSwitch _GUICtrlMenu_DestroyMenu($hMenu) EndFunc ;==> _Popup_Menu
-
- WinPE
- splitbutton
-
(and 1 more)
Tagged with: