Click here to Skip to main content
15,914,074 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Reading/Writing Files Pin
palbano5-Jun-04 17:52
palbano5-Jun-04 17:52 
GeneralRe: Reading/Writing Files Pin
gabuchholz5-Jun-04 18:09
gabuchholz5-Jun-04 18:09 
GeneralScreen Resolution Pin
Renjith Ramachandran5-Jun-04 17:07
Renjith Ramachandran5-Jun-04 17:07 
GeneralRe: Screen Resolution Pin
palbano5-Jun-04 17:32
palbano5-Jun-04 17:32 
GeneralRe: Screen Resolution Pin
Renjith Ramachandran6-Jun-04 5:16
Renjith Ramachandran6-Jun-04 5:16 
GeneralRe: Screen Resolution Pin
User 66586-Jun-04 7:30
User 66586-Jun-04 7:30 
GeneralRe: Screen Resolution Pin
alex.barylski5-Jun-04 18:32
alex.barylski5-Jun-04 18:32 
GeneralPropertyPage, OnInitDialog, and SetFocus Pin
PJ Arends5-Jun-04 14:25
professionalPJ Arends5-Jun-04 14:25 
Hey All,

I am having a small problem setting the focus to a control on a property page in my OnInitDialog() function.
BOOL CPage::OnInitDialog()
{
    CPropertyPage::OnInitDialog();
<snip>
    if (some_condition)
    {
        m_Edit.SetReadOnly();
        m_ComboBox.SetFocus();
    }
    else
        m_Edit.SetFocus();
 
    return FALSE;  // return TRUE unless you set the focus to a control
}

It does not matter if some_condition is TRUE or FALSE, the m_Edit control always has the input focus. m_Edit is the first control in the tab order. Does returning FALSE from OnInitDialog() not work for property pages, or am I missing something?







Sonork 100.11743 Chicken Little

"You're obviously a superstar." - Christian Graus about me - 12 Feb '03

Within you lies the power for good - Use it!
GeneralRe: PropertyPage, OnInitDialog, and SetFocus Pin
David Crow7-Jun-04 2:46
David Crow7-Jun-04 2:46 
GeneralRe: PropertyPage, OnInitDialog, and SetFocus Pin
PJ Arends7-Jun-04 5:17
professionalPJ Arends7-Jun-04 5:17 
GeneralRe: PropertyPage, OnInitDialog, and SetFocus Pin
David Crow7-Jun-04 5:23
David Crow7-Jun-04 5:23 
GeneralRe: PropertyPage, OnInitDialog, and SetFocus Pin
PJ Arends7-Jun-04 6:37
professionalPJ Arends7-Jun-04 6:37 
GeneralRe: PropertyPage, OnInitDialog, and SetFocus Pin
David Crow7-Jun-04 7:05
David Crow7-Jun-04 7:05 
GeneralRe: PropertyPage, OnInitDialog, and SetFocus Pin
PJ Arends7-Jun-04 7:13
professionalPJ Arends7-Jun-04 7:13 
GeneralRe: PropertyPage, OnInitDialog, and SetFocus Pin
David Crow7-Jun-04 7:17
David Crow7-Jun-04 7:17 
GeneralButton... then Text here... Pin
Member 6226665-Jun-04 13:17
Member 6226665-Jun-04 13:17 
GeneralRe: Button... then Text here... Pin
bneacetp5-Jun-04 13:26
bneacetp5-Jun-04 13:26 
GeneralRe: Button... then Text here... Pin
Member 6226665-Jun-04 13:42
Member 6226665-Jun-04 13:42 
GeneralRe: Button... then Text here... Pin
bneacetp5-Jun-04 14:06
bneacetp5-Jun-04 14:06 
GeneralRe: Button... then Text here... Pin
David Crow7-Jun-04 2:48
David Crow7-Jun-04 2:48 
GeneralOptional Parameter Pin
Jorgen E.5-Jun-04 12:35
Jorgen E.5-Jun-04 12:35 
GeneralRe: Optional Parameter Pin
kfaday5-Jun-04 13:16
kfaday5-Jun-04 13:16 
GeneralRe: Optional Parameter Pin
Michael Dunn5-Jun-04 13:21
sitebuilderMichael Dunn5-Jun-04 13:21 
GeneralRe: Optional Parameter Pin
Jorgen E.5-Jun-04 13:30
Jorgen E.5-Jun-04 13:30 
General/OPT:REF Pin
Archer2825-Jun-04 11:07
Archer2825-Jun-04 11:07 

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.