|
|
|
|
Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
Dave A
|
Dec 2, 2004 - 6:11 PM
|
Hey all. New to prof-uis, been a few years since using MFC, so I’m rusty. I want to put an ActiveX control on a resizable dialog. The ActiveX control has it’s own rendering (it displays 3d scenes). When the user resizes the dialog, I need to resize the activex control proportionately. I know this must be dirt-simple, but like I said, I’m rusty. Importing the ActiveX to the project created CWnd wrapper classes, that should help, huh? Do I need to subclass the resizable dialog? Any hints greatly appreciated.
|
|
Technical Support
|
Dec 3, 2004 - 6:26 AM
|
You said that you have a resizable dialog (CExtResizableDialog -based) with an ActiveX control inside. We assume you have read the article How to create a window containing auto-resizable controlsand you are familiar with control anchoring, which makes controls auto-resizable. So, what you need to do is to put the following line into your dialog’s OnInitDialog method:AddAnchor( m_wndMyActiveX.m_hWnd, __RDA_LT, __RDA_RB ); Of course, you may use other anchoring parameters that suit your task best, but do not use the overloaded version (of AddAnchor ) that takes a dialog control identifier as the first parameter.
|
|