View Single Post
Go4Expert Founder
3Oct2007,04:04  
shabbir's Avatar
Quote:
in the onpaint function of my panel i create an instance of my control and i add it to the controls of the panel.
Instead of doing this in OnPaint you should be doing it in OnCreateControl. The OnPaint of which ever class you mentioned.