Im new in c++
i got a question
I'm making a launcher (for a game)
and i want to link my button to website and starting game
could anyone give me an example how to do it?
I use Visual C++ 2008 Express Edition
Thx
Printable View
Im new in c++
i got a question
I'm making a launcher (for a game)
and i want to link my button to website and starting game
could anyone give me an example how to do it?
I use Visual C++ 2008 Express Edition
Thx
Making an interface with C++ is quite hard. You need several libraries to make life easy, requires lots of coding...
AND: this forum is not intended as "gimmy teh code". Look at google for it. We are here to solve problems etc, not dumping code.
Ok i will look on google, already thx for info
Didn't found anything
So this is the design i made for my launcher
but now i wanna link the exit button to exit program
website button to a link
and start button wich need to do "start engine /load /config debug test test2"
Attachment 47932
Please help me a bit TY
You probably need to use SDL for this. You need to load the background and the 3 buttons into memory and display them at a certain position. Than you'll have to make a code that will track mouse clicks...if its on one of the buttons it should do something: exit the script or execute an external program.
Do some research on SDL and follow some tutorials (LazyFoo has some nice tuts)...its not going to be easy if you have no knowledge about SDL, but the tutorials help alot ;).
Ty :p I gonna give it a try
In other case you will need to use WM Messages, is quite annoying use that, if you use only your code ( not from libraries ) you need to go to the switch of the messages
the WM_CLOSE is in case i press the X of the corner, in your case it would be somthing with WM_BUTTONUP or somwthing like that, ( i can't remember the exactly name ).Code:LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
UINT wmId, wmEvent;
switch (message)
{
case WM_CLOSE:
if (MessageBox(ghWnd, "GameServer close?", "Close", MB_YESNO|MB_APPLMODAL) == 6)
{
DestroyWindow(hWnd);
}
break;
Also if your Button depends from the main window, you will need to use the WM_COMMAND