Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
0 registered members (), 18,767 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
[C++] Image popup #248907
01/29/09 23:23
01/29/09 23:23
Joined: Feb 2006
Posts: 2,185
mpdeveloper_B Offline OP
Expert
mpdeveloper_B  Offline OP
Expert

Joined: Feb 2006
Posts: 2,185
Meh...let's just say that I'm a complete noob at C++, and I would like to make a program that just pops up an image on the screen, waits a few seconds and then closes the program. More or less like the gamestudio launch screen starts up.

I know it's a relatively simple program, but I do not know my way around C++.

Last edited by mpdeveloper_B; 01/29/09 23:24.

- aka Manslayer101
Re: [C++] Image popup [Re: mpdeveloper_B] #248941
01/30/09 08:13
01/30/09 08:13
Joined: Aug 2006
Posts: 652
Netherlands
bstudio Offline
User
bstudio  Offline
User

Joined: Aug 2006
Posts: 652
Netherlands


BASIC programmers never die, they GOSUB and don't RETURN.
Re: [C++] Image popup [Re: bstudio] #249225
02/01/09 04:28
02/01/09 04:28
Joined: Feb 2006
Posts: 2,185
mpdeveloper_B Offline OP
Expert
mpdeveloper_B  Offline OP
Expert

Joined: Feb 2006
Posts: 2,185
Thanks, I did search for it but my mind went blank and I didn't search specifically for "splash screen". I found a nice plugin for dev c++ which is what I use atm.

There is one more problem I'm having, I've been trying some stuff with keybd_event to try and make it close the spash screen when esc is pressed, but It keeps returning even though the button hasn't been pressed or released. Can you help?

this is the function for returning a value to signal if the button has been pressed and depressed (I used code from msdn and modified it)

Code:
int check_esc(BOOL bState)
{
    BYTE keyState[256];
    GetKeyboardState((LPBYTE)&keyState);
    if( (bState && !(keyState[VK_ESCAPE] & 1)) ||
          (!bState && (keyState[VK_ESCAPE] & 1)) )
    {
         keybd_event(VK_ESCAPE, 0x1B, 0, 0);
         keybd_event(VK_ESCAPE, 0x1B, KEYEVENTF_KEYUP, 0);
         return 76;
    }
}


and here's the code that tells it to return the value and exit:

Code:
if (check_esc(TRUE) == 76)
{ 
     //exit code here...
}


the problem is, It continues to return 76 even though the button hasn't been pressed or depressed....how do I fix this, or is there a better/shorter way to do this?


- aka Manslayer101

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1