天天看点

CBitmap加载本地图片

wchar_t buf[255] = {0};
    ::GetCurrentDirectory(255, buf);//取得本地路径
    CString str;
    str = buf;
    str += "\\BK.bmp";
    CBitmap bmap;
    bmap.m_hObject = (HBITMAP)::LoadImage(NULL, str, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE);
           

转载于:https://my.oschina.net/u/4156808/blog/3068221