Changing Icon Size On A Button - Programmer

This is a discussion on Changing Icon Size On A Button - Programmer ; I am able to put a 32x32 icon on a button. But I can't seem to put a different sized one on. Is there a way to do that (my buttons aren't always 32x32). Matt...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Changing Icon Size On A Button

  1. Changing Icon Size On A Button

    I am able to put a 32x32 icon on a button. But I can't seem to put a
    different sized one on. Is there a way to do that (my buttons aren't
    always 32x32).

    Matt

  2. Re: Changing Icon Size On A Button

    bonmatt10@cs.com (matt) wrote in message news:...
    > I am able to put a 32x32 icon on a button. But I can't seem to put a
    > different sized one on. Is there a way to do that (my buttons aren't
    > always 32x32).
    >
    > Matt

    Use the LoadImage(...) API call. (probably now you are using the LoadIcon(...)).
    Bye. Tininho

  3. Re: Changing Icon Size On A Button

    Can anyone tell why the following code doesn't work?

    HICON hIcon8 = (HICON)
    ::LoadImage(NULL,"icon8.ico",IMAGE_ICON,22,15,LR_LOADFROMFILE);

    ((CButton*)GetDlgItem(IDC_BUTTON8))->SetIcon(hIcon8);

    Also, I made the button in VC++, and I see the button dimensions
    (found in the resource file) has certain diomensions, and the icon I
    made has certain dimensions. Which dimension do I put in the
    LoadImage parameter list? Do I have to somehow edit the button
    picture so that it's size matches the icon size I designed?

    Thanks,

    Matt




    tininho@iol.it (Tininho) wrote in message news:...
    > bonmatt10@cs.com (matt) wrote in message news:...
    > > I am able to put a 32x32 icon on a button. But I can't seem to put a
    > > different sized one on. Is there a way to do that (my buttons aren't
    > > always 32x32).
    > >
    > > Matt

    > Use the LoadImage(...) API call. (probably now you are using the LoadIcon(...)).
    > Bye. Tininho


+ Reply to Thread