C Board  

Go Back   C Board > Platform Specific Boards > Windows Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 12-12-2001, 05:54 PM   #1
Unregistered
Guest
 
Posts: n/a
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!
  Reply With Quote
Old 12-12-2001, 06:08 PM   #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: trifaze_mattu@lycos.com

---------------------------------
C++ Environment: MSVC++ 6.0; Dev-C++ 4.0/4.1
DirectX Version: 9.0b
DX SDK: DirectX 8.1 SDK
SyntaxBubble is offline   Reply With Quote
Old 12-12-2001, 06:23 PM   #3
Unregistered
Guest
 
Posts: n/a
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 */
  Reply With Quote
Old 12-12-2001, 06:43 PM   #4
Unregistered
Guest
 
Posts: n/a
working.... but...

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

Thread Tools
Display Modes

Forum Jump

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


All times are GMT -6. The time now is 04:23 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22