Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SetWindowsPos doesnt work on composite control

Status
Not open for further replies.

6142

Programmer
Oct 18, 2000
18
CA
Hi guys !

I'm working on windows NT on VC++6.

I'm developing an activeX compoiste control.This control contains other controls.

Well I have a problem.

The contained control is an MFC control. I use the function COleControl::OnDraw()
To draw on the control.

In the Contained control i called the function SetWindowPos() to increase the size of the control.

But the OnDraw() function returns the rcBounds rectangle in the new size , but the
validate rectangle is in the original size.

and It wont draw outside the original size of the control.

void CFlashCtrl::OnDraw(CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid)

rcBounds has the new size.
rcInvalid has the old size.

Do you know how can i solve the problem ?

Ron
 
Your COleControl should have coords as standard property of an OLE object. You should change them only through COM interfaces, or the API what offers that COleControl. John Fill
1c.bmp


ivfmd@mail.md
 
Thanks.
Do you know what COM interfaces can i use ?
Anyway I tried ColeControl::SetControlSize()
It simply didnt work.

Ron
 
SetControlSize way calls the COM interfaces what need to be called :). SetControlSize will resize only if control support resizing. John Fill
1c.bmp


ivfmd@mail.md
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top