PDA

Click to See Complete Forum and Search --> : help me please!!!!


dubae524
Sep 2nd, 2001, 12:00 AM
How do you make your own control? I am not talking about the pseudocontrol-type, ActiveX, but rather a control made from scratch, such as an edit box or a push button. I am planning to create an application, but it will require a list box that can display multiple lines in a single list-item. I am also insistent in creating my own control for this. If you can not provide me the details on this, can you at least provide some formal names on this, so I make my search for details on this a bit easier.

Any help would be appreciated. Thank you. :)

jim mcnamara
Sep 2nd, 2001, 07:13 AM
Since you insist on starting from scratch, you'll have to part with some scratch. The topic isn't one you can find on a single MSDN page, more like about 80-100 of them.

Charles Petzold is the God of Windows Programming in C, C++ books.

He has several titles - all start with Programming Windows xxxxx.
All of them are excellent. A control is a window. You have to make an entire window from scratch, with no MFC shortcuts.

Go to Amazon.com or your local library and read. A LOT.
It's fun to make a window from scratch, but you'll see why production programmers use shortcuts like MFC.

parksie
Sep 2nd, 2001, 07:42 AM
For a non-ActiveX control, you need to register a window class for that control, and put the code for it into a DLL - this way lots of things can use it. You'd need to initialise them before you use them (in the same way as InitCommonControlsEx).

dubae524
Sep 2nd, 2001, 11:53 AM
Okay. Do you know any website where I could find something like a guide or FAQ? I don't necessarily want to go out and buy a book.

jim mcnamara
Sep 2nd, 2001, 01:03 PM
The best place to start reading tutorials is

www.codeguru.com

www.sysinternals.com also has some white papers

But - you don't seem to have grasped this point - this IS NOT like cutting and pasting code somebody else wrote. You have to know about vtables, property pages, WndProc, message queues, just to name a few things off the top of my head that you probably may not know a lot about. The reason I"m saying this is that if you actually knew about Windows Programming, you'd know that reading several tutorials is only going someone new to Windows Programming in far enough to get him/herself in trouble.

Not trying to rain on your parade. Do the tutorials. Please.

But there IS a reason Petzold has sold 50,000 books.... and whether you want to read books or not is beside the point. Other people, serious, professional programmers have to resort to reading. All the time.

Come back in six weeks and tell us how far you've gotten.