i want to set a standard menu so i dont have to create a menu

no i have a problme white using api
it crash when i add the menu

if there is a other way to use api whitout losing control of mouse and key_bord then it will be great

Code:
#include <acknex.h>
#include <default.c>
#include <windows.h>



void set_api_main()
{
	HMENU menu=CreateMenu();
	HMENU hSubMenu=CreateMenu();
	InsertMenu(hSubMenu,0,MF_BYPOSITION|MF_STRING,1,"BEEP");
	InsertMenu(hSubMenu,1,MF_BYPOSITION|MF_STRING,2,"QUIT");
	InsertMenu(menu,0,MF_BYPOSITION|MF_STRING|MF_POPUP,hSubMenu,"File"); 
	
	//Change Window style to activate Maximize button
	SetWindowLong(hWnd,GWL_STYLE, WS_CAPTION+WS_SYSMENU+WS_MAXIMIZEBOX+WS_SIZEBOX); 
	SetMenu(hWnd,menu);//here it crash
	ShowWindow(hWnd,SW_SHOW);
	
}

function MyMessageFunction(UINT message, WPARAM wParam, LPARAM lParam);

function main()
{
	set_api_main();
	on_scanmessage = MyMessageFunction;
}

function MyMessageFunction(UINT message, WPARAM wParam, LPARAM lParam){
	if(message == WM_COMMAND){ wait(1);}	
}


thx flits


"empty"