Click here to Skip to main content
16,009,544 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: type casting a struct to LPARAM in SendMessage(...) Pin
moliate26-Feb-02 20:51
moliate26-Feb-02 20:51 
Generaljust typing error Pin
26-Feb-02 21:06
suss26-Feb-02 21:06 
GeneralRe: just typing error Pin
Steen Krogsgaard26-Feb-02 21:20
Steen Krogsgaard26-Feb-02 21:20 
GeneralRe: just typing error Pin
moliate26-Feb-02 22:02
moliate26-Feb-02 22:02 
Generalfile not found Pin
26-Feb-02 20:01
suss26-Feb-02 20:01 
GeneralRe: file not found Pin
Nish Nishant26-Feb-02 20:24
sitebuilderNish Nishant26-Feb-02 20:24 
GeneralHelp with OnKillFocus Pin
John Cruz26-Feb-02 19:39
John Cruz26-Feb-02 19:39 
GeneralRe: Help with OnKillFocus Pin
Derek Waters26-Feb-02 20:03
Derek Waters26-Feb-02 20:03 
OnKillFocus is a handler for WM_KILLFOCUS, which is sent to a window when it loses the focus. That's why it's called when you minimise or point to another window (as your game's window loses the focus). The change the window that has the focus, use SetFocus().

If you create a message box, that will by default obtain the focus, so your game will lose it. I don't think you need to worry about focus at all in this circumstance, you just need to:

if (game_is_won)
{
  MessageBox(NULL, _T("Game over, dude!"), _T("MyGame"), MB_OK);
}



------------------------
Derek Waters
derek@lj-oz.com
GeneralRe: Help with OnKillFocus Pin
John Cruz26-Feb-02 20:00
John Cruz26-Feb-02 20:00 
GeneralRe: Help with OnKillFocus Pin
Joaquín M López Muñoz26-Feb-02 20:00
Joaquín M López Muñoz26-Feb-02 20:00 
GeneralNeed help with sychronizing list control datas in different windows Pin
David Z26-Feb-02 17:50
David Z26-Feb-02 17:50 
GeneralRe: Need help with sychronizing list control datas in different windows Pin
Derek Waters26-Feb-02 18:48
Derek Waters26-Feb-02 18:48 
GeneralRe: Need help with sychronizing list control datas in different windows Pin
David Z26-Feb-02 20:58
David Z26-Feb-02 20:58 
GeneralRe: Need help with sychronizing list control datas in different windows Pin
peterchen27-Feb-02 5:48
peterchen27-Feb-02 5:48 
GeneralRe: Need help with sychronizing list control datas in different windows Pin
David Z27-Feb-02 10:46
David Z27-Feb-02 10:46 
GeneralFinding Child Windows Pin
Alan Blakely26-Feb-02 16:20
Alan Blakely26-Feb-02 16:20 
GeneralRe: Finding Child Windows Pin
Daniel Ferguson26-Feb-02 18:01
Daniel Ferguson26-Feb-02 18:01 
GeneralCWnd destruction Pin
alex.barylski26-Feb-02 13:30
alex.barylski26-Feb-02 13:30 
GeneralRe: CWnd destruction Pin
Jay Beckert26-Feb-02 13:57
Jay Beckert26-Feb-02 13:57 
GeneralRe: CWnd destruction Pin
alex.barylski26-Feb-02 13:57
alex.barylski26-Feb-02 13:57 
GeneralRe: CWnd destruction Pin
Christian Graus26-Feb-02 14:06
protectorChristian Graus26-Feb-02 14:06 
GeneralRe: CWnd destruction Pin
alex.barylski26-Feb-02 15:04
alex.barylski26-Feb-02 15:04 
GeneralRe: CWnd destruction Pin
Christian Graus26-Feb-02 15:02
protectorChristian Graus26-Feb-02 15:02 
GeneralRe: CWnd destruction Pin
Nish Nishant26-Feb-02 15:15
sitebuilderNish Nishant26-Feb-02 15:15 
GeneralRe: CWnd destruction Pin
Nish Nishant26-Feb-02 14:27
sitebuilderNish Nishant26-Feb-02 14:27 

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.