• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 252
  • Last Modified:

creating an icon

  I want to create an icon by using vc++. I have no idea about this please somebody tell me. I need step by setp instructions. And where can I find the vc++ tutorial for creating icons.
1 Solution
Go to the Insert -> Resource

then select icon

then you can add an icon or create a new one

save your icon to somthing.rc

after you do that then right click on the resources folder in the file view  and click add files to folder

select the .rc file you just created

compile and thats it
sorry, that actual icon will be something like icon1.ico

the resource script will be somthing.rc

You must use CreateIcon API. Description

The CreateIcon function creates an icon that has the specified size, colors, and bit patterns.

HICON CreateIcon(

    HINSTANCE hInstance,     // handle to application instance
    int nWidth,     // icon width
    int nHeight,     // icon height
    BYTE cPlanes,     // number of planes in XOR bitmask
    BYTE cBitsPixel,     // number of bits per pixel in XOR bitmask
    CONST BYTE *lpbANDbits,     // pointer to AND bitmask array
    CONST BYTE *lpbXORbits      // pointer to XOR bitmask array



Identifies the instance of the module creating the icon.


Specifies the width, in pixels, of the icon.


Specifies the height, in pixels, of the icon.


Specifies the number of planes in the XOR bitmask of the icon.


Specifies the number of bits per pixel in the XOR bitmask of the icon.


Points to an array of bytes that contains the bit values for the AND bitmask of the icon. This bitmask describes a monochrome bitmap.


Points to an array of bytes that contains the bit values for the XOR bitmask of the icon. This bitmask describes a monochrome or device-dependent color bitmap.


Return Values

If the function succeeds, the return value is the handle to an icon.
If the function fails, the return value is NULL. To get extended error information, call GetLastError.


The nWidth and nHeight parameters must specify a width and height supported by the current display driver, because the system cannot create icons of other sizes. To determine the width and height supported by the display driver, use the GetSystemMetrics function, specifying the SM_CXICON or SM_CYICON value.
CreateIcon applies the following truth table to the AND and XOR bitmasks:

AND bitmask     XOR bitmask     Display
0     0     Black
0     1     White
1     0     Screen
1     1     Reverse screen

Ftrom this you see, that you must simple prepare

For this you see, that you must simple prepare
lpbANDbits and lpbXORbits arrays , and use this API.

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

About tutorial. If help files on your VC installed, choose menu
Help -> Search, in Search dialog box type: creating icons.

I hope, my comment helps you. Alex
ADMINISTRATION WILL BE CONTACTING YOU SHORTLY.  Moderators Computer101 or Netminder will return to finalize these if still open in seven days.  Please post closing recommendations before that time.

Question(s) below appears to have been abandoned. Your options are:
1. Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you. You must tell the participants why you wish to do this, and allow for Expert response.
3. Ask Community Support to help split points between participating experts, or just comment here with details and we'll respond with the process.
4. Delete the question. Again, please comment to advise the other participants why you wish to do this.

For special handling needs, please post a zero point question in the link below and include the question QID/link(s) that it regards.
Please click the Help Desk link on the left for Member Guidelines, Member Agreement and the Question/Answer process.  http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp

Please click you Member Profile to view your question history and keep them all current with updates as the collaboration effort continues, to track all your open and locked questions at this site.  If you are an EE Pro user, use the Power Search option to find them.  Anytime you have questions which are LOCKED with a Proposed Answer but does not serve your needs, please reject it and add comments as to why.  In addition, when you do grade the question, if the grade is less than an A, please add a comment as to why.  This helps all involved, as well as future persons who may access this item in the future to seek help.

To view your open questions, please click the following link(s) and keep them all current with updates.

To view your locked questions, please click the following link(s) and evaluate the proposed answer.

------------>  EXPERTS:  Please leave any comments regarding your closing recommendations if this item remains inactive another seven (7) days.  Also, if you are interested in the cleanup effort, please click this link http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=commspt&qid=20274643

Moderators will finalize this question if still open in 7 days, by either moving this to the PAQ (Previously Asked Questions) at zero points, deleting it or awarding expert(s) when recommendations are made, or an independent determination can be made.  Expert input is always appreciated to determine the fair outcome.
Thank you everyone.
Moderator @ Experts Exchange

P.S.  For any year 2000 questions, special attention is needed to ensure the first correct response is awarded, since they are not in the comment date order, but rather in Member ID order.

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now