Help with DrawFrameControl
Is there a replacement for the API function 'DrawFrameControl'? This command seems to link to the old API calls and loads NT4 (older) style controls. Normally this wouldn't matter, but these controls are the only ones in the entire app that aren't Windows 7 or XP like. Is there a way to use the newer style controls in a CView?
Thank you in advance for any help you provide and any light you can shed on this subject,
--Victor
Re: Help with DrawFrameControl
What I am looking for is a way to dynamically add and remove radio buttons and check boxes directly to a windows View (not a VB form or a C++ dialog) and/or an MFC CControlBar. The DrawFrameControl only draws older looking controls as it is still linked to the old API calls. I want to use the much more attractive and graphically active controls offered under XP and Win 7.
Thanks again,
--Victor
Re: Help with DrawFrameControl
"dynamically add and remove radio buttons and check boxes" has nothing to do with the owner drawing these controls. So you don't need any DrawFrameControl and other methods if you need only stndard control look and feel.
Just use CButton::Create method to create your boxes...
Another way would be to create all the needed boxes on the dialog template and then only show/hide them depending on your needs
Re: Help with DrawFrameControl
I know about creating buttons dynamically, and that works fine for a frame that isn't likely to change with almost every click. So I can't get the results I want and maintain stability over execution time via the 'Create' method not without writing way more code than it is worth. To refine my question a little bit, what I would like to know is there any descent information on this planet as to how the function 'DrawFrameControl' is utilized properly and completely. I can get controls, and they work but they are old-style looking controls and I wish to implement the newer look of Windows 7, so how does this play into things?
pDC->DrawFrameControl(rci, DFC_BUTTON, DFCS_BUTTONRADIOIMAGE | DFCS_BUTTONRADIOMASK | dwHotStyle);
How does one reference and implement the bitmap in this case? and the mask? I cannot fine one piece of information on any of this. So I can't even make up a reasonable lie as to how it is used. Any Help Would be great . . . Thanks in advance . . .
--Victor
Re: Help with DrawFrameControl
Quote:
Originally Posted by
He_That_Is
... I can get controls, and they work but they are old-style looking controls and I wish to implement the newer look of Windows 7, so how does this play into things?
Have a look at this blog. Or search for DrawFrameControl themes
Re: Help with DrawFrameControl
Hey Thanks for the links to the blog and the Search Criteria. The thing is this, I don't want to start adding a lot of extra code and such to accomplish this task. Especially when it comes to third party code etc.. DrawFrameControl should be able to handle the task without adding a great deal of code.
Based on this:
pDC->DrawFrameControl(rci, DFC_BUTTON, DFCS_BUTTONRADIOIMAGE | DFCS_BUTTONRADIOMASK | DFCS_CHECKED | dwHotStyle);
I just want to learn what 'DFCS_BUTTONRADIOIMAGE | DFCS_BUTTONRADIOMASK' actually cause, and how does one associate a bitmap with the control after this call to DrawFrameControl.
It really shouldn't be all this difficult to find this simple information (one would think).
Thanks again,
--Victor