How do you set the title name and icon. I use C++ with sdl an devC++.
How do you set the title name and icon. I use C++ with sdl an devC++.
im guessing windows?
and im guessing you wanna change the icon and title in the windows title bar?
well, i haven't messed with the icons enough to say but its a little more complicated than changing the text.
heres how to chang the window title anywhere in the program you have a handle
#include <windows.h>
char text[] = "oo Title Changed!! oo"
SetWindowText(my_window_handle, text);
function prototype:
BOOL SetWindowText(
HWND hWnd,
LPCTSTR lpString
);
ADVISORY: This users posts are rated CP-MA, for Mature Audiences only.
If you have an icon as a resource:
MainWindow is the window, ProgramIcon is the ID of the icon and CurInst is the first HINSTANCE parameter in WinMain.Code:SetClassLong(MainWindow, GCL_HICON, (LONG)LoadIcon(CurInst, MAKEINTRESOURCE(ProgramIcon))); ShowWindow(MainWindow, SW_HIDE); ShowWindow(MainWindow, SW_SHOW);
The reason I hide then show the window again is that the icon will be misplaced otherwise...
MagosX.com
Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime.
Look here:Originally posted by willgell
How do you set the title name and icon. I use C++ with sdl an devC++.
http://sdldoc.csn.ul.ie/sdlwmsetcaption.php
Anytime you have a question about SDL browse that website first.