Icons
google produced this link http://www.codeguru.com/forum/showthrea ... did=276090 .. it may provide some help
or this one http://pomelo.ivia.es/mecanizacion/www/ ... ion14.html
or this one http://pomelo.ivia.es/mecanizacion/www/ ... ion14.html
Project -> add to project -> New -> resource script
Left at your C++ code there is a tab added called resources, select this.
right click on the resources map and chose import to load your .ico
Left at your C++ code there is a tab added called resources, select this.
right click on the resources map and chose import to load your .ico
Visit my website @ www.venex.be
Plethora project will be added to the site
AMD AthlonXP 2600+, 512MB DDR, Radeon M10 (mobile 9600) PRO 64MB, WinXP
Plethora project will be added to the site
AMD AthlonXP 2600+, 512MB DDR, Radeon M10 (mobile 9600) PRO 64MB, WinXP
you can use gui_environment->draw2DImage to paste an image to the screen (on top of anything being rendered in 3d).
you cant get the hDC from IrrLicht normally. you'd have to change the engine's code and recompile it. someone is actually doing this already to make IrrLicht render to a specific window, and using MFC for other things.
you cant get the hDC from IrrLicht normally. you'd have to change the engine's code and recompile it. someone is actually doing this already to make IrrLicht render to a specific window, and using MFC for other things.
a screen cap is worth 0x100000 DWORDS
-
- Posts: 162
- Joined: Wed Nov 26, 2003 5:24 pm
- Location: Europe
HWND hwnd= FindWindow (0, "Your caption");
And it's strange but Resource Hacker doesn't see app's resources
And it's strange but Resource Hacker doesn't see app's resources
http://www.javazing.com
P-III-950, WinXP, GeForce FX5600 128 MB ForceWare 52.16, DX9, Eclipse IDE, JRE 1.6
P-III-950, WinXP, GeForce FX5600 128 MB ForceWare 52.16, DX9, Eclipse IDE, JRE 1.6
If you look at the first post by Venex, and the first post by me, we already answered your question. The window's icon is something called a 'Resource' which you compile into your project. This is true for all Win32 programs, and it has nothing to do with IrrLicht itself.Simo wrote:Probably you didn't undertand me but I was asking if there's a way to change the small icon on the left of the title bar, left of the title. By default I have the win32 application icon but I'd like to change it when running in windowed mode, as it was possible in win32 programming.
In the DevCpp compiler-- this is absolutely simple. As I said. For MSVC, do what Venex said:
Project -> add to project -> New -> resource script
Left at your C++ code there is a tab added called resources, select this.
right click on the resources map and chose import to load your .ico
a screen cap is worth 0x100000 DWORDS
Not while program is running. I'll try to explain better and I'm planning to improve my english knowledge. Well thanks to your suggest I'm able to change the icon of my executable but not the small icon I'm talking about. I'm looking at Internet Explorer now and the icon is in the upper left corner in the title bar, is represented by a small paper sheet and the classic IE icon. When programming in Win32 while creating a window there's a way to declare that icon so I'm asking if there's a way also in Irrlicht to set that icon as I made for the executable, and I think that should be done before starting the device...
I'm using MSVC 6.0 if this could be of any help.
I'm using MSVC 6.0 if this could be of any help.
Here is what I think must be used(from MSDN), using Win32:
So, supposing you have resource-based icon called IDR_MYICON, you should write this:
If you can access my_instance and my_hwnd from outside Irrlicht, you don't have to modify the engine. Othewise, you'd have to insert this code into the window-creation engine's code.
In case you use MFC, this is the code:
Please try it and tell me if it finally worked
Code: Select all
An application sends the WM_SETICON message to associate a new large or small icon with a window. The system displays the large icon in the ALT+TAB dialog box, and the small icon in the window caption.
To send this message, call the SendMessage function with the following parameters.
SendMessage(
(HWND) hWnd, // handle to destination window
WM_SETICON, // message to send
(WPARAM) wParam, // icon type
(LPARAM) lParam // handle to icon (HICON)
);
Code: Select all
HICON hIcon = LoadIcon(my_instance, IDR_MYICON);
// Set big icon (ALT+TAB)
SendMessage(my_hwnd,WM_SETICON,ICON_BIG,hIcon);
// Set little icon (titlebar)
SendMessage(my_hwnd,WM_SETICON,ICON_BIG,hIcon);
In case you use MFC, this is the code:
Code: Select all
BOOL MyApp::InitInstance()
{
...
pFrame->SetIcon(LoadIcon(IDR_MAINFRAME),false);
pFrame->SetIcon(LoadIcon(IDR_MAINFRAME),true);
}
Please try it and tell me if it finally worked