- Create my own Custom Controls
- Posted by Spikinsson on July 11th, 2003
Hi, I want to create my own Custom Controls using MSVC++ 6.0 without MFC, I can't seem to
find a good tutorial anywhere though, does anybody have experience on creating controls
and could you give me some pointers on how to get started? Or do you know where I can find
a good tutorial, where?
Regards,
Spikinsson
- Posted by Bob Hairgrove on July 11th, 2003
On Fri, 11 Jul 2003 17:38:18 GMT, "Spikinsson" <not@gonna.tell.ya>
wrote:
OK, if you have MSVC, you have the MSDN Windows API documentation.
There are at least two approaches you can take:
(a) subclass existing Windows controls;
(b) create your controls normally as child windows with the
appropriate Window styles.
For tutorials, I suggest anything by Charles Petzold.
--
Bob Hairgrove
rhairgroveNoSpam@Pleasebigfoot.com
- Posted by Spikinsson on July 11th, 2003
"Bob Hairgrove" wrote:
I didn't know what to search for exactly, but I've found some information under the
subject ATL, which at first sight seems extremely useful.
Thanks for the help.
- Posted by John Carson on July 12th, 2003
"Spikinsson" <not@gonna.tell.ya> wrote in message
news:eCCPa.1133$F92.24@afrodite.telenet-ops.be
http://www.codeproject.com/miscctrl/
--
John Carson
1. To reply to email address, remove donald
2. Don't reply to email address (post here instead)
- Posted by James Brown on July 12th, 2003
Check out the tutorials section on my website:
James
--
www.catch22.org.uk
Free Win32 Software, Source Code and Tutorials
"Spikinsson" <not@gonna.tell.ya> wrote in message
news:eCCPa.1133$F92.24@afrodite.telenet-ops.be...
- Posted by Spikinsson on July 12th, 2003
"James Brown"...
OMG, man thats brilliant, thank you so much, this will be really useful to me, one last
question though, how do I build this custom control to a ocx? I want to make it
re-usable...
Anyway, thanks for the link man!
- Posted by James Brown on July 12th, 2003
It is pretty difficult to do active-x in pure C/C++. There is a
huge amount of code you need to write to support all the various
different interfaces that an active-x control must expose.
You need to use the active-template-library (ATL), which is a
set of C++ template classes which make writing ActiveX pretty easy..
Don't know much about that side of things tho..
Why do you want active-x? are you using VB as well? I always write
my custom controls to behave like standard windows controls, so
you just use CreateWindow / MoveWindow etc.
James
--
www.catch22.org.uk
Free Win32 Software, Source Code and Tutorials
"Spikinsson" <not@gonna.tell.ya> wrote in message
news:e5%Pa.3910$F92.257@afrodite.telenet-ops.be...
- Posted by Spikinsson on July 12th, 2003
"James Brown"
No, no. But I thought it would be easier to use in new programs...
- Posted by Chris on July 13th, 2003
On Sat, 12 Jul 2003 23:45:49 GMT, "Spikinsson" <not@gonna.tell.ya>
wrote:
Make a DLL if you need to share the same custom control(s) in more
than one application. Otherwise you should just link it into your
program.
Regards
Chris
---
Reply with no _PRIVACY_ in mail address.