Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Another Dialog Question
#4
I do not know what I am doing wrong. I used this example to create my dialog and everything seams to work ok but when I select a WebPage to go to and press the go to web page button it says that I need to select a WebPage. Can someone please help?

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

str controls = "3 4 7 8 9"
str o3Opt o4Opt o7Yah o8Goo o9MSN

o3Opt=1

if(!ShowDialog("dialog_473" &dialog_473 &controls)) ret


;BEGIN DIALOG
;0 "" 0x10C80A44 0x100 0 0 223 135 "Form"
;1 Button 0x54030001 0x4 120 116 48 14 "OK"
;2 Button 0x54030000 0x4 170 116 48 14 "Cancel"
;3 Button 0x54032009 0x0 8 8 48 12 "Option first"
;4 Button 0x54002009 0x0 8 22 48 12 "Option next"
;5 Static 0x5C000000 0x0 8 44 130 10 "What Web Page do you want to use?"
;7 Button 0x5C032009 0x0 8 58 48 12 "Yahoo"
;8 Button 0x5C002009 0x0 8 74 48 12 "Google"
;9 Button 0x5C002009 0x0 8 90 48 12 "MSN"
;6 Button 0x5C032000 0x0 82 70 50 22 "Go to Web Page"
;END DIALOG
;DIALOG EDITOR: "" 0x2030001 "" "" ""

ret
;messages
sel message
,case WM_INITDIALOG DT_Init(hDlg lParam); ret 1
,case WM_DESTROY DT_DeleteData(hDlg)
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case [3,4] ;;when clicked option button whose id is 3 or 4
,EnableWindow(id(5 hDlg) wParam=4) ;;enable static 5 if button 4 is clicked, disable if other button is clicked
,EnableWindow(id(6 hDlg) wParam=4) ;;enable button 109 if button 4 is clicked, disable if other button is clicked
,EnableWindow(id(7 hDlg) wParam=4) ;;enable option button 7 if button 4 is clicked, disable if other button is clicked
,EnableWindow(id(8 hDlg) wParam=4) ;;enable option button 8 if button 4 is clicked, disable if other button is clicked
,EnableWindow(id(9 hDlg) wParam=4) ;;enable option button 9 if button 4 is clicked, disable if other button is clicked
,
,case 6
,if(o7Yah!=1 and o8Goo!=1 and o8Goo!=1)
,,mes("You need to select a Web Page ")
,if(o7Yah=1)
,,run "http://www.yahoo.com"
,if(o8Goo=1)
,,run "http://www.google.com"
,if(o8Goo=1)
,,run "http://www.google.com"
,
,case IDOK DT_Ok hDlg
,case IDCANCEL DT_Cancel hDlg
ret 1


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)