Changeset 795 in dev for branches/egtra
- Timestamp:
- Jan 31, 2011, 12:18:33 AM (14 years ago)
- Location:
- branches/egtra/ab5.0/abdev
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/egtra/ab5.0/abdev/abdev-impl/Resource/Load.cpp
r794 r795 5 5 #include <boost/range/adaptor/transformed.hpp> 6 6 #include <boost/numeric/conversion/cast.hpp> 7 #include <atlbase.h> 8 #pragma warning(push) 9 #pragma warning(disable: 6387) 10 #include <atlapp.h> 11 #include <atlgdi.h> 12 #pragma warning(pop) 7 13 #include <Resource/Load.h> 8 14 … … 182 188 } 183 189 190 HBITMAP LoadBitmapAlt(HINSTANCE hinst, USHORT id) 191 { 192 WTL::CDC dc = ::GetDC(nullptr); 193 auto pbi = static_cast<BITMAPINFO const*>(GetResource(hinst, id, RT_BITMAP)); 194 return CreateDIBitmap(dc, &pbi->bmiHeader, CBM_INIT, reinterpret_cast<BYTE const*>(pbi) + pbi->bmiHeader.biSize, pbi, DIB_RGB_COLORS); 195 } 196 184 197 }} -
branches/egtra/ab5.0/abdev/abdev-impl/Resource/Load.h
r794 r795 21 21 HWND CreateDialogAlt(HINSTANCE hinst, USHORT id, HWND hwndParent, DLGPROC dialogFunc, LPARAM initParam = 0); 22 22 23 HBITMAP LoadBitmapAlt(HINSTANCE hinst, USHORT id); 24 23 25 struct IconDeleter 24 26 { -
branches/egtra/ab5.0/abdev/abdev/ParameterHint.cpp
r713 r795 1096 1096 HBITMAP hBmp,hOldBmp; 1097 1097 HDC memdc; 1098 hBmp =(HBITMAP)LoadImage(hResInst,MAKEINTRESOURCE(IDB_PARAMHINT_QUESTION),IMAGE_BITMAP,0,0,LR_DEFAULTSIZE);1098 hBmp = ActiveBasic::Resource::LoadBitmapAlt(hResInst, IDB_PARAMHINT_QUESTION); 1099 1099 memdc=CreateCompatibleDC(hdc); 1100 1100 hOldBmp=(HBITMAP)SelectObject(memdc,hBmp); … … 1119 1119 hdc=GetDC(hwnd); 1120 1120 1121 hBmp =(HBITMAP)LoadImage(hResInst,MAKEINTRESOURCE(IDB_PARAMHINT_QUESTION2),IMAGE_BITMAP,0,0,LR_DEFAULTSIZE);1121 hBmp = ActiveBasic::Resource::LoadBitmapAlt(hResInst,IDB_PARAMHINT_QUESTION2); 1122 1122 memdc=CreateCompatibleDC(hdc); 1123 1123 hOldBmp=(HBITMAP)SelectObject(memdc,hBmp); … … 1137 1137 hdc=GetDC(hwnd); 1138 1138 1139 hBmp =(HBITMAP)LoadImage(hResInst,MAKEINTRESOURCE(IDB_PARAMHINT_QUESTION),IMAGE_BITMAP,0,0,LR_DEFAULTSIZE);1139 hBmp = ActiveBasic::Resource::LoadBitmapAlt(hResInst, IDB_PARAMHINT_QUESTION); 1140 1140 memdc=CreateCompatibleDC(hdc); 1141 1141 hOldBmp=(HBITMAP)SelectObject(memdc,hBmp);
Note:
See TracChangeset
for help on using the changeset viewer.