Re: Dialog window auto resizing
- From: Paul Monson <paulm@xxxxxxxxxx>
- Date: Mon, 26 Nov 2007 10:28:13 -0800
By default dialog units are used to specify sizes in dialog templates(not pixels). I checked the documentation and headers but I couldn't find a way to specify layout in pixels in a dialog template.
To understand this better you might check out the documentation for GetDialogBaseUnits as a starting point.
http://msdn2.microsoft.com/en-us/library/ms929231.aspx
Paul Monson
Intrinsyc
Baranidharan wrote:
Hi Paul,.
thanks.Yes, it is an .RC file. and the dialog resource is defined like
this.
IDD_DIALOG1 DIALOG 0, 0, 240, 320
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Dialog"
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Select Account",IDC_STATIC,15,8,57,14
COMBOBOX IDC_COMBO1,13,19,166,16,CBS_DROPDOWN | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Close",IDC_BUTTON2,113,167,64,13
END
I run this program and in the WM_INITDIALOG, I do a GetWindowRect
( hDlg, &rect ), I get the dimensions to be 360 x 540 as against 240 x
320.
If this is due to rescaling at runtime based on font size how could i
avoid this ???
Regards
Barani.
On Nov 22, 12:36 am, Paul Monson <pa...@xxxxxxxxxx> wrote:Is this an .RC file? Could you post an example?
I suspect it could be that your dialog is layed out using dialog units,
which involves rescaling at runtime based on the system font size
Paul Monson
Intrinsyc
Baranidharan wrote:Thanks a lot for your reply.
My doubt is that , Isnt VS 2005 Dialog editor supposed to WYSIWIG. I
am not resizing the dialog at runtime in the emulator. I just launch
the application but I do not see the dialog as it was in the WYSIWIG.
Is there any scaling involved behind the screens ?
Regards
On Nov 20, 7:30 pm, r_z_aret@xxxxxxxxxxxx wrote:
On Mon, 19 Nov 2007 03:59:16 -0800 (PST), Baranidharan
<baran...@xxxxxxxxx> wrote:
Hi all,Dealing with multiple screen dimensions is becoming more and more
I create a dialog window using the VS 2005 dialog editor, with
dimensions 240 x 320 (manually editing in the resource file) and add
some controls. When I test the dialog appearance using the "Test
Dialog" button things are ok but when I run the application on
emulator ( QVGA mode ) the placement and the sizes of the controls go
haphazard.
important, and is a somewhat hot topic. For info on my approach, see
my 8 Nov 07 contribution to a thread called " how to implement
resizing for a win32 dialog box" in
microsoft.public.win32.programmer.ui; it's code I use for "big"
Windows _and_ Windows CE platforms such as Pocket PC. I think
Microsoft is making some serious attempts to address the problem with
WPF (Windows Presentation Foundation).
Why is it happening ? What should i do to get it as i see in the-----------------------------------------
editor ?
Thanks in advance,
Regards
Barani.
To reply to me, remove the underscores (_) from my email address (and please indicate which newsgroup and message).
Robert E. Zaret, eMVP
PenFact, Inc.
20 Park Plaza, Suite 478
Boston, MA 02116www.penfact.com
- Follow-Ups:
- Re: Dialog window auto resizing
- From: Baranidharan
- Re: Dialog window auto resizing
- References:
- Dialog window auto resizing
- From: Baranidharan
- Re: Dialog window auto resizing
- From: r_z_aret
- Re: Dialog window auto resizing
- From: Baranidharan
- Re: Dialog window auto resizing
- From: Paul Monson
- Re: Dialog window auto resizing
- From: Baranidharan
- Dialog window auto resizing
- Prev by Date: Re: Controlling cellular phone from computer
- Next by Date: Re: Controlling cellular phone from computer
- Previous by thread: Re: Dialog window auto resizing
- Next by thread: Re: Dialog window auto resizing
- Index(es):
Relevant Pages
|