Click here to Skip to main content
15,886,919 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Adding Sound to AVI Files Pin
normanS13-Jun-05 16:18
normanS13-Jun-05 16:18 
GeneralRe: Adding Sound to AVI Files Pin
normanS13-Jun-05 20:54
normanS13-Jun-05 20:54 
Generalcustomize key bindings / accelerators Pin
ehh13-Jun-05 8:10
ehh13-Jun-05 8:10 
GeneralRe: customize key bindings / accelerators Pin
Blake Miller13-Jun-05 8:50
Blake Miller13-Jun-05 8:50 
GeneralRe: customize key bindings / accelerators Pin
ehh14-Jun-05 3:55
ehh14-Jun-05 3:55 
GeneralRe: customize key bindings / accelerators Pin
Blake Miller14-Jun-05 5:01
Blake Miller14-Jun-05 5:01 
GeneralRe: customize key bindings / accelerators Pin
ehh14-Jun-05 6:30
ehh14-Jun-05 6:30 
GeneralActiveX Ctrl hanging in MFC code: _AfxFindNextMnem Pin
Ian Bowler13-Jun-05 8:09
Ian Bowler13-Jun-05 8:09 
I have an ActiveX control that is a dialog with various other child controls. When the dialog starts up, no control appears to have focus (I haven't explicitly given any child the focus). If I hit a key before giving a child control the focus (via a mouse click), I hang. This is the MFC loop I'm hanging in:

pWnd = pWndStart = _AfxGetChildControl(pWndDlg, pWnd);

while (TRUE)
{
pWnd = _AfxNextControl(pWndDlg, pWnd, CWP_SKIPINVISIBLE | CWP_SKIPDISABLED);

if (COccManager::IsMatchingMnemonic(pWnd, lpMsg))
break;

if (pWnd == pWndStart)
return NULL;
}

Obviously this loop is checking all child controls for a mnemonic that matches the pressed key. If it finds the control with the matching mnemonic, or loops through all of the controls without a match, it returns.

My problem is it never finds a match (whether I hit a matching key or not) and pWnd never equals pWndStart inside the loop.

I've checked my dialog for duplicate mnemonics (though that shouldn't cause this problem).

I'm running out of ideas. Any thoughts?

Thanks!

NOTE: I'm also not getting control Tabbing behavior. I've set my tab order but the Tab key does nothing. I'm thinking these problems are related?

-Ian
GeneralExpanding Trees Pin
victorsk13-Jun-05 7:56
victorsk13-Jun-05 7:56 
Generaltoupper macro key Pin
Stober13-Jun-05 6:56
Stober13-Jun-05 6:56 
GeneralRe: toupper macro key Pin
Chris Losinger13-Jun-05 7:06
professionalChris Losinger13-Jun-05 7:06 
GeneralRe: toupper macro key Pin
Stober13-Jun-05 7:24
Stober13-Jun-05 7:24 
GeneralRe: toupper macro key Pin
Chris Losinger13-Jun-05 7:26
professionalChris Losinger13-Jun-05 7:26 
GeneralRe: toupper macro key Pin
Stober13-Jun-05 8:57
Stober13-Jun-05 8:57 
GeneralVery basic question Pin
Opa Knack13-Jun-05 6:49
Opa Knack13-Jun-05 6:49 
GeneralRe: Very basic question Pin
Maximilien13-Jun-05 7:13
Maximilien13-Jun-05 7:13 
GeneralRe: Very basic question Pin
Budric B.13-Jun-05 7:16
Budric B.13-Jun-05 7:16 
GeneralRe: Very basic question Pin
Opa Knack13-Jun-05 7:28
Opa Knack13-Jun-05 7:28 
GeneralRe: Very basic question Pin
Cedric Moonen13-Jun-05 7:37
Cedric Moonen13-Jun-05 7:37 
GeneralRe: Very basic question Pin
Opa Knack13-Jun-05 7:45
Opa Knack13-Jun-05 7:45 
GeneralRe: Very basic question Pin
Cedric Moonen13-Jun-05 8:03
Cedric Moonen13-Jun-05 8:03 
GeneralRe: Very basic question Pin
David Crow13-Jun-05 7:00
David Crow13-Jun-05 7:00 
GeneralRe: Very basic question Pin
Opa Knack13-Jun-05 10:04
Opa Knack13-Jun-05 10:04 
GeneralRe: Very basic question Pin
David Crow13-Jun-05 8:30
David Crow13-Jun-05 8:30 
QuestionHow do I remove the WS_THICKFRAME style? Pin
Anonymous13-Jun-05 6:12
Anonymous13-Jun-05 6:12 

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.