Dev C%2b%2b Add Icon To Exe

Dev C%2b%2b Add Icon To Exe Rating: 3,6/5 6252 votes

C Qt 132 - Windows Application Icon and UAC Admin Rights. How to Create Setup.exe for the Deployment of Qt. C Qt 133 - High Performance TCP Server Design Part 2 - Duration. Add your CPP file(s) to the 'Source Files' folder. The folder is in the Solution Explorer. You can drag them there from another window. Rename the main CPP file (the one that contains 'int main') to the name of the project that you chose if it's not already the same. If you have any.H files, add them to the 'Header Files' directory. Oct 05, 2011 on the user side, on the windows desktop, you can associate any icon file or any icon embedded into an existing exe or dll. On the programming side, add a ressource file and put an icon element into. First go to Resource View (from menu: View - Other Window - Resource View). Then in Resource View navigate through resources, if any. If there is already a resource of Icon type, added by Visual Studio, then open and edit it. Otherwise right-click and select Add Resource, and then add a new icon. Use the embedded image editor in order to edit the existing or new icon.

How to Install Dev-C++ and the GLUT Libraries
for Compiling OpenGL Programs with ANSI C

(version of July 16, 2009)

These notes explain how to compile programs written in ANSI C with OpenGL and GLUT using the Dev-C++ compiler.

Bloodshed Dev-C++ is a free C++ compiler and development environment for Windows operating systems. Like most C++ compilers, it also can be used to compile ANSI C. By installing the GLUT header and library files, it can be used to write programs that use OpenGL. This is needed to run programs for Edward Angel's textbook, Interactive Computer Graphics 5th edition and possibly other computer graphics texts.

These notes do not explain how to compile OpenGL with C++ . The 6th edition of Angel's book uses C++ which will not work with these notes.

These instructions have been tested on a small variety of Windows 2000 and Windows XP systems. These systems come with the files needed for OpenGL, but not the files needed for GLUT.

Dev-C++ does not work well with Microsoft's Vista. The problem, and a possible fix, is discussed here: http://aresio.blogspot.com/2007/06/vista-and-dev-cpp.html but I have not tested this information.

I. Download Dev-C++ from http://www.bloodshed.net/dev/devcpp.html and install it.

Details:

Get Dev-C++ 5.0 beta 9.2 (4.9.9.2) (9.0 MB) with Mingw/GCC 3.4.2 Although this is a 'beta' version, it works perfectly fine. Click on SourceForge to go to a list of download sites and pick one. The file will be something like devcpp4.9.9.2_setup.exe. Save this file in a place like C:Temp.

When the download is complete, click on the 'open' button to start the installation process. (Or go to C:Temp andDouble click on devcpp4.9.9.2_setup.exe). You will see a few screens that ask you to pick a language (English) and to agree to the license terms. Choose a 'typical' installation.

Accept the suggested destination for the installation:

Many subdirectories and files are extracted to the destintion:

Answer 'yes' when it asks if you wish to install Dev-cpp for all users. Note: if the installation fails, re-install and try 'no' for this.

A screen says the installation is complete:

Keep the check mark in the box. Click on 'Finish'. A first-time configuration screen appears:

Pick 'English' and 'New Look'. In the next several screens, hit 'Yes' for its suggestions.

Eventually you are done. Click 'OK'.

II. DEV-C++ starts up. Try out the installation with a simple C program.

Details:

The program starts up automatically.

Click File/New/Project. Pick a name for the project (such as 'myProject'). Click 'C Project'. Click on 'Empty Project'. Click 'OK'.

In 'Create New Project', click 'save' (later on you will probably want to create separate subdirectories for your various projects.).

Click 'File/New/Source File' and in 'Add source file to current project' click 'Yes'. You now get a screen where you can edit the source file.

Type in a simple C program, as below. Now click 'File/Save As' and save the file as 'hello.c' (or other name.) Important: be sure that the file extension is .c. With any other extension (such as the suggested .cpp) you will have problems compiling.

