Click here to Skip to main content
15,909,605 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: PM_QS_PAINT question. Pin
Christian Graus10-Jul-02 11:36
protectorChristian Graus10-Jul-02 11:36 
GeneralRe: PM_QS_PAINT question. Pin
Michael P Butler10-Jul-02 4:40
Michael P Butler10-Jul-02 4:40 
GeneralRe: PM_QS_PAINT question. Pin
Michael Liu10-Jul-02 4:50
Michael Liu10-Jul-02 4:50 
GeneralRe: PM_QS_PAINT question. Pin
Michael P Butler10-Jul-02 4:56
Michael P Butler10-Jul-02 4:56 
GeneralRe: PM_QS_PAINT question. Pin
Michael Liu10-Jul-02 5:00
Michael Liu10-Jul-02 5:00 
GeneralRe: PM_QS_PAINT question. Pin
Michael Liu10-Jul-02 6:03
Michael Liu10-Jul-02 6:03 
GeneralEDIT - load & save text. Pin
peterchen10-Jul-02 3:28
peterchen10-Jul-02 3:28 
Generalsetting focus to an editbox on a modal dlg, when the dlg is spawned Pin
ns10-Jul-02 3:13
ns10-Jul-02 3:13 
1) I tried putting the following:

CNewDialog cDlgNoOk;

cDlgNoOk.m_edit1.SetFocus();

Got a debug assert when it ran.

2) Then I tried putting it in the constructor- still asserts:

CNewDialog::CNewDialog(CWnd* pParent /*=NULL*/)
: CDialog(CNewDialog::IDD, pParent)
{
//{{AFX_DATA_INIT(CNewDialog)
none = NULL; // NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT

m_edit1.SetFocus();
}
3)Finally I put it in :
BOOL CNewDialog::OnInitDialog()
{
CDialog::OnInitDialog();

// TODO: Add extra initialization here
m_edit1.SetFocus();
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
It ran without asserting but the editbox didnt get the focus.....

Any suggestion on how to set the focus?
Thanks,
ns
GeneralRe: setting focus to an editbox on a modal dlg, when the dlg is spawned Pin
peterchen10-Jul-02 3:30
peterchen10-Jul-02 3:30 
GeneralWow! Thanks a million! SetFocus() works! Pin
ns10-Jul-02 3:45
ns10-Jul-02 3:45 
GeneralGetting the process listening on a specific TCP port Pin
Thomas Freudenberg10-Jul-02 2:55
Thomas Freudenberg10-Jul-02 2:55 
GeneralRe: Getting the process listening on a specific TCP port Pin
Brian Azzopardi10-Jul-02 3:06
Brian Azzopardi10-Jul-02 3:06 
GeneralRe: Getting the process listening on a specific TCP port Pin
Thomas Freudenberg10-Jul-02 3:12
Thomas Freudenberg10-Jul-02 3:12 
GeneralRe: Getting the process listening on a specific TCP port Pin
orcun colak10-Jul-02 5:51
orcun colak10-Jul-02 5:51 
GeneralRe: Getting the process listening on a specific TCP port Pin
Thomas Freudenberg10-Jul-02 6:18
Thomas Freudenberg10-Jul-02 6:18 
Generaldestroying one view from another view - beginner Pin
ns10-Jul-02 2:38
ns10-Jul-02 2:38 
GeneralRe: destroying one view from another view - beginner Pin
Mike Upton10-Jul-02 4:43
Mike Upton10-Jul-02 4:43 
GeneralHOWTO: change .exe icon in Win32 apz (NOT MFC, C compiler) Pin
BlackSmith10-Jul-02 2:36
BlackSmith10-Jul-02 2:36 
GeneralRe: HOWTO: change .exe icon in Win32 apz (NOT MFC, C compiler) Pin
Rage10-Jul-02 5:37
professionalRage10-Jul-02 5:37 
GeneralRe: HOWTO: change .exe icon in Win32 apz (NOT MFC, C compiler) Pin
Roger Stewart10-Jul-02 5:58
professionalRoger Stewart10-Jul-02 5:58 
GeneralRe: HOWTO: change .exe icon in Win32 apz (NOT MFC, C compiler) Pin
BlackSmith10-Jul-02 13:38
BlackSmith10-Jul-02 13:38 
GeneralRe: HOWTO: change .exe icon in Win32 apz (NOT MFC, C compiler) Pin
Roger Stewart10-Jul-02 14:20
professionalRoger Stewart10-Jul-02 14:20 
GeneralupdateAllViews() - quick question Pin
ns10-Jul-02 2:15
ns10-Jul-02 2:15 
GeneralRe: updateAllViews() not in class wizard?? Pin
ns10-Jul-02 2:26
ns10-Jul-02 2:26 
GeneralRe: updateAllViews() - quick question Pin
peterchen10-Jul-02 4:03
peterchen10-Jul-02 4:03 

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.