i followed the tutorial on creating a menu on your program. i have menu.asm
.386 
.model flat,stdcall 
option casemap:none 

WinMain proto :DWORD,:DWORD,:DWORD,:DWORD 

include \masm32\include\windows.inc 
include \masm32\include\user32.inc 
include \masm32\include\kernel32.inc 
includelib \masm32\lib\user32.lib 
includelib \masm32\lib\kernel32.lib 

.data 
ClassName db "SimpleWinClass",0 
AppName  db "Our First Window",0 
MenuName db "FirstMenu",0                ; The name of our menu in the resource file. 
Test_string db "You selected Test menu item",0 
Hello_string db "Hello, my friend",0 
Goodbye_string db "See you again, bye",0 

.data? 
hInstance HINSTANCE ? 
CommandLine LPSTR ? 

.const 
IDM_TEST equ 1                    ; Menu IDs 
IDM_HELLO equ 2 
IDM_GOODBYE equ 3 
IDM_EXIT equ 4 

.code 
start: 
    invoke GetModuleHandle, NULL 
    mov    hInstance,eax 
    invoke GetCommandLine
    mov CommandLine,eax 
    invoke WinMain, hInstance,NULL,CommandLine, SW_SHOWDEFAULT 
    invoke ExitProcess,eax 

WinMain proc hInst:HINSTANCE,hPrevInst:HINSTANCE,CmdLine:LPSTR,CmdShow:DWORD 
    LOCAL wc:WNDCLASSEX 
    LOCAL msg:MSG 
    LOCAL hwnd:HWND 
    mov   wc.cbSize,SIZEOF WNDCLASSEX 
    mov   wc.style, CS_HREDRAW or CS_VREDRAW 
    mov   wc.lpfnWndProc, OFFSET WndProc 
    mov   wc.cbClsExtra,NULL 
    mov   wc.cbWndExtra,NULL 
    push  hInst 
    pop   wc.hInstance 
    mov   wc.hbrBackground,COLOR_WINDOW+1 
    mov   wc.lpszMenuName,OFFSET MenuName        ; Put our menu name here 
    mov   wc.lpszClassName,OFFSET ClassName 
    invoke LoadIcon,NULL,IDI_APPLICATION 
    mov   wc.hIcon,eax 
    mov   wc.hIconSm,eax 
    invoke LoadCursor,NULL,IDC_ARROW 
    mov   wc.hCursor,eax 
    invoke RegisterClassEx, addr wc 
    invoke CreateWindowEx,NULL,ADDR ClassName,ADDR AppName,\ 
           WS_OVERLAPPEDWINDOW,CW_USEDEFAULT,\ 
           CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,NULL,NULL,\ 
           hInst,NULL 
    mov   hwnd,eax 
    invoke ShowWindow, hwnd,SW_SHOWNORMAL 
    invoke UpdateWindow, hwnd 
    .WHILE TRUE 
                invoke GetMessage, ADDR msg,NULL,0,0 
                .BREAK .IF (!eax) 
                invoke DispatchMessage, ADDR msg 
    .ENDW 
    mov     eax,msg.wParam 
    ret 
WinMain endp 

WndProc proc hWnd:HWND, uMsg:UINT, wParam:WPARAM, lParam:LPARAM 
    .IF uMsg==WM_DESTROY 
        invoke PostQuitMessage,NULL 
    .ELSEIF uMsg==WM_COMMAND 
        mov eax,wParam 
        .IF ax==IDM_TEST 
            invoke MessageBox,NULL,ADDR Test_string,OFFSET AppName,MB_OK 
        .ELSEIF ax==IDM_HELLO 
            invoke MessageBox, NULL,ADDR Hello_string, OFFSET AppName,MB_OK 
        .ELSEIF ax==IDM_GOODBYE 
            invoke MessageBox,NULL,ADDR Goodbye_string, OFFSET AppName, MB_OK 
        .ELSE 
            invoke DestroyWindow,hWnd 
        .ENDIF 
    .ELSE 
        invoke DefWindowProc,hWnd,uMsg,wParam,lParam 
        ret 
    .ENDIF 
    xor    eax,eax 
    ret 
WndProc endp 
end start
menu.rc
#define IDM_TEST 1
#define IDM_HELLO 2
#define IDM_GOODBYE 3
#define IDM_EXIT 4

FirstMenu MENU
{
 POPUP "&PopUp"
        {
         MENUITEM "&Say Hello",IDM_HELLO
         MENUITEM "Say &GoodBye", IDM_GOODBYE
         MENUITEM SEPARATOR
         MENUITEM "E&xit",IDM_EXIT
        }
 MENUITEM "&Test", IDM_TEST
}
make.bat
C:\masm32\bin\ml /c /coff /Cp menu.asm
c:\masm32\bin\rc menu.rc
C:\masm32\bin\link /SUBSYSTEM:WINDOWS  /LIBPATH:c:\masm32\lib  menu.obj
and i double click the batch file to compile my program. It runs but the menu doesn't show up! should i be using makefile? i couldn't figure out how, it said just type 'nmake' but that does nothing since i have no executable named nmake. It said i could instead use ml, then rc, then link. So why doesn't it work?
Posted on 2001-06-08 21:05:00 by CodinMonkey

 try and rename your menu.rc to: rsrc.rc or just open up the *.bat
 file and change rsrc.rc to menu.rc


Posted on 2001-06-08 22:38:00 by disease_2000
The rc program converts a .rc file to a .res file. You have to convert the .res file to a .obj file using \masm32\bin\cvtres /machine:ix86 menu.res
Posted on 2001-06-09 02:22:00 by Satrukaan
Satrukaan: That's not really necessary, you can also directly link it, but the problem is that the link command line doesn't link it! First change menu.rc to rsrc.rc like desease said, it prevents name conflicts. Then adjust the link line to this:

C:\masm32\bin\link /SUBSYSTEM:WINDOWS  /LIBPATH:c:\masm32\lib  menu.obj rsrs.res
Thomas
Posted on 2001-06-09 04:16:00 by Thomas
Thank you! i knew it was something really simple.
Posted on 2001-06-09 10:58:00 by CodinMonkey