• wince开发菜单栏控制


    初始化方法:

    HINSTANCE g_hInst = ::AfxGetInstanceHandle();
    hwndmenu  = ::CommandBar_Create(g_hInst, m_hWnd, 1);
    ::CommandBar_InsertMenubar(hwndmenu, g_hInst, IDR_MENU2, 0);
    ::CommandBar_Show(hwndmenu, TRUE);

    需要控制时调用:

    HMENU hCBMenu = NULL;
    hCBMenu = ::CommandBar_GetMenu(hwndmenu, 0);
    hMenu = ::GetSubMenu(hCBMenu, 0);
    ::EnableMenuItem(hMenu,ID_ZICAIDAN1,MF_GRAYED);
    hMenu = ::GetSubMenu(hCBMenu, 1);
    ::EnableMenuItem(hMenu,ID_ZICAIDAN2,MF_ENABLED);
    ::EnableMenuItem(hMenu,ID_ZICAIDAN3,MF_ENABLED);

  • 相关阅读:
    文件路径与操作系统
    试验10
    shiyan9
    sql
    shiyan8
    iostream
    shiyan7
    CDMA
    试验6
    试验5
  • 原文地址:https://www.cnblogs.com/sunsmile/p/2675416.html
Copyright © 2020-2023  润新知