Click here to Skip to main content
15,913,487 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionForce Closing of a Module Pin
Bram van Kampen9-Jun-07 9:37
Bram van Kampen9-Jun-07 9:37 
AnswerRe: Force Closing of a Module Pin
Perspx9-Jun-07 13:26
Perspx9-Jun-07 13:26 
AnswerRe: Force Closing of a Module Pin
Mark Salsbery9-Jun-07 14:21
Mark Salsbery9-Jun-07 14:21 
GeneralRe: Force Closing of a Module Pin
Bram van Kampen10-Jun-07 3:17
Bram van Kampen10-Jun-07 3:17 
QuestionAfxGetApp()->LoadStandardIcon but no Icon!! Pin
mercenary019-Jun-07 8:12
mercenary019-Jun-07 8:12 
AnswerRe: AfxGetApp()->LoadStandardIcon but no Icon!! Pin
Mark Salsbery9-Jun-07 8:28
Mark Salsbery9-Jun-07 8:28 
GeneralRe: AfxGetApp()->LoadStandardIcon but no Icon!! Pin
mercenary019-Jun-07 16:49
mercenary019-Jun-07 16:49 
GeneralRe: AfxGetApp()->LoadStandardIcon but no Icon!! Pin
Mark Salsbery9-Jun-07 18:35
Mark Salsbery9-Jun-07 18:35 
I'm not sure how you are using LoadStandardIcon() in CFrameWnd::Create(). None of the Create()
parameters take an HICON.

Regardless, LoadStandardIcon() loads system icons. To load an icon from your app's resources
you need to load them yourself.

Here's one way to change a window's icon after it has been created:
if (MyFrameWnd.Create(NULL, "windows",........))
{
   HICON hIcon = AfxGetApp()->LoadIcon(IDI_SIMLEY);
   MyFrameWnd.SetIcon(hIcon, TRUE); // Set the window's 32x32 icon.  Use FALSE to set the window's 16x16 icon
}

Another method is to use a custom window class instead of the default MFC window class and
specify an HICON in that window class. A window created using that windowclass will use that
icon by default.

Mark


"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder

Questionresetting pagefaults Pin
JimmyRopes9-Jun-07 7:42
professionalJimmyRopes9-Jun-07 7:42 
QuestionExporting a function to DLL Pin
Cyrilix9-Jun-07 7:08
Cyrilix9-Jun-07 7:08 
AnswerRe: Exporting a function to DLL Pin
karle9-Jun-07 7:23
karle9-Jun-07 7:23 
GeneralRe: Exporting a function to DLL Pin
Cyrilix9-Jun-07 7:31
Cyrilix9-Jun-07 7:31 
AnswerRe: Exporting a function to DLL Pin
Mark Salsbery9-Jun-07 8:16
Mark Salsbery9-Jun-07 8:16 
GeneralRe: Exporting a function to DLL Pin
Cyrilix9-Jun-07 10:00
Cyrilix9-Jun-07 10:00 
QuestionAddString to combobox problem Pin
Max++9-Jun-07 6:53
Max++9-Jun-07 6:53 
AnswerRe: AddString to combobox problem Pin
Mark Salsbery9-Jun-07 8:22
Mark Salsbery9-Jun-07 8:22 
Questiongetting com port listing! Pin
Leo_13319-Jun-07 3:27
Leo_13319-Jun-07 3:27 
AnswerRe: getting com port listing! Pin
rp_suman9-Jun-07 4:20
rp_suman9-Jun-07 4:20 
QuestionRe: getting com port listing! Pin
David Crow9-Jun-07 6:36
David Crow9-Jun-07 6:36 
QuestionHow open winword file in VC++ Pin
Y_Kaushik9-Jun-07 2:22
Y_Kaushik9-Jun-07 2:22 
AnswerRe: How open winword file in VC++ Pin
Matthew Faithfull9-Jun-07 2:58
Matthew Faithfull9-Jun-07 2:58 
QuestionWhen saving .doc file it can not take more then 100-120 words Pin
Y_Kaushik9-Jun-07 1:27
Y_Kaushik9-Jun-07 1:27 
QuestionRe: When saving .doc file it can not take more then 100-120 words Pin
David Crow9-Jun-07 6:38
David Crow9-Jun-07 6:38 
QuestionCustom control on dialog window. Pin
uToLs9-Jun-07 1:24
uToLs9-Jun-07 1:24 
AnswerRe: Custom control on dialog window. Pin
karle9-Jun-07 6:22
karle9-Jun-07 6:22 

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.