Re: OnInitDialog() and edit control

"timza1221" <timza1221-/[email protected]> Wed, 15 Aug 2012 15:07:44 -0000
Newsgroups gmane.comp.windows.wtl
Message-ID <[email protected]>






--- In [email protected], "Igor Tandetnik" <itandetnik@...> wrote:
>
> timza1221 <timza1221@...> wrote:
> > I have an edit control in a dialog (of type CDialogImpl<CCWEditDlg>)
> > At the dialog OnInitDialog() the control is not a window. (has no handle I assume)
> 
> What makes you believe that? By the time OnInitDialog is called, all controls specified in the dialog resource should already have been created.
> -- 
> Igor Tandetnik
>

I have a variable for the edit control and the variable is connected to the dialog:
BEGIN_DDX_MAP(CCWEditDlg)
	DDX_CONTROL(IDC_EDIT1, m_wndEdit)
	DDX_TEXT(IDC_EDIT1, m_sEditContents)
END_DDX_MAP()

My variable m_wndEdit is defined as this type:
class CCmtEditControl : public CWindowImpl<CCmtEditControl, CEdit>

I am probably missing something to be able to refer m_wndEdit.IsWindow(), and manipulate it as a window object? (that can refer to the dialog edit control).
When I call m_wndEdit.IsWindow() it's false there at OnInitDialog().

Thanks very much Igor!
Todd.







------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/wtl/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/wtl/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/