Click here to Skip to main content
15,915,869 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Login dialog problem Pin
Thomas Freudenberg30-Apr-02 5:37
Thomas Freudenberg30-Apr-02 5:37 
GeneralRe: Login dialog problem Pin
Joaquín M López Muñoz30-Apr-02 5:39
Joaquín M López Muñoz30-Apr-02 5:39 
GeneralRe: Login dialog problem Pin
l a u r e n30-Apr-02 8:09
l a u r e n30-Apr-02 8:09 
GeneralRe: Login dialog problem - Solved Pin
30-Apr-02 8:16
suss30-Apr-02 8:16 
QuestionHowto change background color without redrawing content ? Pin
Brian van der Beek30-Apr-02 5:20
Brian van der Beek30-Apr-02 5:20 
AnswerRe: Howto change background color without redrawing content ? Pin
Joaquín M López Muñoz30-Apr-02 5:35
Joaquín M López Muñoz30-Apr-02 5:35 
GeneralRe: Howto change background color without redrawing content ? Pin
Brian van der Beek2-May-02 4:25
Brian van der Beek2-May-02 4:25 
GeneralExiting a DirectShow movie on keypress... Pin
30-Apr-02 5:12
suss30-Apr-02 5:12 
Hi,

I have written a small application using DirectShow that plays an MPEG or AVI movie in full screen mode. My code is based on the "playit" sample code that comes with the DirectX SDK (or at least it came with 6.1), and it uses WinAPI. All I want to do is have it so that the movie finishes (exits) as soon as you press any key on the keyboard (or one of the mouse keys, though that's not as vital). This is probably a very dumb question (I am very new to DirectX and not a very experienced programmer in general), but how can I do this? I *think* that I somehow need to send the message EC_USERABORT to the movie window as soon as the user presses a key. I have tried using put_MessageDrain() and so on, but it doesn't seem to recognise my window - or at least, it doesn't work.

This is the main loop of the PlayMovie() function:

long evCode, param1, param2;
bool bcomplete=false;

while (hr = pME->GetEvent(&evCode, ¶m1, ¶m2, INFINITE), SUCCEEDED(hr))
{
switch(evCode)
{
case EC_USERABORT:
bcomplete=true;
break;

case EC_COMPLETE:
bcomplete=true;
break;
}
hr = pME->FreeEventParams(evCode, param1, param2);
if(bcomplete==true){break;}
}

If anybody could tell me how to get my movie to close as soon as the user hits any key, I would be very grateful.

Many thanks for any help,
KB

P.S. Apologies - I posted a similar message a few days ago; however, I am still stuck and my old post seems to have been lost pages back...
QuestionHow to get display card information by C++? Pin
yungivan30-Apr-02 5:00
yungivan30-Apr-02 5:00 
AnswerRe: How to get display card information by C++? Pin
Paul M Watt30-Apr-02 5:37
mentorPaul M Watt30-Apr-02 5:37 
GeneralSet mouse position Pin
ISIS5530-Apr-02 4:39
ISIS5530-Apr-02 4:39 
GeneralRe: Set mouse position Pin
Paul M Watt30-Apr-02 5:01
mentorPaul M Watt30-Apr-02 5:01 
GeneralRe: Set mouse position Pin
ISIS5530-Apr-02 9:36
ISIS5530-Apr-02 9:36 
GeneralRe: Set mouse position Pin
Paul M Watt30-Apr-02 10:02
mentorPaul M Watt30-Apr-02 10:02 
GeneralRe: Set mouse position Pin
ISIS5530-Apr-02 10:26
ISIS5530-Apr-02 10:26 
GeneralRe: Set mouse position Pin
Philippe Mori30-Apr-02 13:16
Philippe Mori30-Apr-02 13:16 
GeneralCWaitCursor Pin
Steve Hopkins30-Apr-02 4:21
Steve Hopkins30-Apr-02 4:21 
GeneralRe: CWaitCursor Pin
lucy30-Apr-02 4:31
lucy30-Apr-02 4:31 
GeneralRe: CWaitCursor Pin
Steve Hopkins30-Apr-02 5:04
Steve Hopkins30-Apr-02 5:04 
GeneralRe: CWaitCursor Pin
Ravi Bhavnani30-Apr-02 9:08
professionalRavi Bhavnani30-Apr-02 9:08 
GeneralRe: CWaitCursor Pin
Philippe Mori30-Apr-02 13:27
Philippe Mori30-Apr-02 13:27 
GeneralDisabling button at runtime Pin
girishc30-Apr-02 4:18
girishc30-Apr-02 4:18 
GeneralRe: Disabling button at runtime Pin
lucy30-Apr-02 4:29
lucy30-Apr-02 4:29 
GeneralRe: Disabling button at runtime Pin
Roger Allen30-Apr-02 4:31
Roger Allen30-Apr-02 4:31 
GeneralMax # of variables passed before using struct Pin
Codin' Carlos30-Apr-02 4:16
Codin' Carlos30-Apr-02 4:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.