Click here to Skip to main content
15,898,588 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Window focus Pin
Halawlaws25-Jul-05 5:51
Halawlaws25-Jul-05 5:51 
GeneralRe: Window focus Pin
toxcct25-Jul-05 5:54
toxcct25-Jul-05 5:54 
GeneralRe: Window focus Pin
Halawlaws25-Jul-05 5:56
Halawlaws25-Jul-05 5:56 
GeneralRe: Window focus Pin
Halawlaws25-Jul-05 6:06
Halawlaws25-Jul-05 6:06 
GeneralRe: Window focus Pin
David Crow25-Jul-05 6:27
David Crow25-Jul-05 6:27 
GeneralRe: Window focus Pin
Trollslayer25-Jul-05 7:11
mentorTrollslayer25-Jul-05 7:11 
GeneralRe: Window focus Pin
David Crow25-Jul-05 7:32
David Crow25-Jul-05 7:32 
GeneralRe: Window focus Pin
David Crow25-Jul-05 6:26
David Crow25-Jul-05 6:26 
Halawlaws wrote:
if (Lp.checkcon2() && (GetFocus() == GetDlgItem(IDD_AUTOMATIC)))

I've yet to figure out why people do this and then complain that it does not work.

To figure out exactly which part of the above statement is not working, break it up into manageable pieces, like:

// set a breakpoint on this line and single-step through each statement.
// note the value of pWnd1 and pWnd2 along the way
CWnd *pWnd1 = GetFocus();
if (pWnd1 != NULL)
{
    CWnd *pWnd2 = GetDlgItem(IDD_AUTOMATIC);
    if (pWnd2 != NULL)
    {
        if (pWnd1 == pWnd2)
            ...
    }
}
At this point, you should know the return value of GetFocus() and GetDlgItem() and whether they are equal or not.


"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown


GeneralRe: Window focus Pin
David Crow25-Jul-05 5:45
David Crow25-Jul-05 5:45 
GeneralRe: Window focus Pin
Halawlaws25-Jul-05 5:50
Halawlaws25-Jul-05 5:50 
GeneralRe: Window focus Pin
Marc Soleda25-Jul-05 5:42
Marc Soleda25-Jul-05 5:42 
GeneralUse a DLLs, which uses mfc as shared dll, from App. that uses mfc as static dll. Pin
Yaeli!!!25-Jul-05 4:47
sussYaeli!!!25-Jul-05 4:47 
GeneralRe: Use a DLLs, which uses mfc as shared dll, from App. that uses mfc as static dll. Pin
Cool Ju25-Jul-05 19:38
Cool Ju25-Jul-05 19:38 
QuestionHow to call parent function from child? Pin
dy1325-Jul-05 4:46
dy1325-Jul-05 4:46 
AnswerRe: How to call parent function from child? Pin
Marc Soleda25-Jul-05 4:59
Marc Soleda25-Jul-05 4:59 
GeneralUse a DLLs, which uses mfc as shared dll, from App. that uses mfc as static dll. Pin
Anonymous25-Jul-05 4:43
Anonymous25-Jul-05 4:43 
GeneralPointers Pin
sroberts8225-Jul-05 4:39
sroberts8225-Jul-05 4:39 
GeneralRe: Pointers Pin
Chris Losinger25-Jul-05 4:44
professionalChris Losinger25-Jul-05 4:44 
GeneralRe: Pointers Pin
toxcct25-Jul-05 5:53
toxcct25-Jul-05 5:53 
Generalstd::string and looping backward Pin
LCI25-Jul-05 4:36
LCI25-Jul-05 4:36 
GeneralRe: std::string and looping backward Pin
Chris Losinger25-Jul-05 4:56
professionalChris Losinger25-Jul-05 4:56 
GeneralRe: std::string and looping backward Pin
LCI25-Jul-05 5:54
LCI25-Jul-05 5:54 
GeneralRe: std::string and looping backward Pin
S. Senthil Kumar25-Jul-05 6:27
S. Senthil Kumar25-Jul-05 6:27 
GeneralRe: std::string and looping backward Pin
LCI25-Jul-05 10:37
LCI25-Jul-05 10:37 
Generali need help in file.dat Pin
sara-m25-Jul-05 3:47
sara-m25-Jul-05 3:47 

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.