0

Normally, you can set an exe icon for your program. But how about set an exe icon for your program without icon file (at least for win 32 project).

In run time, I can set the icon with

SHSTOCKICONINFO appIconInfo;
appIconInfo.cbSize = sizeof(SHSTOCKICONINFO);
HRESULT hr = SHGetStockIconInfo(SIID_DESKTOPPC, SHGSI_ICON, &appIconInfo);

But that can't set the icon of my exe file. I don't know if it's possible that I can do one of the following things:

  • Set up project so that Visual studio can build the exe file with the icon from Window's system, like the stock icon SIID_DESKTOPPC.

  • Create a text file code, so that the compiler read this code and generate the icon - I don't need any fancy thing - just a plain pink icon is good enough.

The reason I want to do this weird thing (yes, I know it's weird): Firstly, I want this whole funny project is just text - just code and code. Secondly, I can't create the icon file with Visual Studio, Paint or any other programs that come with default Windows. Thirdly, Just for fun.

This question difference with the question: How do I set the icon for my application in visual studio 2008? : This set icon for exe file without the .ico file.

123iamking
  • 2,387
  • 4
  • 36
  • 56
  • @François Andrieux: I just add the tag: Visual Studio – 123iamking Aug 22 '17 at 13:38
  • Possible duplicate of [How do I set the icon for my application in visual studio 2008?](https://stackoverflow.com/questions/320677/how-do-i-set-the-icon-for-my-application-in-visual-studio-2008) – François Andrieux Aug 22 '17 at 13:41

0 Answers0