?
Solved

creating an icon

Posted on 2001-06-22
6
Medium Priority
?
248 Views
Last Modified: 2006-11-17
Hi,
  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.
thanks
0
Comment
Question by:samsuni
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 2

Expert Comment

by:pesst
ID: 6220615
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
0
 
LVL 2

Expert Comment

by:pesst
ID: 6220620
sorry, that actual icon will be something like icon1.ico

the resource script will be somthing.rc

0
 
LVL 14

Expert Comment

by:AlexVirochovsky
ID: 6221035
You must use CreateIcon API. Description
CreateIcon      

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
   );    
 

Parameters

hInstance

Identifies the instance of the module creating the icon.

nWidth

Specifies the width, in pixels, of the icon.

nHeight

Specifies the height, in pixels, of the icon.

cPlanes

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

cBitsPixel

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

lpbANDbits

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

lpbXORbits

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.

Remarks

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.



0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 1

Expert Comment

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

0
 
LVL 14

Accepted Solution

by:
AlexVirochovsky earned 300 total points
ID: 6262001
I hope, my comment helps you. Alex
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6883868
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.
http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
 
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.
http://www.experts-exchange.com/questions/Q.20277023.html


To view your locked questions, please click the following link(s) and evaluate the proposed answer.
http://www.experts-exchange.com/questions/Q.11674378.html
http://www.experts-exchange.com/questions/Q.20140440.html

PLEASE DO NOT AWARD THE POINTS TO ME.  
 
------------>  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.
 
Moondancer
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.
0

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question