| | |
Changing my C++ program's icon
Please support our C++ advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Nov 2006
Posts: 37
Reputation:
Solved Threads: 0
How can I change my program's icon for anyone who uses the program? Obviously I would have to include the .ico file with it, but beyond that, I'm stumped.
=================================
There are 10 types of people in the world,
Those who understand binary, and those who don't
=================================
There are 10 types of people in the world,
Those who understand binary, and those who don't
=================================
Typically the main icon is linked in at compilation. How exactly you do it depends on your compiler. In all cases, a Windows resource named MAINICON is in your exe.
You can also check out Resource Hacker, which you can use to manually change a program's icon.
You can also check out Resource Hacker, which you can use to manually change a program's icon.
•
•
Join Date: Mar 2008
Posts: 1,495
Reputation:
Solved Threads: 123
Its possible to do, ive never tried this but I think it should work.
CPP Syntax (Toggle Plain Text)
SendMessage(hwnd, WM_SETICON, ICON_SMALL, (LPARAM)LoadIcon(NULL, MAKEINTRESOURCE(ICON_ID)));
I need pageviews! most fun profile ever :)
•
•
Join Date: Mar 2008
Posts: 1,495
Reputation:
Solved Threads: 123
No it doesn't, you have to create a Win32 project, make a window and then make it change the icon at runtime.. The point is I dont need to try it because im not the one with the problem, hes the one who should be putting in the effort to test it, im just giving suggestions.
I need pageviews! most fun profile ever :)
![]() |
Similar Threads
- change program icon (Windows NT / 2000 / XP)
- IE opens by itself!!! Homepage keeps changing!!HELP! (Viruses, Spyware and other Nasties)
- Changing windows icon on top right (Windows NT / 2000 / XP)
- Home page always changing (Viruses, Spyware and other Nasties)
- my home page keeps changing to "res://jxtgk.dll/index.html#37049" (Viruses, Spyware and other Nasties)
- changing desktop icons text colour (Windows NT / 2000 / XP)
- Icon and Thumbnail Display Problem (Windows NT / 2000 / XP)
Other Threads in the C++ Forum
- Previous Thread: Find then Show window.
- Next Thread: External/Internal Enumerations?
Views: 5345 | Replies: 9
| Thread Tools | Search this Thread |
Tag cloud for C++
6 add api array arrays beginner binary bitmap c++ c/c++ calculator char class classes code compile compiler console conversion convert count data delete desktop directshow dll encryption error file forms fstream function functions game getline givemetehcodez google graph homeworkhelper iamthwee ifstream input int integer java lazy lib linkedlist linux loop looping loops map math matrix memory microsoft newbie news node number output parameter pointer problem program programming project proxy python random read recursion recursive reference return sort string strings struct studio system template templates test text tree unix url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






