Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (Aku_Aku, 7th_zorro, Ayumi), 1,050 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 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 | chip programmers | 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