Welcome to Dream.In.Code
Getting C++ Help is Easy!

Join 136,576 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,876 people online right now. Registration is fast and FREE... Join Now!




How do I put an icon into C++ code? So that my exe has a logo/icon

 
Reply to this topicStart new topic

How do I put an icon into C++ code? So that my exe has a logo/icon

Panarchy
26 Sep, 2008 - 08:55 PM
Post #1

New D.I.C Head
*

Joined: 28 Nov, 2007
Posts: 16


My Contributions
Hello

Here is my code;
CODE

#include <windows.h>

/*  Declare Windows procedure  */
LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);

/*  Make the class name into a global variable  */
char szClassName[ ] = "WindowsApp";

int WINAPI WinMain (HINSTANCE hThisInstance,
                    HINSTANCE hPrevInstance,
                    LPSTR lpszArgument,
                    int nFunsterStil)

{
   ShellExecute(  
        NULL, // No associated window  
        "open", // Command to run  
        "index.htm", // Document on which to run command  
        NULL, // Not an exe file, so no other parameters  
        NULL, // Current working directory  
        SW_SHOWNORMAL);  
    return 0;
}


I have a psd file I made... for the icon. So I can save it into most other image formats.

It's a square image (so don't need transparency or whatever).

Please tell me how to do this!

Thanks in advance,

Panarchy
User is offlineProfile CardPM
+Quote Post

Panarchy
RE: How Do I Put An Icon Into C++ Code? So That My Exe Has A Logo/icon
26 Sep, 2008 - 10:01 PM
Post #2

New D.I.C Head
*

Joined: 28 Nov, 2007
Posts: 16


My Contributions
Got it to work
User is offlineProfile CardPM
+Quote Post

OliveOyl3471
RE: How Do I Put An Icon Into C++ Code? So That My Exe Has A Logo/icon
26 Sep, 2008 - 10:05 PM
Post #3

It's all about the code ♥
Group Icon

Joined: 11 Jul, 2007
Posts: 1,636



Thanked: 18 times
Dream Kudos: 150
My Contributions
Good for you! icon_up.gif
Would you mind posting how you got it to work, in case anyone else has the same question? That way if they do a search for the same question and end up at this post, they will find the answer instead of just a question.

Thanks smile.gif
User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 12/3/08 12:08AM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month