Click here to Skip to main content
15,914,608 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Hungar Convention/Norm/Method Pin
Carlos Antollini13-Dec-01 6:34
Carlos Antollini13-Dec-01 6:34 
GeneralCoInitializeEx ( ) Pin
Tim Rymer13-Dec-01 4:14
Tim Rymer13-Dec-01 4:14 
GeneralRe: CoInitializeEx ( ) Pin
Chen Venkataraman13-Dec-01 4:24
Chen Venkataraman13-Dec-01 4:24 
GeneralRe: CoInitializeEx ( ) Pin
Tim Rymer13-Dec-01 4:31
Tim Rymer13-Dec-01 4:31 
GeneralRe: CoInitializeEx ( ) Pin
Chen Venkataraman13-Dec-01 4:41
Chen Venkataraman13-Dec-01 4:41 
GeneralThousand seperator Pin
User 988513-Dec-01 4:03
User 988513-Dec-01 4:03 
GeneralRe: Thousand seperator Pin
13-Dec-01 4:14
suss13-Dec-01 4:14 
GeneralHICON in extension DLL Pin
GurGur13-Dec-01 3:43
GurGur13-Dec-01 3:43 
Hi,

I saw that the code below didn't work in order to get a HBITMAP in an extension DLL:

// Set a bitmap for a button
m_pbSample.SetBitmap(LoadBitmap(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDB_SAMPLE)));

I found another method for that and it works:

CBitmap bmSample;
VERIFY(bmSample.LoadBitmap(IDB_SAMPLE));
// Set a bitmap for a button
m_pbSample.SetBitmap((HBITMAP)bmSample.Detach());

Now, I would like to do the same for an icon in extension DLL. Assume that I have an icon in the DLL resource named IDC_SAMPLE.

How can I get an HICON for that? I need this to change the icon in the title bar of a dialog.

HICON hiconSample;

// ???

SetIcon(hiconSample, FALSE);
SetIcon(hiconSample, TRUE);

Thanks....
GeneralChange the screensaver from a program... Pin
Anders Molin13-Dec-01 2:37
professionalAnders Molin13-Dec-01 2:37 
GeneralWinXP dialog fonts for VC++5 apps Pin
Steve Kearon13-Dec-01 1:53
Steve Kearon13-Dec-01 1:53 
GeneralRe: WinXP dialog fonts for VC++5 apps Pin
Michael Dunn13-Dec-01 7:42
sitebuilderMichael Dunn13-Dec-01 7:42 
Generalchar to integer Pin
12-Dec-01 20:16
suss12-Dec-01 20:16 
GeneralRe: char to integer Pin
NormDroid13-Dec-01 1:54
professionalNormDroid13-Dec-01 1:54 
GeneralRe: char to integer Pin
Tim Smith13-Dec-01 1:59
Tim Smith13-Dec-01 1:59 
GeneralRe: char to integer Pin
NormDroid13-Dec-01 2:39
professionalNormDroid13-Dec-01 2:39 
GeneralRe: char to integer Pin
NormDroid13-Dec-01 2:39
professionalNormDroid13-Dec-01 2:39 
QuestionSystem Idle Time? Pin
12-Dec-01 17:10
suss12-Dec-01 17:10 
AnswerRe: System Idle Time? Pin
Erik Funkenbusch12-Dec-01 17:46
Erik Funkenbusch12-Dec-01 17:46 
GeneralATL Com+ C++ IObjectControl Questions Pin
WhiteKnight12-Dec-01 14:57
WhiteKnight12-Dec-01 14:57 
GeneralCToolBarCtl problem Pin
12-Dec-01 14:25
suss12-Dec-01 14:25 
GeneralCTabCrl question Pin
Dor12-Dec-01 13:49
Dor12-Dec-01 13:49 
GeneralRe: CTabCrl question Pin
PJ Arends15-Dec-01 13:36
professionalPJ Arends15-Dec-01 13:36 
GeneralOpenGL Weirdness Pin
Rick York12-Dec-01 12:41
mveRick York12-Dec-01 12:41 
GeneralRe: OpenGL Weirdness Pin
Rick York13-Dec-01 10:24
mveRick York13-Dec-01 10:24 
GeneralXP visual style, MFC toolbar Pin
scpierre12-Dec-01 11:39
scpierre12-Dec-01 11:39 

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.