Now click 'Execute/Compile and Run'

The program will (hopefully) compile, run, and write its output to a DOS window. If you have the system('pause') statement in your program, the output will stay in the window until you hit a key. Another way to run the program (after it has been compiled) is to start a DOS window outside of the Dev-Cpp system, then navigate to the subdirectory that holds your project, and type hello.exe.

At this point, the compiler and development environment has been installed. You should find Dev-C++ listed under 'Programs' on the 'Start' menu and will now be able to write, compile, and run C (and C++) programs. You will have include files, libraries, and dll's for OpenGL (and all other standard packages) but not GLUT. GLUT manages the windows and other user interface components needed for OpenGL programming, and needs to be separately installed.

If you do not need GLUT , you can quit now.

III. Download and install GLUT

To run OpenGL with GLUT (which is what the programs in Angel's book use), you need to get three files and place each file in its proper directory. All the files you need (and more) are contained in one zip file.

Details:

Download GLUT files from http://chortle.ccsu.edu/Bloodshed/glutming.zip Download the file glutming.zip Save the zip file in some convenient location (perhaps C:temp).

Double click on glutming.zip (or otherwise unzip it). You will see the files that are in the zip archive. (Your un-zipping program will probably be diferent than the one shown here, but should work about the same.)

Click on 'Extract' to extract all the subdirectories and files. Pick some convenient directory to extract them to (perhaps C:tempglutming). You only need three files, but extract all of them anyway.

Dev C 2b 2b Add Icon To Exe Windows 10

Only three of the files in the various subdirectories are needed. Each of the three files should be put in a subdirectory with other files of its type. Use Explorer to move the files to where they are needed.

Note: If you only see some of these files listed in Explorer, click on 'View/Options/View' and then select the radio button 'Show all Files'.

glut.h -- copy this file to C:Dev-CppincludeGL

Copy from your 'unzipped' subdirectories (wherever they are):

To here:

libglut32.a -- copy this file from your unzipped directories to C:Dev-Cpplib

There may be a newer version of this file there, already. Replace that version with the one you unzipped (if you keep the newer version your programs will not link correctly.)

Copy from your 'unzipped' subdirectories:

To here:

glut32.dll -- move this file to C:WINNTSystem32, or similar location.

The location for this file depends on your operating system. The directory where it goes is the directory that holds the dynamic load libraries (*.dll). An easy way to find where it should go is to look for glu32.dll (use 'Search' from the start menu).

The directory to use should also have the files glu32.dll and opengl32.dll. These should have come with your operating system.

IV. Test Dev-cpp with GLUT

The essential step in compiling and running a C program that contains OpenGL and GLUT functions is to tell the linker where the libraries are. This is done by clicking Project/Project Options/Parameters/Add Library or Options and then navigating to the libraries you need to include: libopengl32.a, libglu32.a, and libglut32.a. The libraries should be added in that order.

Details:

a. Create a subdirectory for a project. Do this first, before you start Dev-Cpp. Create a new subdirectory with 'Explorer' by clicking 'File/New/Folder'.

For example, create a folder C:GLproject.

b. Start Dev-cpp:

c. Start a new project by clicking File/New/Project. In the panel that pops up, name the project something like 'rectangle', click on 'empty project' and 'C': Click OK.

Note: For compiling with OpenGL you must create a project. You need to have a project (not just a single C file) in order to link in the OpenGL libraries.

d. In the next panel, navigate to your folder C:GLproject, and click 'Save'.

e. In Dev-C++, click 'File/New/Source File' and then in the next panel 'Add to Project' click 'yes'. Click 'File/Save As' and then give the file a name. Navigate to your project subdirectory to save the file in it. Name the file something like 'rectangle.c'

Be sure that the file names ends with '.c' anything else will cause big problems.

f. Click and drag your mouse over the following program so that it is highlighted, then click 'Edit/Copy' from the browser's menu bar.

g. Now click in the editing window of Dev-cpp and then click 'Edit/Paste' in its menu bar. The program will appear in the editing window.

h. Click 'File/Save'. The file in your project directory should now contain an OpenGL program.

i. Tell Dev-cpp what libraries need to be linked. Click 'Project/Project Options'.

j. Now click 'Parameters'. Click the 'Add Library or Object' button and navigate to the libraries that should be added, found under C:Dev-cpplib

  • ./lib/libopengl32.a
  • ./lib/libglu32.a
  • ./lib/libglut32.a

Add them in that order (only). Notice that the slashes will appear in Unix style '/' rather than DOS-style '.

When you are done adding the three libaries, you should see:

The exact pattern of '././.' you see depends on how deep in the directory structure your source file lies.

Click 'OK'.

k. Click 'Execute/Compile and Run'. The program should compile, link, and run:

If things don't work (very common) click on the 'Compile Log' tab for some confusing error messages. If you see something like the following, it means that you made a mistake in adding the libraries to the project:

Try to fix the list of libraries, or perhaps start over from scratch.

You now are finished, or have given up.

-->

You can create a new image, bitmap, icon, cursor, or toolbar, and then use the Image Editor to customize its appearance. You can also create a new bitmap patterned after a resource template.

Icons and Cursors: Image Resources for Display Devices

Icons and cursors are graphical resources that can contain multiple images in different sizes and color schemes for different types of display devices. A cursor also has a hot spot, the location Windows uses to track its position. Both icons and cursors are created and edited using the Image Editor, as are bitmaps and other images.

When you create a new icon or cursor, the Image Editor first creates an image of a standard type. The image is initially filled with the screen (transparent) color. If the image is a cursor, the hot spot is initially the upper-left corner with coordinates 0,0.

By default, the Image Editor supports the creation of additional images for the devices shown in the following table. You can create images for other devices by typing width, height, and color-count parameters into the Custom Image dialog box.

ColorWidth (pixels)Height (pixels)
Monochrome1616
Monochrome3232
Monochrome4848
Monochrome6464
Monochrome9696
161616
163232
166464
164848
169696
2561616
2563232
2564848
2566464
2569696

Create a device image (icon or cursor)

When you create a new icon or cursor resource, the Image Editor first creates an image in a specific style (32 × 32, 16 colors for icons and 32 × 32, Monochrome for cursors). You can then add images in different sizes and styles to the initial icon or cursor and edit each additional image, as needed, for the different display devices. You can also edit an image by using a cut-and-paste operation from an existing image type or from a bitmap created in a graphics program.

When you open the icon or cursor resource in the Image Editor, the image most closely matching the current display device is opened by default.

Note

Dev

If your project doesn't already contain an .rc file, see Creating a New Resource Script File.

The New <Device> Image Type dialog box enables you to create a new device image of a specified type. To open the New <Device> Image dialog box, go to menu Image > New Image Type. The following properties included are Target Image Type and Custom.

The Target Image Type property lists the available image types where you select the image type you want to open:

16 x 16, 16 colors
32 x 32, 16 colors
48 x 48, 16 colors
64 x 64, 16 colors
96 x 96, 16 colors

16 x 16, 256 colors
32 x 32, 256 colors
48 x 48, 256 colors
64 x 64, 256 colors
96 x 96, 256 colors

16 x 16, Monochrome
32 x 32, Monochrome
48 x 48, Monochrome
64 x 64, Monochrome
96 x 96, Monochrome

Note

Any existing images will not be displayed in this list.

The Custom property opens the Custom Image dialog box in which you can create a new image with a custom size and number of colors.

The Custom Image dialog box enables you to create a new image with a custom size and number of colors. The following properties included are:

PropertyDescription
WidthProvides a space for you to enter the width of the custom image in pixels (1 - 512, limit of 2048).
HeightProvides a space for you to enter the height for the custom image in pixels (1 - 512, limit of 2048).
ColorsProvides a space for you to choose the number of colors for the custom image: 2, 16, or 256.

Use the Open <Device> Image dialog box to open device images in C++ projects. It lists existing device images in the current resource (images that are part of the current resource). The following property included is:

PropertyDescription
Current ImagesLists the images included in the resource. Select the image type you want to open.

To create a new icon or cursor

  1. In Resource View, right-click your .rc file, then choose Insert Resource. If you already have an existing image resource in your .rc file, such as a cursor, you can right-click the Cursor folder and select Insert Cursor.

  2. In the Insert Resource dialog box, select Icon or Cursor and choose New. For icons, this action creates an icon resource with a 32 × 32, 16-color icon. For cursors, a 32 × 32, Monochrome (2-color) image is created.

    If a plus sign (+) appears next to the image resource type in the Insert Resource dialog box, it means that toolbar templates are available. Select the plus sign to expand the list of templates, select a template, and choose New.

To add an image for a different display device

  1. Go to menu Image > New Device Image, or right-click in the Image Editor pane and choose New Device Image.

  2. Select the type of image you want to add. You can also select Custom to create an icon whose size isn't available in the default list.

To copy a device image

C%2b%2b
  1. Go to menu Image > Open Device Image and choose an image from the current images list. For example, choose the 32 × 32, 16-color version of an icon.

  2. Copy the currently displayed icon image (Ctrl+C).

  3. Open a different image of the icon in another Image Editor window. For example, open the 16 × 16, 16-color version of the icon.

  4. Paste the icon image (Ctrl+V) from one Image Editor window to the other. If you're pasting a larger size into a smaller size, you can use the icon handles to resize the image.

To delete a device image

While the icon image is displayed in the Image Editor, go to menu Image > Delete Device Image. When you delete the last icon image in the resource, the resource is also deleted.

Note

When you press the Del key, the images and colors you have drawn on an icon are deleted but the icon remains and you can now redesign it. If you press Del by mistake, press Ctrl+Z to undo the action.

To create transparent or inverse regions in device images

In the Image Editor, the initial icon or cursor image has a transparent attribute. Although icon and cursor images are rectangular, many don't appear so because parts of the image are transparent and the underlying image on the screen shows through the icon or cursor. When you drag an icon, parts of the image may appear in an inverted color. You create this effect by setting the screen color and inverse color in the Colors window.

The screen and inverse colors you apply to icons and cursors either shape and color the derived image or assign inverse regions. The colors indicate parts of the image that have those attributes. You can change the colors that represent the screen-color and inverse-color attributes in editing. These changes don't affect the appearance of the icon or cursor in your application.

Note

The dialog boxes and menu commands you see might differ from those described in Help depending on your active settings or edition. To change your settings, go to menu Tools > Import and Export Settings. For more information, see Personalize the Visual Studio IDE.

To create transparent or inverse regions

  1. In the Colors window, choose the selector Screen-Color or Inverse-Color.

  2. Apply the screen or inverse color onto your image using a drawing tool. For more information on drawing tools, see Using a Drawing Tool.

To change the screen or inverse color

  1. Select either the Screen-Color selector or the Inverse-Color selector.

  2. Choose a color from the Colors palette in the Colors window.

    The complementary color is automatically assigned for the other selector.

    Tip

    If you double-click the Screen-Color or Inverse-Color selector, the Custom Color Selector dialog box appears.

Use the 256-color palette

Using the Image Editor, icons and cursors can be sized large (64 × 64) with a 256-color palette to choose from. After creating the resource, a device image style is selected.

To create a 256-color icon or cursor

  1. In Resource View, right-click your .rc file, then choose Insert Resource. If you already have an existing image resource in your .rc file, such as a cursor, you can right-click the Cursor folder and select Insert Cursor.

  2. In the Insert Resource dialog box, select Icon or Cursor and choose New.

  3. Go to menu Image > New Device Image and select the 256-color image style you want.

To choose a color from the 256-color palette for large icons

To draw with a selection from the 256-color palette, you need to select the colors from the Colors palette in the Colors window.

  1. Select the large icon or cursor, or create a new large icon or cursor.

  2. Choose a color from the 256 colors displayed in the Colors palette in the Colors/air-typer-download.html. window.

    The color selected will become the current color in the Colors palette in the Colors window.

    Note

    The initial palette used for 256-color images matches the palette returned by the CreateHalftonePalette Windows API. All icons intended for the Windows shell should use this palette to prevent flicker during palette realization.

To set a cursor's hot spot

The hot spot of a cursor is the point to which Windows refers in tracking the cursor's position. By default, the hot spot is set to the upper-left corner of the cursor with coordinates 0,0. The Hotspot property in the Properties window shows the hot spot coordinates.

Icons

  1. On the Image Editor toolbar, choose the Set Hotspot tool.

  2. Select the pixel you want to assign as the cursor's hot spot.

    The Hotspot property in the Properties window displays the new coordinates.

Add Icon To Yahoo Toolbar

To create and save a bitmap as a .gif or .jpeg

When you create a bitmap, the image is created in bitmap format (.bmp). You can, however, save the image as a GIF or JPEG or in other graphic formats.

Note

This process doesn't apply to icons and cursors.

  1. Go to menu File > Open, then select File.

  2. In the New File dialog box, choose the Visual C++ folder, then select Bitmap File (.bmp) in the Templates box and select Open.

    The bitmap opens in the Image Editor.

  3. Make changes to your new bitmap as needed.

  4. With the bitmap still open in the Image Editor, go to menu File > Save filename.bmp As.

  5. In the Save File As dialog box, type the name you want to give the file and the extension that denotes the file format you want in the File Name box. For example, myfile.gif.

    Note

    You must create or open the bitmap outside of your project in order to save it as another file format. If you create or open it within your project, the Save As command will be unavailable. For more information, see Viewing Resources in a Resource Script File Outside of a Project (Standalone).

  6. Select Save.

To convert an image from one format to another

Dev C++ Add Icon To Exe Installer

You can open GIF or JPEG images in the Image Editor and save them as bitmaps. Also, you can open a bitmap file and save it as a GIF or JPEG. Images you work with need not be part of a project for editing in the development environment (see stand-alone image editing).

  1. Open the image in the Image Editor.

  2. Go to menu File > Save filename As.

  3. In the Save File As dialog box, in the File name box, type the file name and the extension that denotes the format you want.

  4. Select Save.

To add a new image resource to an unmanaged C++ project

  1. In Resource View, right-click your .rc file, then choose Insert Resource. If you already have an existing image resource in your .rc file, such as a cursor, you can simply right-click the Cursor folder and select Insert Cursor.

  2. In the Insert Resource dialog box, select the type of image resource you'd like to create (Bitmap, for example) then choose New.

    If a plus sign (+) appears next to the image resource type in the Insert Resource dialog box, it means that toolbar templates are available. Select the plus sign to expand the list of templates, select a template, and choose New.

To add a new image resource to a project in a .NET programming language

  1. In Solution Explorer, right-click the project folder (for example, WindowsApplication1).

  2. From the shortcut menu, select Add, then choose Add New Item.

  3. In the Categories pane, expand the Local Project Items folder, then choose Resources.

  4. In the Templates pane, choose the resource type you'd like to add to your project.

    The resource is added to your project in Solution Explorer and the resource opens in the Image Editor. You can now use all the tools available in the Image Editor to modify your image. For more information on adding images to a managed project, see Loading a Picture at Design Time.

Requirements

None

Dev C++ Add Icon To Exe File

See also

Dev C 2b 2b Add Icon To Exe Download

Image Editor for Icons
How to: Edit an Image
How to: Use a Drawing Tool
How to: Work with Color
Accelerator Keys