473,396 Members | 2,113 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

dev-cpp icon issue

bob
I'm trying to change the icon in the corner of my window, and I'm
having trouble. I'm using Dev-C++, and I noticed it created this .RC
file for me when I specified that I wanted to use a "Game" icon for the
program itself. It contains this:

/* THIS FILE WILL BE OVERWRITTEN BY DEV-C++ */
/* DO NOT EDIT! */
A ICON MOVEABLE PURE LOADONCALL DISCARDABLE "reversi.ico"

So, I tried changing the icon for the window like so:

WNDCLASS wc;
wc.hIcon = LoadIcon (hInstance, "reversi.ico");

It doesn't seem to work. Anyone know what's up?

Sep 29 '05 #1
2 3298
b...@coolgroups.com wrote:
I'm trying to change the icon in the corner of my window, and I'm
having trouble. I'm using Dev-C++, and I noticed it created this .RC
file for me when I specified that I wanted to use a "Game" icon for the
program itself. It contains this:

/* THIS FILE WILL BE OVERWRITTEN BY DEV-C++ */
/* DO NOT EDIT! */
A ICON MOVEABLE PURE LOADONCALL DISCARDABLE "reversi.ico"

So, I tried changing the icon for the window like so:

WNDCLASS wc;
wc.hIcon = LoadIcon (hInstance, "reversi.ico");

It doesn't seem to work. Anyone know what's up?


I'd suggest posting in a newsgroup related to Dev-C++ or your platform.
This newsgroup is for standard C++ language issues, and icons fall
outside of that scope.

Cheers! --M

Sep 29 '05 #2
Hope this helps, this is from a program that I wrote.

wincl.hIcon = LoadIcon (hin, MAKEINTRESOURCE(IDI_ICONB));
wincl.hIconSm = LoadIcon(hin, MAKEINTRESOURCE(IDI_ICONS));

You will need to do a resource.h:
#define IDB_IMAGE1 100
#define IDB_IMAGE2 101
#define IDB_IMAGE3 102
#define IDB_IMAGE4 103
#define IDB_IMAGE5 104

#define IDI_ICONS 200
#define IDI_ICONB 201

#define IDC_CURSOR 300

#include "resources.h"

IDB_IMAGE1 BITMAP "tank.bmp"
IDB_IMAGE2 BITMAP "tank2.bmp"
IDB_IMAGE3 BITMAP "tank3.bmp"
IDB_IMAGE4 BITMAP "board.bmp"
IDB_IMAGE BITMAP "inf.bmp"

IDI_ICONS ICON "tank.ico"
IDI_ICONB ICON "myicon.ico"

resource.rc

IDC_CURSOR CURSOR "cursor1.cur"

Sep 29 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: simduss | last post by:
Hi, First of all, I'm a beginner with Unix. I have a "make" (Unix command) problem with a Pro*C sub-program since I installed Oracle8i (before I was at 7.3.4). I have a script builder that...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.