2 Replies - 723 Views - Last Post: 26 September 2008 - 11:05 PM Rate Topic: -----

#1 Panarchy  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 82
  • Joined: 28-November 07

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

Posted 26 September 2008 - 09:55 PM

Hello

Here is my 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

Is This A Good Question/Topic? 0
  • +

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

#2 Panarchy  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 82
  • Joined: 28-November 07

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

Posted 26 September 2008 - 11:01 PM

Got it to work
Was This Post Helpful? 0
  • +
  • -

#3 OliveOyl3471  Icon User is offline

  • Everybody's crazy but me!
  • member icon

Reputation: 134
  • View blog
  • Posts: 6,581
  • Joined: 11-July 07

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

Posted 26 September 2008 - 11:05 PM

Good for you! :^:
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 :)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1