Click here to Skip to main content
15,929,749 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: About CPU Test Pin
Dominik Reichl22-Aug-03 0:54
Dominik Reichl22-Aug-03 0:54 
Questiondoes multithreading speed up my computation? Pin
Ramesh M21-Aug-03 1:09
Ramesh M21-Aug-03 1:09 
AnswerRe: does multithreading speed up my computation? Pin
ZoogieZork21-Aug-03 1:47
ZoogieZork21-Aug-03 1:47 
AnswerRe: does multithreading speed up my computation? Pin
Dangleberry21-Aug-03 2:15
sussDangleberry21-Aug-03 2:15 
General"wrong" application icon in dialog based application Pin
T.T.H.21-Aug-03 0:45
T.T.H.21-Aug-03 0:45 
GeneralRe: "wrong" application icon in dialog based application Pin
Dangleberry21-Aug-03 2:20
sussDangleberry21-Aug-03 2:20 
GeneralRe: "wrong" application icon in dialog based application Pin
David Crow21-Aug-03 2:48
David Crow21-Aug-03 2:48 
GeneralRe: "wrong" application icon in dialog based application Pin
PJ Arends21-Aug-03 5:15
professionalPJ Arends21-Aug-03 5:15 
This is because CWinApp::LoadIcon will only load the large 32 x 32 pixel icon, and when you call CWnd::SetIcon(m_hIcon, FALSE), the SetIcon() function will shrink the 32 x 32 icon to 16 x 16. The fix is to add another icon member to your dialog class to hold the small icon, use LoadImage() to load it, and set that as your small icon
class CMyDialog : public CDialog
{
protected:
    HICON m_hIcon;
    HICON m_hSmallIcon;
...
};
 
CMyDialog::CMyDialog(...
{
    m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
    m_hSmallIcon = (HICON)LoadImage(AfxGetInstanceHandle(),
                                    MAKEINTRESOURCE(IDR_MAINFRAME),
                                    IMAGE_ICON,
                                    16, 16,
                                    LR_DEFAULTCOLOR);
...
}
 
BOOL CMyDialog::OnInitDialog()
{
...
    SetIcon(m_hIcon, TRUE);    // Set big icon
    SetIcon(m_hSmallIcon, FALSE);  // Set small icon
...
}








Sonork 100.11743 Chicken Little

"You're obviously a superstar." - Christian Graus about me - 12 Feb '03

Within you lies the power for good - Use it!
Generalyes, that's the solution Pin
T.T.H.21-Aug-03 23:26
T.T.H.21-Aug-03 23:26 
Generalforcing the exit of a program Pin
si_6921-Aug-03 0:28
si_6921-Aug-03 0:28 
GeneralRe: forcing the exit of a program Pin
Dominik Reichl21-Aug-03 0:48
Dominik Reichl21-Aug-03 0:48 
GeneralRe: forcing the exit of a program Pin
Branislav21-Aug-03 0:48
Branislav21-Aug-03 0:48 
GeneralRe: forcing the exit of a program Pin
Ryan Binns21-Aug-03 0:54
Ryan Binns21-Aug-03 0:54 
GeneralDisable a page in a property sheet Pin
YaronNir21-Aug-03 0:06
YaronNir21-Aug-03 0:06 
GeneralRe: Disable a page in a property sheet Pin
Branislav21-Aug-03 0:17
Branislav21-Aug-03 0:17 
GeneralRe: Disable a page in a property sheet Pin
YaronNir21-Aug-03 1:04
YaronNir21-Aug-03 1:04 
GeneralRe: Disable a page in a property sheet Pin
G. Steudtel21-Aug-03 0:21
G. Steudtel21-Aug-03 0:21 
GeneralRe: Disable a page in a property sheet Pin
YaronNir21-Aug-03 1:17
YaronNir21-Aug-03 1:17 
GeneralRe: Disable a page in a property sheet Pin
David Crow21-Aug-03 2:54
David Crow21-Aug-03 2:54 
GeneralRe: Disable a page in a property sheet Pin
YaronNir21-Aug-03 3:02
YaronNir21-Aug-03 3:02 
GeneralRe: Disable a page in a property sheet Pin
David Crow21-Aug-03 3:09
David Crow21-Aug-03 3:09 
GeneralRe: Disable a page in a property sheet Pin
YaronNir21-Aug-03 3:14
YaronNir21-Aug-03 3:14 
Generaljavascript ".submit()" from C++ Pin
megaadam21-Aug-03 0:01
professionalmegaadam21-Aug-03 0:01 
Generaldata_seg() Pin
Biped20-Aug-03 23:57
Biped20-Aug-03 23:57 
GeneralRe: data_seg() Pin
Biped20-Aug-03 23:59
Biped20-Aug-03 23:59 

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.