- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hope this isn't a stupid question, but I'm having trouble loading a menu from a resource file. Things have changed from WATFOR and F77 that I used in college many years ago...
I can compile the QWIN and Console applications without issues.
I have used the SDI scaffold project to try to build a desktop application.
I can double click on the rc file and view and edit it.
.....snip....
lpszMenuName ="WinsdiApp1"C
lpszAccelName ="WinsdiApp1"C
....snip....
! Load the window's menu and accelerators and create the window
ghMenu = LoadMenu(hInstance, LOC(lpszMenuName))
if (ghMenu == 0) goto 99993
haccel = LoadAccelerators(hInstance, LOC(lpszAccelName))
if (haccel == 0) goto 99992
.....snip.....
I've added some dialog boxes to the scaffold to identify where the problem occurs.
If I comment out the ghMenu lines, the program compiles and runs producing a window with no menu. The accelerator loads successfully from the same rc file.
Uncommenting the ghMenu lines, the program compiles without errors or warnings and terminated via the error dialog box.
The code is slightly different from the code in the VF manual, and I've tried including VFWIN in place of the first two includes.
Any help would be appreciated.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you I'm implementing a potential fix from an older string. My rc file was tagged with text in the registry instead of script. One reg edit and a repair, might be the fix....fingers crossed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks to @andrew_4619 for checking that the code was correct and to @Steve_Lionel who provided a potential fix at the following link.
View solution in original post
My .RC file entry was set to a different content type, the entry deletion and VS repair fixed the issue.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page