Having trouble with the order of member functions...
In a modal dialog, shouldn't the OnInitDialog occur before the OnChange
function of an edit box?

EVC 3.0, MFC, PPC2002.

TIA,
Dan

Re: OnInitDialog problem by Joćo

João
Tue Oct 05 05:35:16 CDT 2004

OnInitDialog is called when the dialog is being instantiated. Before calling
base class' OnInitDialog, no controls have been created yet.

--
João Paulo Figueira
Embedded MVP

<Dan Joerissen> wrote in message
news:upF6PSjqEHA.1964@TK2MSFTNGP12.phx.gbl...
> Having trouble with the order of member functions...
> In a modal dialog, shouldn't the OnInitDialog occur before the OnChange
> function of an edit box?
>
> EVC 3.0, MFC, PPC2002.
>
> TIA,
> Dan
>
>
>



Re: OnInitDialog problem by Dan

Dan
Tue Oct 05 18:44:18 CDT 2004

Thanks for the reply.
Any idea why the following occurs?

If I have a spin control autobuddied with an edit box with the "set buddy
integer" option on, my ONCHANGE event for the edit box gets called before
the OnInitDialog, yet if I turn off the "set buddy integer" option, the
OnInitDialog gets called first (as I expected).

Can someone explain this behavior? Is this usual?

Could it be because I initialize the member variable for the edit box in
this manner?

CGraphicsDlg::CGraphicsDlg(CWnd* pParent /*=NULL*/)
: CDialog(CGraphicsDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CGraphicsDlg)
m_nVertexEDIT=50;
m_nSliderEDIT = 1000;
//}}AFX_DATA_INIT
}


I was trying to handle the change in the edit box when a user is tapping one
of the arrows. Should I be using the UDN_DELTAPOS of the spin control?

EVC 3.0, MFC, PPC2002.

Thanks,
Dan