From: Todd D. P. <ci...@us...> - 2003-09-24 03:35:27
|
Log Message: ----------- the original IButton type now has an optional "backgroud" parameter which can specify an icon in the same moduile as the press and release images that will get draw underneath them. Modified Files: -------------- /cvsroot/decaldev/source/Inject: Button.cpp Button.h Revision Data ------------- Index: Button.cpp =================================================================== RCS file: /cvsroot/decaldev/source/Inject/Button.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Button.cpp 29 Sep 2001 02:31:07 -0000 1.2 +++ Button.cpp 24 Sep 2003 03:35:24 -0000 1.3 @@ -60,6 +60,7 @@ POINT pt = { 0, 0 }; + if (m_nBackground != 0) pIcons->DrawIcon( &pt, m_nBackground, m_nModule, pCanvas ); pIcons->DrawIcon( &pt, nImage, m_nModule, pCanvas ); _ASSERTMEM( _CrtCheckMemory( ) ); @@ -174,7 +175,8 @@ _variant_t vModule = pElement->getAttribute( _T( "iconlibrary" ) ), vReleased = pElement->getAttribute( _T( "icon" ) ), vPressed = pElement->getAttribute( _T( "pressedicon" ) ), - vMatte = pElement->getAttribute( _T( "matte" ) ); + vMatte = pElement->getAttribute( _T( "matte" ) ), + vBackground = pElement->getAttribute( _T( "background" ) ); if( vModule.vt == VT_BSTR ) pPlugin->LoadResourceModule( vModule.bstrVal, &m_nModule ); @@ -218,6 +220,23 @@ // Type conversion error _ASSERTE( FALSE ); } + } + + if( vBackground.vt != VT_NULL ) + { + try + { + m_nBackground = static_cast< long >( vBackground ) + 0x06000000; + } + catch( ... ) + { + // Type conversion error + _ASSERTE( FALSE ); + } + } + else + { + m_nBackground = 0; } return S_OK; Index: Button.h =================================================================== RCS file: /cvsroot/decaldev/source/Inject/Button.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Button.h 29 Sep 2001 06:24:22 -0000 1.2 +++ Button.h 24 Sep 2003 03:35:24 -0000 1.3 @@ -28,6 +28,7 @@ long m_nModule; long m_nReleased; long m_nPressed; + long m_nBackground; VARIANT_BOOL m_bPressed, m_bMouseIn; |