*Custom Control Help! Using a classic C-Style custom control.*

*Custom Control Help! Using a classic C-Style custom control.*

Post by greggorob6 » Sun, 27 Jan 2008 02:48:44


*Custom Control Help! Using a classic C-Style custom control.*

Hello, I am attempting to port a classic C-style custom control into
a .net application.

Using Visual Studio 6,
This was originally done via the resource files in the project, using
a "CustomControl" item in the resource editor, and pointing the
"windowclass" to the specific class name of the developed custom
control. I would like to get the .net flexibility.

This window class is registered in the dll using the following code:

wc = Template;
wc.style |= CS_DBLCLKS;
wc.lpfnWndProc = RecordingWndProc;
wc.lpszClassName = PCS_RECORDING_CLASS;
if (!RegisterClassEx(&wc))
{
return FALSE;
}

As you see, it is very 'legacy'. I am attempting to use this in c++,
without the assistance of mfc. A nice user control or regular control
solution would be preferrable, I am trying to use the *.rc resource
stuff. Any help or direction?



In the usercontrol and regular control classes, I cannot find any way
to link the classes with the actual control (a graph control developed
by our company).
 
 
 

*Custom Control Help! Using a classic C-Style custom control.*

Post by Norman Bul » Sun, 27 Jan 2008 08:47:00


In your dialog template (.rc file) you use the CONTROL statement to
create an instance of a control other than the EDIT, LTEXT, BUTTON, etc.
built-in controls. See
http://www.yqcomputer.com/ (VS.85).aspx

You must register the window class before calling DialogBox() or
CreateDialog().

Norm

--
Norm

To reply, change domain to an *** feline.