How to create and add a custom made component to a Dialog based app (MFC)?

Posted by kobac on Stack Overflow See other posts from Stack Overflow or by kobac
Published on 2010-04-16T19:50:26Z Indexed on 2010/04/16 19:53 UTC
Read the original article Hit count: 129

Filed under:
|

I want to make a custom made component (a line chart), that would be used in other

applications.

I don't know 2 things:

1) Where should I use (within component class!) the methods for drawing, like FillRect

or PolyLine? In OnPaint handler that I should define and map it in MESSAGE MAP? Will

it (OnPaint handler) be called from OnPaint handler of the dialog of the application

or where from?

2)How to connect the component, once it is made, to the test application, which will

for example be dialog based? Where should I instantiate that component? From an

OnCreate method of the MyAppDialog.cpp?

I started coding in MFC few days ago and I'm so confused about it.

Thanks in advance,

Cheers.

© Stack Overflow or respective owner

Related posts about mfc

Related posts about c++