Re: How to get dialog size?
"Bruce." <noone@example.net> wrote in message
news:e2IQk%23nmIHA.5956@TK2MSFTNGP03.phx.gbl...
"Scott McPhillips [MVP]" <org-dot-mvps-at-scottmcp> wrote in message
news:eRKkw9lmIHA.1164@TK2MSFTNGP02.phx.gbl...
Is this "dialog" implemented in a class derived from CFormView? By
"resize the dialog" do you mean in the dialog editor?
While that should be easy to answer, it just doesn't seem very obvious to
me as it should be. There are references to CFormView in the main exe
program. However, I see no references to CFormView in the DLL that
contains the dialog class. Here are a just a few lines excerpts from from
the dialog class declaration in the header file for the DLL. Hopefully
enough so you can tell what's it's about:
class ATL_NO_VTABLE CBarViewer :
public CComObjectRootEx<CComSingleThreadModel>,
...........
public CComCoClass<CBarViewer, &CLSID_BarViewer>
{
public:
CBarViewer();
...........
BEGIN_COM_MAP(CBarViewer)
COM_INTERFACE_ENTRY(IBarViewer)
COM_INTERFACE_ENTRY(IDispatch)
...........
BEGIN_MSG_MAP(CBarViewer)
CHAIN_MSG_MAP(CComCompositeControl<CBarViewer>)
...........
};
Looks like you are dealing with an ActiveX control, implemented with the
ATL library. So my comments about CScrollView do not apply. In fact, within
this class MFC does not apply.
You can probably find the scroll bar setup within the DLL code by searching
around near SCROLLINFO or SetScrollInfo. The previous answers about "dialog
units" and converting them into pixel dimensions will probably lead you to a
way to compute the "original" size of the dialog template.
--
Scott McPhillips [VC++ MVP]