Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Passing a value to dialog through hooked toolbar
#1
A routine (B4SES) call a toolbar with :
Quote:mac "MyClock-3" hDlg
Toolbar MyClock-3
Code:
Copy      Help
;/hook MyClockHookProc

where
Function MyClockHookProc
Code:
Copy      Help
;/
function# hWnd message wParam lParam

sel message
,case WM_INITDIALOG
,hid id(9999 hWnd)
;,ShowDialog("MyStopWDialog" &MyStopWDialog 0 hWnd 1 WS_CHILD WS_POPUP|WS_CAPTION|WS_SYSMENU 0 0 3)
,ShowDialog("DateTimeShow" &DateTimeShow 0 hWnd 1 WS_CHILD WS_POPUP|WS_CAPTION|WS_SYSMENU 0 0 4)
,;the 4 adds 4 pixels at the top where you ca right click or drag the toolbar
,case WM_DESTROY
,,

I want to pass a value (parameter) from "B4SES" to "DateTimeShow". I understand it can be done easily by initiating a global variable in "B4SES". I wonder whether there exists another more elegant way to do it. If I used a message
Quote:SendMessage(dialogHandle WM_APP+1 0 &x)

I wonder whether it should be sent directly to "DateTimeShow" or rather through "MyClockHookProc".

Any advice is mostly welcome. Many thanks in advance.
#2
send directly.


Forum Jump:


Users browsing this thread: 1 Guest(s)