Solved

a view as a listbox

Posted on 1998-09-07
9
192 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Decoding 32 bit binary streams 6 37
Perl Awk Need Help 3 109
firstChar challenge 13 110
wordmultiple challenge 12 119
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: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
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.

920 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

16 Experts available now in Live!

Get 1:1 Help Now