CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2002
    Posts
    756

    How to make an icon for MSVC project?

    Hi, ALL,
    I'm developing a software for Windows using MSVC 2010.
    My employer sent me 2 png files: 16x16 and 32x32 for the icons.

    What I would like to do is to use them as a MSVC icon resource and don't use any code hacks.
    In the past all I had was an ico file and I just included it in the resource (rc) file for Visual Studio and that was it.

    Now my question is: how do I make one ico file out of those 2 png files that will be accepted by MSVC?
    Is there a tool (preferably free) for it or some online service?

    Thank you.

  2. #2
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    7,822

    Re: How to make an icon for MSVC project?

    If you want to convert png files to ico files, do a google search
    https://www.google.co.uk/search?q=co...BKH80QWrtIHICg

    returns several
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++23 Compiler: Microsoft VS2022 (17.6.5)

  3. #3
    Join Date
    Aug 2002
    Posts
    756

    Re: How to make an icon for MSVC project?

    Hi,
    Quote Originally Posted by 2kaud View Post
    If you want to convert png files to ico files, do a google search
    https://www.google.co.uk/search?q=co...BKH80QWrtIHICg

    returns several
    Yes, I can convert both files to be 2 independent ico files. But then what do I do? How can I make them 1 ico file tht is acceptable by MSVS (2010)?

    Thank you.

  4. #4
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: How to make an icon for MSVC project?

    Quote Originally Posted by OneEyeMan View Post
    Hi,


    Yes, I can convert both files to be 2 independent ico files. But then what do I do? How can I make them 1 ico file tht is acceptable by MSVS (2010)?

    Thank you.
    Add both ico files to the project.
    Open the both icon files in the resource editor.
    Switch to the 16x16 icon file, right click and choose "New Image Type...".
    Select "32 x 32, xxx bit", press OK.
    Switch to the 32x32 icon, press CTRL + A to select the complete icon.
    Press CTRL + C to copy it.
    Switch back to the 16x16 icon and paste it into the new image type.
    Save, remove the 32x32 icon from the project.
    Build the project.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured