Solved

a view as a listbox

Posted on 1998-09-07
9
189 Views
Last Modified: 2013-11-20
Hi everybody!
it´s possible to have a view as a listbox, ie. a listbox embedded in a view. I tried with a formview with a listbox, but it does not like me very much.

is there another way to do it?
I´ll apprecaite any help
0
Comment
Question by:jespadas
9 Comments
 

Author Comment

by:jespadas
ID: 1321842
Edited text of question
0
 

Author Comment

by:jespadas
ID: 1321843
Edited text of question
0
 
LVL 1

Expert Comment

by:Andy_Keys
ID: 1321844
I done a formview iwth a list box, why does it not like you. If you post some code or give some reason "we" might be able to help
0
 
LVL 1

Expert Comment

by:amby
ID: 1321845
tried CListView ???
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:jespadas
ID: 1321846
I am sorry! I didn´t tell you guys. I am doing it on VC 1.5x, as you know I don´t have this great controls

0
 

Author Comment

by:jespadas
ID: 1321847
I don´t have this great controls on VC 1.5x
0
 

Author Comment

by:jespadas
ID: 1321848
Andy,

Formview works fine, but I Don´t like because I need to resize the control to fits on my view. I would like get it on a easy way like ListView on VC 32 bit version.
If I have no choice I am going to used...

thanks!!!


0
 
LVL 8

Accepted Solution

by:
Answers2000 earned 20 total points
ID: 1321849
I don't have VC1.5 anymore, but this should work

i. Override PreCreateWindow.  Create the window a Listbox with class name of "listbox" and style as you want.

2. When-ever you want to call list box functionality you can cast the CView pointer into a CListBox pointer

e.g. in CView

((CListBox *)this)->AddString( "Hello" ) ;

This cast will work because the CListBox class includes no additional data members beyond those in CWnd, and neither does your view.  Adding data members to the view should be okay, adding to the list box class (or a derived class of CListBox) is _not_.
0
 

Author Comment

by:jespadas
ID: 1321850
Thank you!
Sorry for accept until now :¬)
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now