-
custom controls
does anybody know how to create custom controls and use them like standard controls.. the mfc activex wizard is perfect only i dont want it as an ocx i want to include it in the exe and as far as i can see i cant do much with the Custom Control from mfc
-
-
thx but it is really hard this way and can you use it more than 1 time ?
-
old thread
um i mean i wanna make a custom control just like in visual basic if anybody worked with it you make usercontrols very easy almost like creating activex controls in c++ but with these from c++ you can't put them in the exe.. so how do you exactly make a custom control in mfc c++ to use it as many times as you want..
-
You derive a class from the desired controls base class (ie CMyEdit from CEdit ), subclass as required (add functionality to your requirements).
Include this class in any required apps (CMyEdit).
If use resource editor add controls as base type (CEdit) and then edit generated code to change base class (CEdit) to your subclassed type (CMyEdit)
If creating at run time declare as subclassed type (CMyEdit) and use the base classes' functionality ( CEdit.Create() )
-
ah i see but if i want to make my own control( a flat button ) i make a class for it but how do i have it in the control bar ? and place it on the dlg window