Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Use button on the child window to open webpage on the main window
#2
wow many many mistakes here

the reason your sub dia function doesnt work because your calling  #sub DlgProc   in your showdialog statement for dia which is incorrect and is actually the dialog process for your main dialog
change to


Code:
Copy      Help
#sub dia
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog"
;3 Button 0x54032000 0x0 36 32 84 14 "change maindialog url"
;1 Button 0x54030001 0x4 116 116 48 14 "OK"
;2 Button 0x54030000 0x4 168 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040701 "*" "" "" ""

if(!ShowDialog(dd &sub.DlgProc3 0)) ret


#sub DlgProc3

why is this in your code?
mac "swfmenu" "" mfpax hDlg

remove it will cause another error. why would you try and launch the same dialog again?

hDlg is not a global variable .
sub WndProc_Subclass doesnt know what hDlg is. 
You have made this same mistake a few times before. If you look in the the full code the answer is there not covering it again.Or look back in your previous posts.

You made the same mistake in function dia as well.
dia has no idea what the window handle of the main dialog is
from what i can see sub dia and function dia are not needed at all. Why make another dialog when the same thing is done easier with the other right click menu option.

another problem you will have once you get it working is once you change the url the right click menu will stop working as well. will need to call SetTimer again because the window is destroyed when you changed the url.

I will suggest again for you to learn what the code does before trying to use it differently .


Messages In This Thread
RE: Use button on the child window to open webpage on the main window - by Kevin - 09-11-2018, 06:06 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)