Jump to content
  • Advertisement
Sign in to follow this  
googa

Couple Questions (Finishing a game)

This topic is 4625 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
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!

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.




Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!