Hi everybody,
I'm programming in MFC, I have the following problem.
I created in the resource editor a CCommandButton that has the following id IDC_CONF_PASS_ATH_DETT the dialog is in an ActiveX enviroment.
then i wrote the following code:
<code>
GetDlgItem(IDC_CONF_PASS_ATH_DETT)->ShowWindow(FALSE);
</code>
because the code dumped i wrote even another version
<code>
CCommandButton *b;
b=(CCommandButton *)GetDlgItem(IDC_CONF_PASS_ATH_DETT);
b->ShowWindow(TRUE);
</code>
and discovered in Debug that b has a NULL value and that's why it dumped.
but why b has a NULL value
Any Idea thanks Alex
I'm programming in MFC, I have the following problem.
I created in the resource editor a CCommandButton that has the following id IDC_CONF_PASS_ATH_DETT the dialog is in an ActiveX enviroment.
then i wrote the following code:
<code>
GetDlgItem(IDC_CONF_PASS_ATH_DETT)->ShowWindow(FALSE);
</code>
because the code dumped i wrote even another version
<code>
CCommandButton *b;
b=(CCommandButton *)GetDlgItem(IDC_CONF_PASS_ATH_DETT);
b->ShowWindow(TRUE);
</code>
and discovered in Debug that b has a NULL value and that's why it dumped.
but why b has a NULL value
Any Idea thanks Alex