Re: Dialog size in pixel
You could resize your bitmap at runtime to fit the background of the dialog:
http://www.codeproject.com/KB/dialog/bmpdlg01.aspx
If you need to put controls on the background then Ali's article might be of
interest to you. Buttons are easy since they don't have a lot of open
space, but you will want static controls to be transparent:
http://www.codeproject.com/KB/static/TransparentStaticCtrl.aspx
Another way of controlling how the dialog resizes is to use a layout manager
like:
http://www.codeproject.com/KB/dialog/resizabledialog.aspx
And, you could fix the size of the dialog so that users can't move it if
you don't want the bitmap to be resized to a funny shape.
Tom
"Erakis" <Erakis@discussions.microsoft.com> wrote in message
news:D39209AD-C0F3-439D-88C7-DE0D91CB2B1E@microsoft.com...
Hi and thanks for your help, I appreciate it.
I know that I can Move and Size my windows at runtime. But do you imagine
that I will need to do that way for 80 dialogs and each of their component
without beeing able to do it in design mode !!! I mean in blind way...
Why when using Visual Studio .NET C# or Delphi Win32 we can set the
windows
size while designing and not with MFC ??? It is absurd !!!
"David Ching" wrote:
"Erakis" <Erakis@discussions.microsoft.com> wrote in message
news:28C0C07B-3012-46FD-B892-FF8380CD9D6C@microsoft.com...
Hi, I'm programming an application for Windows CE.
I have to draw/set a bitmap as background of my dialog.
This is like a skinned application. For that, I need to set the dialog
size
to 340x234 "pixels" and not"Base unit" like resource do.
Also I will have to add others components on this dialog like
(Button,TextBox, Label, ListBox, etc...) at a specified position in
pixels
sothat they fit on the background image.
If user change de display settings "DPI", the dialog size will
changeand I
don't want that ! Because the position/dimension of bitmaps onmy dialog
will
no longer fit.
Is someone have any clues/suggestion to help me with that problem ?
You're stuck with dialog units in the resource editor. But you can fix
the
locations/size of the dialog and its controls as it is displayed. In
OnInitDialog(), call MoveWindow() with the desired size, e.g. 340x234.
In
OnMove(), move all the child controls to the desired pixel locations.
-- David