Hi,

I found (it seems) a crash bug. When I have this resource code, winasm crashes :

MYMENU MENUEX DISCARDABLE
BEGIN
POPUP "Test2"
BEGIN
MENUITEM "One",1
MENUITEM "Two",2
POPUP "Three"
BEGIN
MENUITEM "In three"
END
END
END

Did somebody else try sub - sub menu ?

Thierry
Posted on 2004-03-16 10:14:39 by golemxiii
Hi,

No problem found with this part of script you submitted. Normally there would be no problem with nested popup menus. Could you please submit the whole rc file? may be the bug (if there is any) is somewhere else.

regards,

akyprian
Posted on 2004-03-16 12:02:07 by akyprian
Hi,

& Thank u,

The crash appears when I assemble it :

...

;This Resource Script was generated by WinAsm Studio.

#define IDC_EDIT 3000
#define IDC_BUTTON 3001
#define IDC_EXIT 3002
#define DS_CENTER 2048
#define DS_CENTER 2048
#define WS_MINIMIZEBOX 131072
#define WS_SYSMENU 524288
#define WS_VISIBLE 268435456
#define WS_OVERLAPPED 0
#define DS_MODALFRAME 128
#define DS_3DLOOK 4
#define WS_CAPTION 12582912
#define ES_AUTOHSCROLL 128
#define ES_LEFT 0
#define IDM_EXIT 1
#define monicone 1000
#define IDM_ABOUT 2
#define monblabla 1001
#define MENUBIS 1

monicone ICON DISCARDABLE "ARRIVE.ICO"
monblabla ICON DISCARDABLE "blabla.ico"

FirstMenu MENUEX DISCARDABLE
BEGIN
POPUP "&File"
BEGIN
MENUITEM "E&xit",IDM_EXIT
END
MENUITEM "About",IDM_ABOUT
END

MENUBIS MENUEX DISCARDABLE
BEGIN
POPUP "Test2"
BEGIN
MENUITEM "Open workspace...",4
MENUITEM "Save workspace",2
MENUITEM "Save workspace as...",5
POPUP "Three"
BEGIN
MENUITEM "In three"
END
END
END

...

Thierry
Posted on 2004-03-16 12:14:16 by golemxiii
I still don't get it (Win98SE-what's your OS?),

When you try to assmeble it, WinAsm Studio tries to save the rc file (provided there are changes to the resources AND you have "AutoSave before make" enabled from tools-options). So the problem might be in the "save" process.

If you remove

MENUBIS MENUEX DISCARDABLE
BEGIN
POPUP "Test2"
BEGIN
MENUITEM "Open workspace...",4
MENUITEM "Save workspace",2
MENUITEM "Save workspace as...",5
POPUP "Three"
BEGIN
MENUITEM "In three"
END
END
END

then you say don't get the crash? If so, my only guess is:

change

MENUITEM "In three"

with

MENUITEM "In three", 7 (for example)

does this help?

akyprian
Posted on 2004-03-16 12:33:05 by akyprian
Hi,

I have WinXp pro.

This code work :

...

;This Resource Script was generated by WinAsm Studio.

#define IDC_EDIT 3000
#define IDC_BUTTON 3001
#define IDC_EXIT 3002
#define DS_CENTER 2048
#define DS_CENTER 2048
#define WS_MINIMIZEBOX 131072
#define WS_SYSMENU 524288
#define WS_VISIBLE 268435456
#define WS_OVERLAPPED 0
#define DS_MODALFRAME 128
#define DS_3DLOOK 4
#define WS_CAPTION 12582912
#define ES_AUTOHSCROLL 128
#define ES_LEFT 0
#define IDM_EXIT 1
#define monicone 1000
#define IDM_ABOUT 2
#define monblabla 1001
#define MENUBIS 1

monicone ICON DISCARDABLE "ARRIVE.ICO"
monblabla ICON DISCARDABLE "blabla.ico"

FirstMenu MENUEX DISCARDABLE
BEGIN
POPUP "&File"
BEGIN
MENUITEM "E&xit",IDM_EXIT
END
MENUITEM "About",IDM_ABOUT
END

MENUBIS MENUEX DISCARDABLE
BEGIN
POPUP "Test2"
BEGIN
MENUITEM "Open workspace...",4
MENUITEM "Save workspace",2
MENUITEM "Save workspace as...",5
MENUITEM "Three",6
MENUITEM "In three",7
END
END

...

But in visual mode (or not) when I add one level nesting on <"In three",7>. I can't save the file (or change visual to text mode edit, or assemble).

Thierry
Posted on 2004-03-16 12:51:30 by golemxiii
Hi,

Please try this and let me know:

MENUBIS MENUEX DISCARDABLE
BEGIN
POPUP "Test2"
BEGIN
MENUITEM "Open workspace...",4
MENUITEM "Save workspace",2
MENUITEM "Save workspace as...",5
POPUP "Three"
BEGIN
MENUITEM "In three"
END
MENUITEM "Test",100
END
END

If this is ok, then the problem is found and a fix will be released soon.

regards,

akyprian
Posted on 2004-03-16 16:25:36 by akyprian
Hi,

The line you add (<MENUITEM "Test",100>) makes the whole work fine.

Good job,

Thank U

Thierry
Posted on 2004-03-16 18:04:27 by golemxiii