Howto implement COM control with scrolling using ATL/WTL 
Author Message
 Howto implement COM control with scrolling using ATL/WTL

Hi,

I'm trying to add scrolling and zooming capablilities to a standard COM Full
Control (that should be used to display images) created using VCs Wizard.
I've found the WTL class CScrollWindowImpl which seems to be the building
block I'm missing, but I simply cannot figure out how to insert and enable
it in the code the wizard generates for me.

I've also noticed the CContainedWindow class; is this the way to go?

If anyone can post a small sample code that shows how to use
CScrollWindowImpl, I'll appreciate it! Or alternatively point me in the
right direction...

Thanks in advance
Ulrik



Mon, 17 Jan 2005 18:01:24 GMT  
 Howto implement COM control with scrolling using ATL/WTL
The Wizard-generated control class derives from CComControl<CMyClass>.
Change it to

CComControl<CMyClass, CScrollWindowImpl<CMyClass> >

The second template parameter defaults to plain vanilla CWindowImpl. In
addition, you likely want your control to be windowed - set
m_bWindowOnly to true in your constructor.
--
With best wishes,
    Igor Tandetnik

"For every complex problem, there is a solution that is simple, neat,
and wrong." H.L. Mencken


Quote:
> Hi,

> I'm trying to add scrolling and zooming capablilities to a standard
COM Full
> Control (that should be used to display images) created using VCs
Wizard.
> I've found the WTL class CScrollWindowImpl which seems to be the
building
> block I'm missing, but I simply cannot figure out how to insert and
enable
> it in the code the wizard generates for me.

> I've also noticed the CContainedWindow class; is this the way to go?

> If anyone can post a small sample code that shows how to use
> CScrollWindowImpl, I'll appreciate it! Or alternatively point me in
the
> right direction...

> Thanks in advance
> Ulrik



Mon, 17 Jan 2005 22:35:58 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. HOWTO: MDI App, Each View a Dockable Contained COM Control, Using All ATL If Possible

2. Implement Toolbar in ATL using WTL

3. Howto make the data of one ATL control to other ATL controls

4. implement a COM interface using ATL

5. WTL - Very new to WTL - Trying to insert new COM object in WTL

6. HOWTO: Modal windows in ATL/WTL

7. ATL COM - Passing ATL COM classes through another ATL COM class in the same app

8. WTL edit controls in COM controls and beeps

9. Problem using activex control inside ATL com dll

10. Using the CommonDialog ActiveX Control from within an ATL COM dll

11. TreeView control using ATL COM

12. HOWTO Implement IObjectSafety in a C# .NET Windows Control like Q216434

 

 
Powered by phpBB® Forum Software