Windows 2000 QuickWin menu problem

Windows 2000 QuickWin menu problem

I have an QuickWin application which runs very nicely on NT SP6,but has an intermittent problem on Window 2000. The application is user interactive intensive (i.e. different menu items are created and deleted using DELETEMENUQQ and INSERTMENUQQ). On W2K, an intermittent "Memory access" error is generated when several menus are deleted and and new ones created. Running this application in Debug mode, tells me the error is in the INSERTMENUQQ call. All arguments appear to be OK.
Is any one else having problem with incompatibilities between the two operating systems?

6 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

It's hard to tell. QuickWin used to have problems with INSERTMENUQQ but it was long time ago (maybe even in PowerStation age, can't tell for sure). Which CVF version are you running? Are you sure that all menu texts are CHAR(0) terminated C-strings?


I am using CVF 6.6a. All strings are terminated with a zero. I have spent a lot of time looking at the input to these calls and I can not find a problem. It is good to see that some else is having difficulties. Maybe I am only half nuts.

I suspect this is a QuickWin problem; I suggest you send the workspace to

Attached is a workspace which demonstrates usage of XFT menu routines, which present a workaround for QuickWin menu routines. Unfortunately, I didn't have time to finish documentation, but I hope the code is pretty self-explaining. I'd ask you -- if you have some time an patience -- to try to rework your code (on a copy of it at least) so that it uses the XFT routines instead. It would require the following changes:

- XBindWindow subclasses the frame window containing the menu, so that the subsequent calls could operate on it. It returns a X_WINDOW structure (you shouldn't care about its contents).
- XInsertMenuItem(xMenu, xMI, .TRUE., i1, [i2], [i3], [i4]) inserts menu item described by xMI structure into menu xMenu before item that starts at position i1. If present, arguments i2, i3, i4 describe position in sub (sub-sub) menus. Constant XMENU_APPEND specifies that the item is appended at the end.
- X_MENUITEM structure contains meny type (MF_STRING or MF_SEPARATOR), menu state (MF_ENABLED, MF_GRAYED, MF_CHECKED), menu item ID, and menu title.
- XSetCommand registers a handler routine for menu item with given ID. The routine must have prototype (xWnd, ID, nType). (The latest is not of interest). You should rework your callback routines.

If the problem persists, then it's really a Win 2000 problem (which I doubt).


...Ah, yes, the attachment :-)

I have exactly the same problem. My program developped with CVF 6.6 A turns on Windows 9x, Windows NT, Windows XP but not on Windows 2000.
I don't understand why.

Leave a Comment

Please sign in to add a comment. Not a member? Join today