zoukankan      html  css  js  c++  java
  • win32 Application SDK窗口 WNDCLASS 自定义鼠标、图标、菜单

    首先添加鼠标,图标,菜单资源,然后可以从资源ID加载

    BOOL InitApplication( HINSTANCE hInstance )
    {
    WNDCLASS wc;
    wc.cbClsExtra
    =0;
    wc.cbWndExtra
    =0;
    wc.hbrBackground
    =(HBRUSH)GetStockObject(WHITE_BRUSH);;
    //wc.hCursor=LoadCursor(NULL,IDC_ARROW);
    wc.hCursor=LoadCursor(hInstance,MAKEINTRESOURCE(IDC_CURSOR_PEN));//looad cursor by resource id
    //wc.hIcon=LoadIcon(NULL,IDI_APPLICATION);
    wc.hIcon=LoadIcon(hInstance,MAKEINTRESOURCE(IDI_APPLE));//load icon by resource id
    wc.hInstance=hInstance;
    wc.lpfnWndProc
    =(WNDPROC)WndProc;
    wc.lpszClassName
    =g_szAppName;
    //wc.lpszMenuName=NULL;
    wc.lpszMenuName=MAKEINTRESOURCE(MENU_WIN32);//load menu by id;
    wc.style=0;
    return RegisterClass(&wc);
    }

      

    界面效果:

    完整的代码参考:

    http://blog.csdn.net/iamoyjj/archive/2011/06/06/6528100.aspx

  • 相关阅读:
    1001.A+B Format(20)
    大一下学期的自我目标
    re模块3
    re模块2
    re模块
    configParser模块
    logging模块
    hashlib模块
    sys模块
    isinstance函数
  • 原文地址:https://www.cnblogs.com/oyjj/p/2132859.html
Copyright © 2011-2022 走看看