Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to develop a control which can show itself on the Tool box of visual studio so that I can drag the control to the Form View of my dialog resource. I can only find C# examples so far, no plain c example on the internet is found available so far, I believe there must be similar requirements from other people, has any one managed to do this and be willing to share his know how?

What I have tried:

I can create custom control in my program, but I have to use CreateWindow to create my control on the formview rather than directly drag the control to the FormView, so I can not prearrange the looking of my Formview before running the program.
Posted
Updated 17-Sep-17 23:04pm
v2

1 solution

You can't: plain C doesn't have any concept of Objects, and you need an object to load a control into the toolbox. You would need C++ or a C# wrapper to do that.
 
Share this answer
 
Comments
viqfoai 18-Sep-17 22:32pm    
I do not think so, when in the early hood of visual C in 1990's, before C++ and C# is available, we can already edit dialog resources by adding system defined controls like BUTTON, EDIT or Combo, etc.,
I have a book published in 1993, the English name is "The Complete Reference to Windows Application Development", written by James W. McCord, in one resource edit example, it can be like this:

MainDialog DIALOG 6, 18, 160, 100
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Data Transfer"
FONT 8, "HELV"
BEGIN
...
...
...
CONTROL "TYPEA", 101, "Button", BS_AUTORADIOBUTTON, 5, 29, 39, 10
...
...
...
END

So many years passed, but the resource file style is still the same, what I need is to create my own control which can be added to resource file as in above resource editor, I believe if my control can be added by this way, it is not a problem to put it into the tool box

as Microsoft C++ is presented in 1992, the book with above information is published in 1993 while Visual C is already fully matured, this book is for windows C programming not C++.

with above, I believe C++ or C# is not necessary to develop the standard windows control in toolbox

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900