: How would I go about creating a picture for my exe file? Im using MSVC. : [green] Can you be more specific. Do you mean an icon for your exe or something else? [/green]
: : How would I go about creating a picture for my exe file? Im using MSVC. : : : [green] : Can you be more specific. Do you mean an icon for your exe or something else? : [/green]
: : : How would I go about creating a picture for my exe file? Im using MSVC. : : : : : [green] : : Can you be more specific. Do you mean an icon for your exe or something else? : : [/green] : : exactly - an icon for my exe. : : : : : : [green][b]MFC:[/b] In your project, go the Resource View. Then, choose Icon and IDR_MAINFRAME. In the icon editor that pops up, insert or create the icon you need. Note that you can have several version of your icons, like 16X16 and 32X32 (these are used in different situations).
[b]Non MFC:[/b] You need to have an external ICO file containing the icon you want (this icon can be created with the icon editor supplied with MFC or any other ICO capable editor of your choice). Also, you need an RC file. In this file, you have a line like RC_MYICON ICON "myicon.ico" Where RC_MYICON is a [b][red]#define[/red][/b] (make sure to have this value in a header file) for your icon and "myicon.ico" is the filename representing it.
In your source code then, you have a code fragment like WNDCLASSEX wc; ... wc.hIcon = LoadIcon(hInstance,MAKEINTRESOURCE(RC_MYICON)); ...(other line filling in values for wc) RegisterClassEx(&wc); // Register class
Comments
:
[green]
Can you be more specific. Do you mean an icon for your exe or something else?
[/green]
: :
: [green]
: Can you be more specific. Do you mean an icon for your exe or something else?
: [/green]
exactly - an icon for my exe.
:
:
: : :
: : [green]
: : Can you be more specific. Do you mean an icon for your exe or something else?
: : [/green]
:
: exactly - an icon for my exe.
: :
: :
:
:
[green][b]MFC:[/b]
In your project, go the Resource View. Then, choose Icon and IDR_MAINFRAME. In the icon editor that pops up, insert or create the icon you need. Note that you can have several version of your icons, like 16X16 and 32X32 (these are used in different situations).
[b]Non MFC:[/b]
You need to have an external ICO file containing the icon you want (this icon can be created with the icon editor supplied with MFC or any other ICO capable editor of your choice). Also, you need an RC file. In this file, you have a line like
RC_MYICON ICON "myicon.ico"
Where RC_MYICON is a [b][red]#define[/red][/b] (make sure to have this value in a header file) for your icon and "myicon.ico" is the filename representing it.
In your source code then, you have a code fragment like
WNDCLASSEX wc;
...
wc.hIcon = LoadIcon(hInstance,MAKEINTRESOURCE(RC_MYICON));
...(other line filling in values for wc)
RegisterClassEx(&wc); // Register class
Good luck!!!
[/green]