Help wanted: How do you pause a windows application? 
Author Message
 Help wanted: How do you pause a windows application?

I am writing a DLL that will produce an intro screen. But I am stuck with a
problem, I cannot pause the window application inside the DLL, it drops out to
the calling program and repaints the window (loosing all my hard work).

What I need is some way of pausing the application until a key is pressed.
I have been trying something along these lines

        int vkey;
        while(!(vkey &= 0x80)
                {
                vkey=GetAsyncKeyState(VK_RETURN);
                }

It locks up the application I have to CTRL-ALT-DEL and kill the application.
I have tried using alternatives to VK_RETURN, 0x0D or VK_LBUTTON etc but still
no success.
I have also varied the test, I have had while(vkey<128) and selection of other
numbers, sometimes it ignores the loop others it locks.
Now comes my request can someone _please_ help. All I want the window's
application to do is to halt until a or any key is pressed. I can only find
the GetAsyncKeyState function whichs decribes the job.

Am I getting something obviously wrong or am I running down the wrong dark
tunnel.

Using PC-Windows ver 3.11 and MSVC++ v1.0 compiling a DLL.

(tanks a mil up front)
 --
 Paul Raffo
 Software Support
 Micromaster International



Sat, 10 Jan 1998 03:00:00 GMT  
 Help wanted: How do you pause a windows application?
Quote:

>I am writing a DLL that will produce an intro screen.
[snip]
>What I need is some way of pausing the application until a key is pressed.
>I have been trying something along these lines

>    int vkey;
>    while(!(vkey &= 0x80)
>            {
>            vkey=GetAsyncKeyState(VK_RETURN);
>            }

[rest snipped]

Using C language to write a program does not make every problem
associated with that program a C problem.

Isn't there a ms-windows group?

GV



Sat, 10 Jan 1998 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Pause an application?

2. Pausing a console application

3. Make console application pause before it returns

4. How to get VC++ to pause before quiting a console application

5. Need to pause Screen in a console Application!!!

6. pause after run of console application

7. Pausing a 16 bit application?

8. How to pause application while a process is running

9. console application pauses when mouse clicks inside the console

10. pausing a console application

11. Help wanted with E-Mail application project

12. help wanted: executing applications

 

 
Powered by phpBB® Forum Software