[GME-commit] GMESRC/GME/MgaDecorators BitmapUtil.cpp,1.5,1.6
gme-commit at list.isis.vanderbilt.edu
gme-commit at list.isis.vanderbilt.edu
Mon Sep 12 20:09:49 CDT 2005
Update of /project/gme-repository/GMESRC/GME/MgaDecorators
In directory escher:/tmp/cvs-serv22833
Modified Files:
BitmapUtil.cpp
Log Message:
Improved (thanks to Peter).
CVS User: Zoltan Molnar, ISIS (zolmol)
Index: BitmapUtil.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/MgaDecorators/BitmapUtil.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** BitmapUtil.cpp 12 Sep 2005 18:26:24 -0000 1.5
--- BitmapUtil.cpp 12 Sep 2005 19:09:47 -0000 1.6
***************
*** 481,493 ****
void BitmapRES::load( UINT uiID )
{
! // load a GDI CBitmap from the resources
! CBitmap gdiBitmap;
! if ( ! gdiBitmap.LoadBitmap( uiID ) ) {
! return;
! }
!
! // create a GDI+ Bitmap from the CBitmap
! m_pBitmap = new Bitmap( (HBITMAP) gdiBitmap, (HPALETTE) CPalette());
if( !m_pBitmap) {
return;
}
--- 481,488 ----
void BitmapRES::load( UINT uiID )
{
! // create a GDI+ Bitmap from the resource
! m_pBitmap = new Bitmap( ::AfxGetInstanceHandle(), (WCHAR*) MAKEINTRESOURCE( uiID));
if( !m_pBitmap) {
+ m_pBitmap = NULL;
return;
}
More information about the GME-commit
mailing list