设为首页 加入收藏

TOP

功能表及其他资源(五十三)
2010-12-30 21:13:27 来源: 作者: 【 】 浏览:35965
Tags:功能 及其他 资源
DispatchMessage (&msg) ;
}
return msg.wParam ;
}

LRESULT CALLBACK WndProc ( HWND hwnd, UINT message, WPARAM wParam,LPARAM lParam)
{
static HMENU hMenuMain, hMenuEdit, hMenuFile ;
HINSTANCE hInstance ;
switch (message)
{
case WM_CREATE:
hInstance = (HINSTANCE) GetWindowLong (hwnd, GWL_HINSTANCE) ;

hMenuMain = LoadMenu (hInstance, TEXT ("MenuMain")) ;
hMenuFile = LoadMenu (hInstance, TEXT ("MenuFile")) ;
hMenuEdit = LoadMenu (hInstance, TEXT ("MenuEdit")) ;

SetMenu (hwnd, hMenuMain) ;
return 0 ;

case WM_COMMAND:
switch (LOWORD (wParam))
{
case IDM_MAIN:
SetMenu (hwnd, hMenuMain) ;
return 0 ;

case IDM_FILE:
SetMenu (hwnd, hMenuFile) ;
return 0 ;

case IDM_EDIT:
SetMenu (hwnd, hMenuEdit) ;
return 0 ;

case IDM_FILE_NEW:
case IDM_FILE_OPEN:
case IDM_FILE_SAVE:
case IDM_FILE_SAVE_AS:
case IDM_EDIT_UNDO:
case IDM_EDIT_CUT:
case IDM_EDIT_COPY:
case IDM_EDIT_PASTE:
case IDM_EDIT_CLEAR:
MessageBeep (0) ;
return 0 ;
}
break ;

case WM_DESTROY:
SetMenu (hwnd, hMenuMain) ;
DestroyMenu (hMenuFile) ;
DestroyMenu (hMenuEdit) ;

P
首页 上一页 50 51 52 53 54 55 56 下一页 尾页 53/69/69
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇对话方块 下一篇子视窗控制项

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: