I tried calling CreateWindow with a lisbox class but I could not figure out
to populate it and I was not sure which callbacks I had to implement in the
winproc.
Thanks!
Siegfried
If you want raw Win32 API (which I also do - I don't use MFC or ATL, I
have my own classes), you should have a book like the old Petzold
(which was my favorite decades ago).
Christian
"Siegfried Heintze" <sieg...@heintze.com> wrote in message
news:uBmqrSbG...@TK2MSFTNGP04.phx.gbl...
MFC is just a C++ library over the Win32 API. Everything you do
with MFC can be done with plain API calls. It is just much more
spadework to get something done.
Now about a list box. List box control cannot be created as a
standalone window. It is ment to be a child window of other
window. So you will need some top-level window to host controls
like list box and others.
> I tried calling CreateWindow with a lisbox class but I could not
> figure out to populate it and I was not sure which callbacks I
> had to implement in the winproc.
Here's the section n MSDN library that contains info about UI
controls:
"Windows Controls"
http://msdn.microsoft.com/en-us/library/bb773173(VS.85).aspx
Specific section for list boxes:
"List Box"
http://msdn.microsoft.com/en-us/library/bb775146(VS.85).aspx
For each UI control you will find three subsections in the left
pane: About, Using and Reference. Read at least two first sections
to understand how a control works and how to manipulate it. Use
the Reference section to find full list of messages, styles and
constants that relate to the control.
Also, consider Control Spy tool. It is helpful when you need to
discover control's styles and appearance.
"Control Spy v2.0"
http://msdn.microsoft.com/en-us/library/bb773165(VS.85).aspx
HTH
Alex
>Can someone point me to some sample code that creates a listbox without a
>dialog box and without MFC?
We all have access to most of the source code for MFC, so even those
of us who avoid using MFC in our programs can find its source code
useful as a library. Reading the source code can be challenging, but
often enough you can quickly get enough info to get started on your
own code. Also, MFC is real code that is used in many real programs,
so you can be pretty sure it works (not necessarily efficiently or
safely).
>
>I tried calling CreateWindow with a lisbox class but I could not figure out
>to populate it and I was not sure which callbacks I had to implement in the
>winproc.
>
>Thanks!
>Siegfried
>
-----------------------------------------
To reply to me, remove the underscores (_) from my email address (and please indicate which newsgroup and message).
Robert E. Zaret, eMVP
PenFact, Inc.
20 Park Plaza, Suite 400
Boston, MA 02116
www.penfact.com
Dan Miller
"Siegfried Heintze" <sieg...@heintze.com> wrote in
news:uBmqrSbG...@TK2MSFTNGP04.phx.gbl: