How to create two-column list box in Visual C++ without MFC?

S

Scott H

I'm writing a chess game reviewer for Yahoo! players. This will be my
first Visual C++ application. Right now the list box containing the
moves in a history file looks like this:

___________
|Start
|1. W e2-e4
|2. B e7-e5
|3. W g1-f3
|4. B b8-c6
|.
|.
|.

I want to change it to this
_____________
|_|White Black
|0. ... ...
|1.e2-e4 e7-e5
|2.g1-f3 b8-c6
|.
|.
|.

and allow the user to select only a single move at a time.

I've looked through the LB_ messages and LBS_ styles and have found no
successful combination. I've also received a few suggestions from
CodeGuru about ListView, multiple ListBoxes, and list control:

"Use a listview control instead or even simpler, two listbox controls:
one for 'White' and one for 'Black.'"

"List view control is created using Windows registered class called
SysListView32 and defined using WC_LISTVIEW macro."

However, WC_LISTVIEW isn't included in my help file, I haven't found a
web tutorial that includes the function SysListView32, and it isn't
obvious how to join two listboxes in a way that the user can only
select one entry.

I'm thinking about joining three ListBoxes, but if I did, I would want
a single scroll bar that would scroll each.
 
V

Victor Bazarov

Scott said:
I'm writing a chess game reviewer for Yahoo! players. This will be my
first Visual C++ application. Right now the list box [..]

I've looked through the LB_ messages and LBS_ styles [..]

However, [..] it isn't
obvious how to join two listboxes in a way that the user can only
select one entry. [..]

That is not a C++ language problem. Please post to the newsgroup that
deals with Windows API. I know of 'comp.os.ms-windows.programmer.*'
hierarchy. There are also several newsgroups that have 'mfc' in their
names.

V
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top