|
Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
c++.windows.32-bits - LoadBitmap
I'm having trouble with LoadBitmap when used to register a brush in the
window class.
when I run the program in WinMe, Win 98, NT everything works fine
when I run in Win95 The bitmap loads as a large black blob.
The bitmap is mostly black.
I tried changing over to LoadResource with the same arguments but then it
did not load anything...
I'm confused as I recall reading something about this problem in one of my
books but I can't track it down.
if ((hLibrary = LoadLibrary (TEXT ("graph.dll"))) != NULL)
{
hBitmap=LoadBitmap (hLibrary, MAKEINTRESOURCE (IDB_BITMAP1));
}
hBrush=CreatePatternBrush (hBitmap);
DeleteObject (hBitmap);
wndclass.style = CS_HREDRAW | CS_VREDRAW ;
wndclass.lpfnWndProc = WndProc ;
wndclass.cbClsExtra = 0 ;
wndclass.cbWndExtra = 0 ;
wndclass.hInstance = hInstance ;
wndclass.hIcon = LoadIcon (hInstance, MAKEINTRESOURCE
(IDI_ICON1)) ;
wndclass.hCursor = LoadCursor (hInstance, MAKEINTRESOURCE
(IDC_CURSOR1)) ;
wndclass.hbrBackground = hBrush;
wndclass.lpszMenuName = szAppName ;
wndclass.lpszClassName = szAppName ;
if (!RegisterClass (&wndclass))
Thanks
Steve De Chellis
Jun 20 2002
|