Solved

a view as a listbox

Posted on 1998-09-07
9
223 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Webinar: MongoDB® Index Types

Join Percona’s Senior Technical Services Engineer, Adamo Tonete as he presents “MongoDB Index Types, How, When and Where Should They be Used?” on Wednesday, July 12, 2017 at 11:00 am PDT / 2:00 pm EDT (UTC-7).

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

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

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

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
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.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

628 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