首页 > Windows开发 > 详细

win32—— hIcon hCursor hbrBackground

时间:2017-10-07 23:25:06      阅读:343      评论:0      收藏:0      [点我收藏+]
    //当在资源中时,exe可以出效果
    //但从文件中添加时,是不可以的
    wnd.hIcon = (HICON)LoadIcon(hInstance, MAKEINTRESOURCE(IDI_ICON1));
    wnd.hIcon = (HICON)::LoadImage(NULL, _T("a.ico"), IMAGE_ICON, 0, 0, LR_DEFAULTSIZE | LR_LOADFROMFILE);

    wnd.hCursor = LoadCursor(hInstance, MAKEINTRESOURCE(IDI_CURSOR1));
    wnd.hCursor = LoadCursorFromFile(_T("b.cur"));
    wnd.hCursor = (HCURSOR)LoadImage(hInstance, _T("a.cur"), IMAGE_CURSOR, 32, 32, LR_LOADFROMFILE);

 

  wnd.hbrBackground = (HBRUSH)GetStockBrush(DKGRAY_BRUSH);
    wnd.hbrBackground = CreateSolidBrush(RGB(183, 157, 226));
    wnd.hbrBackground = (HBRUSH)(COLOR_WINDOW + 10);

    HBITMAP hbit = (HBITMAP)LoadImage(hinstance, _T("bk.bmp"), IMAGE_BITMAP, 500, 375, LR_LOADFROMFILE);       //500*375图片大小
    HBITMAP hbrush = CreatePatternBrush(hbit);
    wnd.hbrBackground = hbrush;

 

win32—— hIcon hCursor hbrBackground

原文:http://www.cnblogs.com/ming-michelle/p/7636118.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!