Couple Questions (Finishing a game)
Hi,
I'm almost done with my game, and I have 3 possibly easy questions:
1) How do I set the icon of my exe file? (I'm using visual c++ 6.0, Directx)
2) How can I create a link to open its webpage from inside my game?
3) What is the best completely FREE installer available?
I tried google but couldn’t find any answer.
Thanks for the help.
Quote:Original post by googa
Hi,
I'm almost done with my game, and I have 3 possibly easy questions:
1) How do I set the icon of my exe file? (I'm using visual c++ 6.0, Directx)
2) How can I create a link to open its webpage from inside my game?
3) What is the best completely FREE installer available?
I tried google but couldn’t find any answer.
Thanks for the help.
1 - You can do that from within visual studio, just go to resources and check it out
2 - Use ShellExecute. ex:
ShellExecute(NULL, NULL, _T( "http://www.gamedev.net/" ), NULL, NULL, SW_SHOWNORMAL);
3 - Inno Setup is really good and absolutely free. http://www.jrsoftware.org/isinfo.php
Good luck finishing the game!
1) You create a resource (file with .rc) with this:
somewhere in it.
And a resource.h with the following:
This *should* do it for your exe, it did for me.
For the actual window, change your WNDCLASS line for the icon to this:
But this is all done with the wizard (except the actual window).
2) There was a thread about this only a couple of days ago, it should be searchable. Basicly, it's either a system("Your URL file") or a call in windows.
3) I've heard that "Install Creator" is a good one.
IDI_ICON1 ICON DISCARDABLE "icon1.ico"
somewhere in it.
And a resource.h with the following:
#define IDI_ICON1 101
This *should* do it for your exe, it did for me.
For the actual window, change your WNDCLASS line for the icon to this:
wc.hIcon = LoadIcon(NULL, MAKEINTRESOURCE(IDI_ICON1));
But this is all done with the wizard (except the actual window).
2) There was a thread about this only a couple of days ago, it should be searchable. Basicly, it's either a system("Your URL file") or a call in windows.
3) I've heard that "Install Creator" is a good one.
Yep, I tried it. I just can't get it to work.
Wonderquest.rc file:
IDI_WQICON ICON DISCARDABLE "WQIcon.ico"
resource.h file:
#define IDI_WQICON 111
My WinInit function:
HRESULT WinInit( HINSTANCE hInst, int nCmdShow, HWND* phWnd, HACCEL* phAccel )
{
WNDCLASSEX wc;
HWND hWnd;
HACCEL hAccel;
// Register the window class
wc.cbSize = sizeof(wc);
wc.lpszClassName = TEXT("WonderQuest");
wc.lpfnWndProc = MainWndProc;
wc.style = CS_VREDRAW | CS_HREDRAW;
wc.hInstance = hInst;
wc.hIcon = LoadIcon ( NULL, MAKEINTRESOURCE(IDI_WQICON) );
wc.hIconSm = LoadIcon ( NULL, MAKEINTRESOURCE(IDI_WQICON) );
wc.hCursor = LoadCursor( NULL, IDC_ARROW );
wc.hbrBackground = (HBRUSH) (COLOR_WINDOW + 1);
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
...
What's wrong? the game compile ok, but when I check Release folder, the icon still remains the same default one.
Wonderquest.rc file:
IDI_WQICON ICON DISCARDABLE "WQIcon.ico"
resource.h file:
#define IDI_WQICON 111
My WinInit function:
HRESULT WinInit( HINSTANCE hInst, int nCmdShow, HWND* phWnd, HACCEL* phAccel )
{
WNDCLASSEX wc;
HWND hWnd;
HACCEL hAccel;
// Register the window class
wc.cbSize = sizeof(wc);
wc.lpszClassName = TEXT("WonderQuest");
wc.lpfnWndProc = MainWndProc;
wc.style = CS_VREDRAW | CS_HREDRAW;
wc.hInstance = hInst;
wc.hIcon = LoadIcon ( NULL, MAKEINTRESOURCE(IDI_WQICON) );
wc.hIconSm = LoadIcon ( NULL, MAKEINTRESOURCE(IDI_WQICON) );
wc.hCursor = LoadCursor( NULL, IDC_ARROW );
wc.hbrBackground = (HBRUSH) (COLOR_WINDOW + 1);
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
...
What's wrong? the game compile ok, but when I check Release folder, the icon still remains the same default one.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement