Couple Questions (Finishing a game)

Started by
2 comments, last by googa 18 years, 3 months ago
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.
What about an Addictive FREE Turn-Based Puzzle/Strategy Game, with a Growing Community Available to Play right now?<a href="http://www.wonderquest.co.nr"><( ) -Hurrahh!/a> <a href="http://www.wonderquest.co.nr"><( ) -Yes!/a> <a href="http://www.wonderquest.co.nr"><( ) -Ai Caramba!/a>
Advertisement
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:
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.




What about an Addictive FREE Turn-Based Puzzle/Strategy Game, with a Growing Community Available to Play right now?<a href="http://www.wonderquest.co.nr"><( ) -Hurrahh!/a> <a href="http://www.wonderquest.co.nr"><( ) -Yes!/a> <a href="http://www.wonderquest.co.nr"><( ) -Ai Caramba!/a>

This topic is closed to new replies.

Advertisement