Link to home
Start Free TrialLog in
Avatar of kevinnguyen
kevinnguyen

asked on

Graphics and dynamic control creation

I have two questions

1)I usually get involved with developing graphics application (not games) such as one can create 2D or 3D chart based on a set of given data points. My application should be able to run on Windows 9x/NT/2000/XP
Which one should I use ?
a)Windows GDI
b)Directr X
c)OpenGL

I heard that OpenGL can do games and graphics but can MFC
do the same without using any graphic library ?

2)Second, can MFC create dynamic Windows control on the fly (at run-time) in an MFC application just like Visual Basic does ? If it can, how is it done ?

I'd appreciate any links/sources or technical documents that can answer my two questions ?
Avatar of fl0yd
fl0yd

1) You certainly cannot do with windows GDI what OpenGL/DirectX can. But for simple drawing GDI-functions are sufficient. OpenGL/DX do ask you to do a LOT of initialization and uninitilization.
2) If I recall correct you can accomplish this:
CButton* pB = new CButton;
pB->Create( lpszCaption, dwStyle, rect, pParentWnd, nID );
Don't forget to
delete pB;
if you don't need the button any more.
Avatar of kevinnguyen

ASKER

How can I add the newly created button to "MyDialog" dialog at a desired location ? What function do I call and what are the parameters ?
ASKER CERTIFIED SOLUTION
Avatar of fl0yd
fl0yd

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial