Big icon, small icon, How to 
Author Message
 Big icon, small icon, How to

Hi there,

In a Wizard generated dialog-based MFC application, I find the code in the
OnInitDialog function that sets both large and small icons:
        SetIcon(m_hIcon, TRUE);    // Set big icon
        SetIcon(m_hIcon, FALSE);    // Set small icon
However, it somehow doesn't use the small icon (16x16) designed by myself,
instead, it simply uses the zoomed-out version of the large icon (32x32). In
order to display the small icon, I need to delete the second line above,
that is:
        SetIcon(m_hIcon, FALSE);    // Set small icon
This looks abnormal. Can anyone please explain this to me?

Another silly question is that: how come a single icon file can have several
icons of different sizes?

Thanks in advance!

Lei



Mon, 10 Nov 2003 12:58:50 GMT  
 Big icon, small icon, How to
In resource editor, click one icon. Then in the right pane, you will see
this icon.
Then click the little button next to Device ComboBox, you can create a new
image in this icon.

yhhuang
ICQ:91074870



Mon, 10 Nov 2003 14:39:42 GMT  
 Big icon, small icon, How to
Sorry, this doesn't answer my question at all. I know how to create a new
icon. My question is how come the Wizard generated code doesn't use the
small icon (that has already been created). Thanks for your response anyway.


Quote:
> In resource editor, click one icon. Then in the right pane, you will see
> this icon.
> Then click the little button next to Device ComboBox, you can create a new
> image in this icon.

> yhhuang
> ICQ:91074870



Mon, 10 Nov 2003 15:53:05 GMT  
 Big icon, small icon, How to
try:

m_hSmallIcon = (HICON)::LoadImage( AfxGetResourceHandle(),
MAKEINTRESOURCE( IDI_ICON ), IMAGE_ICON, 16, 16, 0 );

SetIcon( m_hSmallIcon, FALSE );


Quote:
> Hi there,

> In a Wizard generated dialog-based MFC application, I find the code in the
> OnInitDialog function that sets both large and small icons:
>         SetIcon(m_hIcon, TRUE);    // Set big icon
>         SetIcon(m_hIcon, FALSE);    // Set small icon
> However, it somehow doesn't use the small icon (16x16) designed by myself,
> instead, it simply uses the zoomed-out version of the large icon (32x32).
In
> order to display the small icon, I need to delete the second line above,
> that is:
>         SetIcon(m_hIcon, FALSE);    // Set small icon
> This looks abnormal. Can anyone please explain this to me?

> Another silly question is that: how come a single icon file can have
several
> icons of different sizes?

> Thanks in advance!

> Lei



Mon, 10 Nov 2003 16:50:28 GMT  
 Big icon, small icon, How to
Try REMming out the small icon load.  I recall having this same problem
(I think that's what I did).


: Hi there,
:
: In a Wizard generated dialog-based MFC application, I find the code in
the
: OnInitDialog function that sets both large and small icons:
:         SetIcon(m_hIcon, TRUE);    // Set big icon
:         SetIcon(m_hIcon, FALSE);    // Set small icon
: However, it somehow doesn't use the small icon (16x16) designed by
myself,
: instead, it simply uses the zoomed-out version of the large icon
(32x32). In
: order to display the small icon, I need to delete the second line
above,
: that is:
:         SetIcon(m_hIcon, FALSE);    // Set small icon
: This looks abnormal. Can anyone please explain this to me?
:
: Another silly question is that: how come a single icon file can have
several
: icons of different sizes?
:
: Thanks in advance!
:
: Lei
:
:
:



Tue, 11 Nov 2003 04:59:31 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. big icons and little icons...

2. How to set a small icon and large icon to a dialog-base app

3. Bug: List View Large Icon is small Icon

4. System Tray Icon bigger than 16x16

5. bigger icons in system tray

6. System Tray Icon bigger than 16x16

7. Draw Small Icon

8. Small Icon Problems

9. small file icon

10. small icon in title bar - need help in changing

11. Small icon in the status bar

12. Changing default 'small icon'

 

 
Powered by phpBB® Forum Software