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!

Problems with Drawing an MFC ActiveX control inside on ATL compsoite

Status
Not open for further replies.

6142

Programmer
Oct 18, 2000
18
CA
Hello Everybody !!!

I'm working on Windows NT platform on VC++6.
I have build an MFC control = "Flash control".
With the properties assigned to this control you can pick two colors and the
control will be changing its color between them every second. (Flashing).

Now all this is based on the Fact that a timer Call every second the InavlidateControl ()
function (I tried also InvalidateRect()) , and it shoud call the OnDraw function.
Then in OnDraw function i call the FillRect function in order to paint the color of the control.
I get the CDC (device context class) as a parameter.

I have put this control into a composite control , and then I tried the composite control on an MFC
dialog.

It doesnt work.

1) The OnDraw is not being called in response to the Invalidatecontrol () function, that is being called
by the timer.

2) I tried replacing InvalidateControl() with SendMessage(WM_PAINT) and then
OnDraw() is being called its being called . but doesnt draw anything.

Anybody has any ideas ?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top