I want to call a dialog I created from a main window of a visual project, when the "about" item is selected from the menu.
Here is the code I am using:
.ElseIf uMsg == WM_COMMAND
LoWord wParam
.If Ax == IDM_TESTPROJ_ABOUT
Invoke Create, szDlgNameAbt, hWnd, ecModal, NULL
.EndIf
.EndIf
I am getting access violations occurring in the invoke create line.
When I change that line to:
Invoke MessageBox, App.Main, Addr szDlgNameAbt, Addr szDlgNameAbt, MB_OK
everything works fine and the messagebox appears. I have'nt been programming in awhile and I am a bit rusty.
Btw, the dialog I created doesn't do anything except has two static labels and a button on it.I created it just for learning/testing purposes.
Regards and Happy New Year,
Rags
I think you're gonna need to give us a bit more than that rags.
Ehtyar.
Missing the ADDR on szDlgNameAbt?
If not, we'll need more info.
Cheers,
Zooba :U
Quote from: zooba on January 01, 2007, 07:14:17 AM
Missing the ADDR on szDlgNameAbt?
That was it zooba, I guess I was too tired to notice the obvious! Thank you very much.
Rags
Hi all and happy new year!
Rabs, zooba got the solution. I personally get this error often as the Addr operator is easy to forget and Masm does not take that into account (I think it could throw a warning).
Thank you both for using Easy Code,
Ramon