Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What is the definition of <<16|3
#1
Could you please explain (in laymen terms) what and how does <<16|3 work? I see you using this but I can not figure out how it works.

Function Dialog13
Code:
Copy      Help
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages

;Example of multipage dialog calling code:
str controls = "3"
str lb3
lb3="&Page0[]Page1[]Page2"
if(!ShowDialog("Dialog13" &Dialog13 &controls)) ret

;BEGIN DIALOG
;0 "" 0x90C80A44 0x100 0 0 265 163 "Dialog"
;3 ListBox 0x54230101 0x204 4 4 96 80 ""
;1001 Static 0x54020000 0x4 106 4 48 13 "Page0"
;1101 Static 0x44020000 0x4 106 4 48 13 "Page1"
;1201 Static 0x44020000 0x4 106 4 48 13 "Page2"
;1 Button 0x54030001 0x4 142 146 48 14 "OK"
;2 Button 0x54030000 0x4 192 146 48 14 "Cancel"
;4 Button 0x54032000 0x4 242 146 18 14 "?"
;5 Static 0x54000010 0x20004 4 138 257 1 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2030001 "" "0" ""

ret
;messages
sel message
,case WM_INITDIALOG
,goto selectpage
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
,case LBN_SELCHANGE<<16|3
,;selectpage
,_i=LB_SelectedItem(id(3 hDlg))
,DT_Page hDlg _i
ret 1
#2
wParam contains message code (eg LBN_SELCHANGE) in high order word and control id (eg 3) in low order word.
To match wParam, we place a message code in high order word (LBN_SELCHANGE<<16) and control id in low order word (|3).
#3
But how do you get the address 3 insted of 4 or 5?
#4
Time_Runner Wrote:But how do you get the address 3 insted of 4 or 5?

What do you mean?
Taking on Quick Macros one day at a time
#5
from

;3 ListBox 0x54230101 0x204 4 4 96 80 ""

or from dialog editor, where the listbox is lb3.

or from QM status bar when mouse is over the listbox. It then shows id=3.
#6
I fill so dumb
Thank You


Forum Jump:


Users browsing this thread: 1 Guest(s)