Click here to Skip to main content
15,888,208 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Util to fill disk? Pin
l a u r e n26-Feb-04 21:28
l a u r e n26-Feb-04 21:28 
GeneralRe: Util to fill disk? Pin
Prakash Nadar26-Feb-04 21:36
Prakash Nadar26-Feb-04 21:36 
AnswerRe: Util to fill disk? Pin
David Crow27-Feb-04 5:41
David Crow27-Feb-04 5:41 
GeneralOracle CLOB Pin
nlecren26-Feb-04 18:21
nlecren26-Feb-04 18:21 
GeneralRe: Oracle CLOB Pin
l a u r e n26-Feb-04 21:17
l a u r e n26-Feb-04 21:17 
GeneralMaking Static Control transparent Pin
User 21559726-Feb-04 18:07
User 21559726-Feb-04 18:07 
GeneralPlatform SDK: January 2004 Edition Pin
Robert Buldoc26-Feb-04 17:54
Robert Buldoc26-Feb-04 17:54 
GeneralCombine two icons Pin
mjvalan26-Feb-04 17:51
mjvalan26-Feb-04 17:51 
Hai,
I am ving two icon handles, and want to combine them. So that one will be the overlay over the another. I tried with the following code, but it is not displaying properly. Any other solutions?

HICON CAutoDocuFileDlg::CombineIcons(HICON topIcon,HICON bottomIcon)
{// begin CombineIcons
ICONINFO newIcon;
newIcon.fIcon = true;
HDC screenDC = ::GetDC(NULL);
HDC iconDC = CreateCompatibleDC(screenDC);
HDC maskDC = CreateCompatibleDC(screenDC);
newIcon.hbmColor = CreateCompatibleBitmap(screenDC,16,16);
newIcon.hbmMask = CreateCompatibleBitmap(maskDC,16,16);
HGDIOBJ oldIconDC = ::SelectObject(iconDC,newIcon.hbmColor);
HGDIOBJ oldMaskDC = ::SelectObject(maskDC,newIcon.hbmMask);
BitBlt(iconDC,0,0,16,16,NULL,0,0,BLACKNESS);
BitBlt(maskDC,0,0,16,16,NULL,0,0,WHITENESS);

DrawIconEx(iconDC,0,0,topIcon,16,16,NULL,NULL,DI_
IMAGE);
BitBlt(iconDC,0,0,16,16,NULL,0,0,DSTINVERT); //
DrawIconEx(maskDC,0,0,topIcon,16,16,NULL,NULL,DI_
MASK);
DrawIconEx(iconDC,0,0,bottomIcon,16,16,NULL,NULL,
DI_NORMAL);
BitBlt(iconDC,0,0,16,16,NULL,0,0,DSTINVERT);
DrawIconEx(maskDC,0,0,bottomIcon,16,16,NULL,NULL,
DI_MASK);
BitBlt(maskDC,0,0,16,16,NULL,0,0,DSTINVERT);

::SelectObject(iconDC,oldIconDC);
::SelectObject(maskDC,oldMaskDC);
HICON newFileIcon = CreateIconIndirect(&newIcon);
::ReleaseDC(NULL,screenDC);
DeleteDC(maskDC);
DeleteDC(iconDC);
DeleteObject(newIcon.hbmColor);
DeleteObject(newIcon.hbmMask);
DeleteObject(oldIconDC);
DeleteObject(oldMaskDC);
return newFileIcon;
}// end CombineIcons

Generalrun BindToRecordset error: IDispatch error #3105 Pin
lynhoo26-Feb-04 15:16
lynhoo26-Feb-04 15:16 
GeneralCMultiColumnComboBox Help Pin
DougW4826-Feb-04 15:03
DougW4826-Feb-04 15:03 
GeneralOnCtlColor Pin
alex.barylski26-Feb-04 15:01
alex.barylski26-Feb-04 15:01 
GeneralRe: OnCtlColor Pin
Prakash Nadar26-Feb-04 17:18
Prakash Nadar26-Feb-04 17:18 
GeneralRe: OnCtlColor Pin
alex.barylski26-Feb-04 21:23
alex.barylski26-Feb-04 21:23 
GeneralRe: OnCtlColor Pin
Prakash Nadar26-Feb-04 21:34
Prakash Nadar26-Feb-04 21:34 
GeneralRe: OnCtlColor Pin
Selvam R26-Feb-04 19:46
professionalSelvam R26-Feb-04 19:46 
GeneralOdd memory leak cleans self upon window minimization Pin
extremestan26-Feb-04 11:03
extremestan26-Feb-04 11:03 
GeneralRe: Odd memory leak cleans self upon window minimization Pin
l a u r e n26-Feb-04 21:26
l a u r e n26-Feb-04 21:26 
GeneralRe: Odd memory leak cleans self upon window minimization Pin
David Crow27-Feb-04 5:43
David Crow27-Feb-04 5:43 
GeneralRe: Odd memory leak cleans self upon window minimization Pin
Member 101882314-Apr-04 23:18
Member 101882314-Apr-04 23:18 
GeneralRe: Odd memory leak cleans self upon window minimization Pin
Member 101882315-Apr-04 0:39
Member 101882315-Apr-04 0:39 
Generalcolored lines in console Pin
oOomen26-Feb-04 10:19
oOomen26-Feb-04 10:19 
GeneralRe: colored lines in console Pin
Selvam R26-Feb-04 18:53
professionalSelvam R26-Feb-04 18:53 
GeneralExtractAssociatedIcon() Pin
T1TAN26-Feb-04 10:16
T1TAN26-Feb-04 10:16 
GeneralBitmap and Text on the same line inside CRichEditCtrl Pin
Chulips26-Feb-04 9:39
Chulips26-Feb-04 9:39 
GeneralRe: Bitmap and Text on the same line inside CRichEditCtrl Pin
Selvam R26-Feb-04 19:37
professionalSelvam R26-Feb-04 19:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.