|
-
December 30th, 2005, 06:55 AM
#1
Dynamic adding of controls (MFC)
Hi,
Basically I'm creating an app where the entire thing is controlled by scripts. I want to be able to create a window on-the-fly, with controls added via scripting. The problem is I'm also trying to do it in MFC.
I've had a look at the message map, and realised it's static, so even if i could hack into it and change some entries dynamically, I'd still have to create a different class for each different window, which is not what i want.
I've also had a look at overriding the WindowProc() function in my dialog, and dispatching WM_PAINT, WM_NCPAINT, and WM_DRAWITEM messages to my list of controls. Although this seems the most promising approach, the controls don't draw. (The OnPaint() handlers ARE called successfully though.) I usually wouldnt just die there and post on a forum but i actually have no idea how to debug this!
Any help would be MUCH appreciated!
James Molloy
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|