Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

a view as a listbox

Posted on 1998-09-07
9
Medium Priority
?
235 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 1

Expert Comment

by:amby
ID: 1321845
tried CListView ???
0
 

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 60 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

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Suggested Courses

886 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