Jump to content

R_P

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by R_P

  1. What was the original font file format in the example? *.TTF ? use a font ... see the third example from the author here
  2. works this #include <GuiStatusBar.au3> #include <GUIConstants.au3> #include <WinAPISysWin.au3> $hGUI = GUICreate("test click statusbar", 500, 200) $g_hStatus = _GUICtrlStatusBar_Create($hGUI) Dim $aParts[3] = [75, 150, -1] _GUICtrlStatusBar_SetParts($g_hStatus, $aParts) $cBtnStatusBar = GUICtrlCreateButton('OK', 0, 0) $_hndl = GUICtrlGetHandle($cBtnStatusBar) $cBtnDummy = GUICtrlCreateDummy() _GUICtrlStatusBar_EmbedControl($g_hStatus, 1, $_hndl, 4) $wProcNew = DllCallbackRegister("_StatusBarWindowProc", "int", "hwnd;uint;wparam;lparam") $wProcOld = _WinAPI_SetWindowLong($g_hStatus, $GWL_WNDPROC, DllCallbackGetPtr($wProcNew)) GUISetState(@SW_SHOW) While 1 $idMsg = GUIGetMsg() Select Case $idMsg = $GUI_EVENT_CLOSE ExitLoop Case $idMsg = $cBtnDummy ConsoleWrite('StatusBar OK click' & @CRLF) EndSelect WEnd Func _StatusBarWindowProc($hWnd, $Msg, $wParam, $lParam) #forceref $hWnd, $Msg, $wParam, $lParam Local $nNotifyCode = BitShift($wParam, 16) Local $nID = BitAND($wParam, 0x0000FFFF) Switch $Msg Case $WM_COMMAND Switch $lParam Case $_hndl Switch $nNotifyCode Case $BN_CLICKED GUICtrlSendToDummy($cBtnDummy) EndSwitch EndSwitch Case $WM_NCPAINT _GUICtrlStatusBar_EmbedControl($g_hStatus, 1, $_hndl) EndSwitch Return _WinAPI_CallWindowProc($wProcOld, $hWnd, $Msg, $wParam, $lParam) EndFunc
  3. Clicking the OK button in the StatusBar does not work. Can you help me please? Thank you. #include <GuiStatusBar.au3> #include <GUIConstants.au3> $hGUI = GUICreate("test click statusbar", 500, 200) $g_hStatus = _GUICtrlStatusBar_Create($hGUI) Dim $aParts[3] = [75, 150, -1] _GUICtrlStatusBar_SetParts($g_hStatus, $aParts) $cBtnStatusBar = GUICtrlCreateButton('OK', 0, 0) $_hndl = GUICtrlGetHandle($cBtnStatusBar) _GUICtrlStatusBar_EmbedControl($g_hStatus, 1, $_hndl, 4) GUISetState(@SW_SHOW) While 1 $idMsg = GUIGetMsg() Select Case $idMsg = $GUI_EVENT_CLOSE ExitLoop Case $idMsg = $cBtnStatusBar ConsoleWrite('StatusBar OK click' & @CRLF) EndSelect WEnd
×
×
  • Create New...