Hi there,

I created a window project "without using MFC" and I added
some
Dialog boxes to the project with some controls included
with them
like combo boxes, check boxes, .....?

How can I access these controls without using MFC? In
other words,
how can I change - for example - the check status of my
check box or
how I can upload and read from the combo box?

I tried to use the class wizard to creat CDialog class but
I got many
lines of errors that one of them says that CDialog is
undefined.

I really appreciate your help.

Mo,

Re: dialog items without MFC by Scott

Scott
Tue Jul 29 18:09:45 CDT 2003

Mohammad Salah wrote:
>
> Hi there,
>
> I created a window project "without using MFC" and I added
> some
> Dialog boxes to the project with some controls included
> with them
> like combo boxes, check boxes, .....?
>
> How can I access these controls without using MFC? In
> other words,
> how can I change - for example - the check status of my
> check box or
> how I can upload and read from the combo box?
>
> I tried to use the class wizard to creat CDialog class but
> I got many
> lines of errors that one of them says that CDialog is
> undefined.
>
> I really appreciate your help.
>
> Mo,

CDialog is an MFC class. You can't use it if you select "without using
MFC."

If you want to use C++ classes then you should use MFC. If you want to
use the C APIs then get yourself a copy of Petzold's "Programming
Windows" so you can learn the ways of Windows API programming.

In API programming you can retrieve any control's HWND with
GetDlgItem(hDlg, ID_OF_CONTROL);
Use the HWND to SendMessage one of the messages that the control
supports.

--
Scott McPhillips [VC++ MVP]