15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


edit control in Property Sheet

Choi Kong Ho -- ckh@datamine.co.uk
Wednesday, April 02, 1997

Environment: VC++ 4.2-flat, NT 4.0

Hi

I'm having some trouble with the following, and
I'd be appreciate any help or reference to some
appropriate documentation.

I'm attempting to put Edit controls onto my
Property Sheet, not on Property Pages. So that the
same edit controls will appear along each page.

As I understands one would create Property Pages
first, perhaps using the Resource Tool, and then
add each page onto the Sheet.

Thanks

CK Choi

ckh@datamine.co.uk



Roger Onslow/Newcastle/Computer Systems Australia/
Thursday, April 03, 1997

>Environment: VC++ 4.2-flat, NT 4.0
>
>Hi
>
>I'm having some trouble with the following, and
>I'd be appreciate any help or reference to some
>appropriate documentation.
>
>I'm attempting to put Edit controls onto my
>Property Sheet, not on Property Pages. So that the
>same edit controls will appear along each page.
>
>As I understands one would create Property Pages
>first, perhaps using the Resource Tool, and then
>add each page onto the Sheet.

See VC help on property sheets - here is an extract

Adding Controls to a Property Sheet
By default, a property sheet allocates window area for the property pages, the 
tab index, and the OK, Cancel, and Apply buttons. (A modeless property sheet 
does not have the OK, Cancel, and Apply buttons.) You can add other controls to 
the property sheet. For example, you can add a preview window to the right of 
the property page area, to show the user what the current settings would look 
like if applied to an external object.
You can add controls to the property sheet dialog in the OnCreate handler. 
Accommodating additional controls usually requires expanding the size of the 
property sheet dialog. After calling the base class CPropertySheet::OnCreate, 
call GetWindowRect to get the width and height of the currently allocated 
property sheet window, expand the rectangle,s dimensions, and call MoveWindow 
to change the size of the property sheet window. 

So just create your property pages using the dialog editor in App studio, add 
them to your page (as per the documentation). Create your edit box etc. 
dynamically in code during the OnCreate.  Check out the sample code which adds 
a preview window to a property sheet (same technique for adding an edit box)

Hope this helps

Roger



Kostya Sebov -- sebov@is.kiev.ua
Friday, April 04, 1997

The PROPDLG sample on the Visual's CD can also be useful to examine.

	Kostya Sebov. 
----------------------------------------------------------------------------
Tel: +(38 044) 266-6387 /work/,   +(38 044) 513-2591 /home/
mailto:sebov@is.kiev.ua
---------------------------------------------------------------------------
MCPS, Leading programmer 
Intelligent Systems (Boston-Kiev)
voice/fax: +(38 044)266-6195
mailto:company@is.kiev.ua
http://www.i-rip.com


-----Original Message-----
From:	Roger Onslow/Newcastle/Computer Systems Australia/AU [SMTP:Roger_Onslow@compsys.com.au]
Sent:	Thursday, April 03, 1997 18:35
To:	mfc-l; Choi Kong Ho
Subject:	Re: edit control in Property Sheet

>Environment: VC++ 4.2-flat, NT 4.0
>
>Hi
>
>I'm having some trouble with the following, and
>I'd be appreciate any help or reference to some
>appropriate documentation.
>
>I'm attempting to put Edit controls onto my
>Property Sheet, not on Property Pages. So that the
>same edit controls will appear along each page.
>
>As I understands one would create Property Pages
>first, perhaps using the Resource Tool, and then
>add each page onto the Sheet.

See VC help on property sheets - here is an extract

[Kostya Sebov]   





Become an MFC-L member | Вернуться в корень Архива |