Click here to Skip to main content
16,006,440 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Finding the EOF!!! Pin
sunit526-Dec-05 20:22
sunit526-Dec-05 20:22 
QuestionDirectShow: Getting the window handle of a panel Pin
Ramow26-Dec-05 5:17
Ramow26-Dec-05 5:17 
AnswerRe: DirectShow: Getting the window handle of a panel Pin
KifayatullahKhan26-Dec-05 18:28
KifayatullahKhan26-Dec-05 18:28 
QuestionGetting started with RegEx ? Pin
Mark F.26-Dec-05 3:55
Mark F.26-Dec-05 3:55 
AnswerRe: Getting started with RegEx ? Pin
khan++26-Dec-05 4:15
khan++26-Dec-05 4:15 
GeneralRe: Getting started with RegEx ? Pin
Mark F.26-Dec-05 4:34
Mark F.26-Dec-05 4:34 
QuestionDrawIcon in MFC Pin
inf00926-Dec-05 3:17
inf00926-Dec-05 3:17 
AnswerRe: DrawIcon in MFC Pin
khan++26-Dec-05 3:42
khan++26-Dec-05 3:42 
I think the icon doesn't work in OnInitDialog because the dialog is painted again, so the icon disappears very quickly.

You can put the icon-drawing code in OnPaint().
OnPaint()<br />
if (IsIconic())<br />
{<br />
//whatever code.<br />
}<br />
else<br />
{<br />
//These lines should do it.<br />
CPaintDC dc(this);<br />
HICON hi = AfxGetApp()->LoadStandardIcon(MAKEINTRESOURCE(IDI_INFORMATION));<br />
dc.DrawIcon(10,10,hi);<br />
CDialog::OnPaint();<br />
}


About your last question, if you want a static icon on the dialog, you can put a picture control on it, and set the property: "type" to "Icon" and the "Image" to whatever icon you have in the project.


this is this.
GeneralRe: DrawIcon in MFC Pin
inf00929-Dec-05 6:33
inf00929-Dec-05 6:33 
QuestionDialog creation fails using excel addin in Visual C++ .Net but works with VC 6.0 Pin
Mayank Ji26-Dec-05 2:05
Mayank Ji26-Dec-05 2:05 
QuestionDBPROP_IMMOBILEROWS Pin
ArielR26-Dec-05 1:55
ArielR26-Dec-05 1:55 
QuestionFormatMessage,COM,MFC Pin
MandiraT26-Dec-05 0:27
MandiraT26-Dec-05 0:27 
AnswerRe: FormatMessage,COM,MFC Pin
khan++26-Dec-05 0:46
khan++26-Dec-05 0:46 
GeneralRe: FormatMessage,COM,MFC Pin
MandiraT26-Dec-05 1:07
MandiraT26-Dec-05 1:07 
GeneralRe: FormatMessage,COM,MFC Pin
khan++26-Dec-05 2:20
khan++26-Dec-05 2:20 
QuestionSetting text in a control window of another app Pin
Still learning how to code26-Dec-05 0:16
Still learning how to code26-Dec-05 0:16 
AnswerRe: Setting text in a control window of another app Pin
khan++26-Dec-05 0:28
khan++26-Dec-05 0:28 
GeneralRe: Setting text in a control window of another app Pin
Still learning how to code26-Dec-05 1:58
Still learning how to code26-Dec-05 1:58 
GeneralRe: Setting text in a control window of another app Pin
vipinasda26-Dec-05 5:30
vipinasda26-Dec-05 5:30 
GeneralRe: Setting text in a control window of another app Pin
Still learning how to code26-Dec-05 11:07
Still learning how to code26-Dec-05 11:07 
QuestionHow to Hide in Trayicon..... Pin
jakib25-Dec-05 23:55
jakib25-Dec-05 23:55 
AnswerRe: How to Hide in Trayicon..... Pin
khan++26-Dec-05 0:00
khan++26-Dec-05 0:00 
AnswerRe: How to Hide in Trayicon..... Pin
vipinasda26-Dec-05 5:32
vipinasda26-Dec-05 5:32 
GeneralRe: How to Hide in Trayicon..... Pin
Owner drawn26-Dec-05 17:52
Owner drawn26-Dec-05 17:52 
GeneralRe: How to Hide in Trayicon..... Pin
ThatsAlok26-Dec-05 19:03
ThatsAlok26-Dec-05 19:03 

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.