Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Message transmission method in the dialog in the dialog box?
#1
Hello. Big Grin
Thank you, who always helping.
Please help me to.

ex:
step1: tab_test dialog(first dialog) tab:google click
step2: 'go_site' dialog show
step3: go_site dialog button click
step4: tab_test run google.com

Message transmission method in the dialog in the dialog box?

Function tab_test
Code:
Copy      Help
\Dialog_Editor
function# hDlg message wParam lParam
ExeQmGridDll
DlgGrid Main_Search.Init(hDlg 5)
if(hDlg) goto messages

;BEGIN DIALOG
;0 "" 0x90CF0AC8 0x0 0 0 476 312 "TorrentSearch"
;1101 ActiveX 0x54030000 0x0 8 24 460 262 "SHDocVw.WebBrowser"
;1 Button 0x54030001 0x0 368 292 48 14 "OK"
;2 Button 0x54030000 0x0 420 292 48 14 "Cancel"
;3 SysTabControl32 0x54030040 0x0 4 8 74 12 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2040108 "*" "1" "" ""

str controls = "1101"
str ax1101SHD
if(!ShowDialog("tab_test" &tab_test &controls)) ret
ret
;messages
sel message
,case WM_INITDIALOG

,;SetTAB
,,int htb=id(3 hDlg)
,,TabControlAddTabs htb "test[]google"
,,goto g11

,case WM_DESTROY
,case WM_COMMAND goto messages2
,case WM_CTLCOLORSTATIC
,case WM_NOTIFY goto messages3

ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1
;messages3
NMHDR* nh=+lParam
sel nh.idFrom
,case 5
,GRID.QM_NMLVDATA* cd=+nh
,,NMLVDISPINFO* di=+nh
,,NMLISTVIEW* nlv=+nh
sel nh.code
,case TCN_SELCHANGE
,_i=SendMessage(nh.hwndFrom TCM_GETCURSEL 0 0)
,;out "Tab selected: %i" _i

,if _i=1
,,out "google"
,,if(!ShowDialog("go_site" &go_site)) ret
,;g11
,out "Tab selected: %i" _i
,DT_Page hDlg _i
Function go_site
Code:
Copy      Help
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages


;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 80 38 "Dialog"
;3 Button 0x54032000 0x0 12 12 48 14 "go_google"
;END DIALOG
;DIALOG EDITOR: "" 0x2040108 "" "" "" ""

ret
;messages
sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case 3
,out "send message tab_test go http://google.com"
,case IDOK
,case IDCANCEL
ret 1
#2
go_site:
PostMessage tab_test_dialog_handle WM_APP 0 0

tab_test:
,case WM_APP
,out "message received"
#3
Gintaras Wrote:go_site:
PostMessage tab_test_dialog_handle WM_APP 0 0

tab_test:
,case WM_APP
,out "message received"


Function go_site
Code:
Copy      Help
;messages2
sel wParam
,case 3
,PostMessage win("tab_dialog" "#32770") WM_APP wParam lParam
,case IDOK
,case IDCANCEL
ret 1

Function tab_test
Code:
Copy      Help
,case WM_NOTIFY goto messages3
,case WM_APP
,,out "message received"

I'm sorry but there is a part that does not make sense.
If there are Google and Yahoo button two or more buttons
How do you recognize two distinct buttons?
You can give an example to illustrate how to use it?
#4
PostMessage win("tab_dialog" "#32770") WM_APP 1 0
PostMessage win("tab_dialog" "#32770") WM_APP 2 0
PostMessage win("tab_dialog" "#32770") WM_APP 3 0

,case WM_APP
,out wParam
#5
Thank you very much!!
All issues have been resolved. : D


Forum Jump:


Users browsing this thread: 1 Guest(s)