SFML community forums

Help => Window => Topic started by: Pwndja on January 11, 2008, 07:59:03 am

Title: changing the upper right hand corner image?
Post by: Pwndja on January 11, 2008, 07:59:03 am
How do I change the upper right hand corner image?
I have read through all the appropriate docs and tutorials and I can't find what is needed with sfml to do that.
Title: changing the upper right hand corner image?
Post by: Laurent on January 11, 2008, 09:59:47 am
The "upper right hand corner image" ? What do you mean ?
Title: oops
Post by: Pwndja on January 11, 2008, 11:10:27 pm
I meant left corner sorry where the mozilla firefox mini symbol is...
Title: changing the upper right hand corner image?
Post by: T.T.H. on January 11, 2008, 11:33:53 pm
I think he means the all-so-common application icon under Windows which is displayed on the caption bar of the application, on the Windows task bar and in the Windows explorer as application's icon.

Probably he expected sf::RenderWindow to have some function SetApplicationIcon, but since SFML is cross platform I don't know whether that's possible or even a good idea.

In case it shall be able to set an application icon I assume in the end it goes here:
Code: [Select]
00265 void WindowImplWin32::RegisterWindowClass()
00266 {
00267     WNDCLASSW WindowClass;
00268     WindowClass.style         = 0;
00269     WindowClass.lpfnWndProc   = &WindowImplWin32::GlobalOnEvent;
00270     WindowClass.cbClsExtra    = 0;
00271     WindowClass.cbWndExtra    = 0;
00272     WindowClass.hInstance     = GetModuleHandle(NULL);
00273     WindowClass.hIcon         = NULL;                              // <=== ICON ===
00274     WindowClass.hCursor       = 0;
00275     WindowClass.hbrBackground = 0;
00276     WindowClass.lpszMenuName  = NULL;
00277     WindowClass.lpszClassName = ourClassName;
00278
00279     RegisterClass(&WindowClass);
00280 }
Title: changing the upper right hand corner image?
Post by: Laurent on January 12, 2008, 03:04:29 am
Ok I see. If I can add it easily on each platform, I'll provide this function. It's already in the roadmap, by the way.