Valhalla Legends Forums Archive | Advanced Programming | Control Development with C++

AuthorMessageTime
Myndfyr
I primarily work with .NET, but I'm trying to develop controls that can be deployed for Windows. Ultimately, my goal is to be able to create skinnable controls. I've found that using .NET is extremely buggy for this kind of work, as well as a poor performer; and while I know enough C++ to get by, I'm not particularly well-versed with it.

Now, I've done a lot of reading about the Windows primitives, including buttons and that junk. My questions are:
* if I want to create skinnable controls with similar functionality, is it necessary to create new primitives, or can I just really amalgamate existing ones?
* if I were to mess with existing ones, would I be better off working with the Windows API or MFC?
* Finally, where can I get information on how to do it? I've spent quite a while on Google looking for information on skinning, as well as primitive control development. I'm on a limited budget (specifically, budget <= $0), and I need to be able to do this on my own. I have found nothing that really helps.

For clarification, I'm not developing the controls with MC++. My intent is to develop the controls with pure C++, and then either use P/Invoke to call them straight from the DLL (if I go with strict API) or an MC++ wrapper class.

Thanks for the info.
January 29, 2004, 3:11 AM
Adron
I think that doing it without MFC or similars would be a good idea. When writing a library, using other libraries if not absolutely necessary just adds a lot of dependencies to distribute with your apps.

You should use the functionality for owner drawn controls. This means that Windows manages the messages, clicks, selection etc, while you handle redrawing.

Look at "ms-help://MS.VSCC/MS.MSDNVS/winui/controls_3mk3.htm" if you have the same version of MSDN that I do. Otherwise search for "owner drawn", and the topic "Custom Controls" should appear rather high.

Basically, you will receive the WM_DRAWITEM message whenever the control needs to change looks. Windows will tell you what to draw - selected button, pressed button, disabled button, normal button etc. Menus, buttons, list boxes etc can all be owner drawn.
January 29, 2004, 9:45 AM

Search