Thread: icon in title bar?

  1. #1
    Unregistered
    Guest

    Cool icon in title bar?

    Hey. I'm just starting out with Bloodshed's Dev C++.

    I've been learning quite a bit in the past couple of days. I created a blank windows application and I was able to compile it with the icon of my choice. I was also able to change the icon in the toolbar to something different besides the default (white and blue empty) icon.

    What is puzzling me, is how to get the icon in the titlebar to be the icon of my choice.?

    After running the EXE that I just compiled it shows my new icon in the toolbar...... new icon on the exe itself (in windows explorer of course)... but still shows the default icon in the titlebar next to the name of my proggie.

    Is there a one line command that I can put somewhere in there?

    Thanks a bunch for any help!

  2. #2
    Programming is fun, mkay?
    Join Date
    Oct 2001
    Posts
    490

    Lightbulb I know how...

    I use Dev-C++ from BloodShed, too. Open the resource editor, then click the Insert Icon Resource button. In the identifier or name box, type SMI or any other name. Click the folder next to the dit box to selectan icon file. When you do that, click Build Resource. Now, go back to the C++ editor. On the line where it says:

    wincl.hIconSm = LoadIcon(NULL, IDI_APPLICATION);

    Replace it with:

    wincl.hIconSm = LoadIcon(hThisInstance, MAKEINTRESOURCE("SMI"));

    Where "SMI" is the name for your icon in the resource editor. I hope this helps!
    Website(s): http://www16.brinkster.com/trifaze/

    E-mail: [email protected]

    ---------------------------------
    C++ Environment: MSVC++ 6.0; Dev-C++ 4.0/4.1
    DirectX Version: 9.0b
    DX SDK: DirectX 8.1 SDK

  3. #3
    Unregistered
    Guest

    Unhappy Tried... failed...

    Wonder what I am doing wrong.
    I am getting a "Parse error before ',"
    if I double click on it it shows me line 61 where it says


    hThisInstance, /* Program Instance handler */

  4. #4
    Unregistered
    Guest

    working.... but...

    okay... got it running... didn't change anything though. :*(

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. beach bar (sims type game)
    By DrKillPatient in forum Game Programming
    Replies: 1
    Last Post: 03-06-2006, 01:32 PM
  2. Window without title bar
    By maxorator in forum Windows Programming
    Replies: 1
    Last Post: 10-16-2005, 12:26 AM
  3. Title and Icon On Window
    By matth in forum C++ Programming
    Replies: 0
    Last Post: 03-21-2005, 03:53 PM
  4. Child window with active (highlighted) title bar: Possible?
    By JasonD in forum Windows Programming
    Replies: 7
    Last Post: 10-16-2003, 06:43 AM
  5. title bar icon
    By phil in forum Windows Programming
    Replies: 2
    Last Post: 09-05-2002, 07:31 AM