Das mit den Bitmap's mache ich folgendermaßen:
for( index = 0 ; index < 24 ; index ++ )
{
if( aicConfig [index] & (1 << ioOn) )
{
CStatic *OnOff = new CStatic ;
OnOff -> Create ("Test", WS_TABSTOP | WS_CHILD | SS_BITMAP | SS_NOTIFY | WS_VISIBLE, CRect (32, 30 + (25 * index), 50, 48 + (25 * index)), this, ainOnOff + index) ;
HBITMAP hbmp =:: LoadBitmap(AfxGetInstanceHandle (), "IDB_LED_GN_ON_DOWN") ;
OnOff -> SetBitmap (hbmp) ;
}
else
{
CStatic *OnOff = new CStatic ;
OnOff -> Create ("Test", WS_CHILD | SS_BITMAP | WS_VISIBLE, CRect (32, 30 + (25 * index), 50, 48 + (25 * index)), this, ainOnOff + index) ;
HBITMAP hbmp =:: LoadBitmap(AfxGetInstanceHandle (), "IDB_LED_GR_ON_UP") ;
OnOff -> SetBitmap (hbmp) ;
}
}
Müsste doch eigentlich so ... ?
Gruß und Schönes Wochenende