Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. CListBox Properties

CListBox Properties

Scheduled Pinned Locked Moved C / C++ / MFC
delphihelpquestion
6 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    chethu665
    wrote on last edited by
    #1

    hi all i have a problem . In Listbox by typing the first character of a selection the item can be selected is it possible to restrict this property of list box if possible how??:) "Men never do evil so completely and cheerfully as when they do it from religious conviction" -Pascal

    V H V 4 Replies Last reply
    0
    • C chethu665

      hi all i have a problem . In Listbox by typing the first character of a selection the item can be selected is it possible to restrict this property of list box if possible how??:) "Men never do evil so completely and cheerfully as when they do it from religious conviction" -Pascal

      V Offline
      V Offline
      voorugonda prashanth
      wrote on last edited by
      #2

      question is not clear.

      1 Reply Last reply
      0
      • C chethu665

        hi all i have a problem . In Listbox by typing the first character of a selection the item can be selected is it possible to restrict this property of list box if possible how??:) "Men never do evil so completely and cheerfully as when they do it from religious conviction" -Pascal

        H Offline
        H Offline
        Hamid Taebi
        wrote on last edited by
        #3

        Can you be more specific_**


        **_

        whitesky


        1 Reply Last reply
        0
        • C chethu665

          hi all i have a problem . In Listbox by typing the first character of a selection the item can be selected is it possible to restrict this property of list box if possible how??:) "Men never do evil so completely and cheerfully as when they do it from religious conviction" -Pascal

          V Offline
          V Offline
          voorugonda prashanth
          wrote on last edited by
          #4

          hiiiiiiiiiii, this is the solution... u have to do is: 1) u need to Dervie a class from CListBox 2) map the listbox in ur application to Derived listbox class. 3)Override the virtual function OnChar in ur Derived class. void CMyListBox::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags) { // TODO: Add your message handler code here and/or call default //CListBox::OnChar(nChar, nRepCnt, nFlags); important } comment this code CListBox::OnChar(nChar, nRepCnt, nFlags); Regards Prashanth.v

          C 1 Reply Last reply
          0
          • C chethu665

            hi all i have a problem . In Listbox by typing the first character of a selection the item can be selected is it possible to restrict this property of list box if possible how??:) "Men never do evil so completely and cheerfully as when they do it from religious conviction" -Pascal

            V Offline
            V Offline
            Viorel
            wrote on last edited by
            #5

            Try this way. Using Add Class command, add a new MFC class derived from CListBox. Then add to this class a handler for WM_CHAR notifications. In this handler, return without calling anything. In the dialog box where list box is used, select the list-box and then use Add Variable in order to add a control variable. In the Variable Type field, specify the name of your list-box class. If you already have a variable for your list, then open the header file of your dialog and replace CListBox type with the name of your list-box class. Hope it helps.

            1 Reply Last reply
            0
            • V voorugonda prashanth

              hiiiiiiiiiii, this is the solution... u have to do is: 1) u need to Dervie a class from CListBox 2) map the listbox in ur application to Derived listbox class. 3)Override the virtual function OnChar in ur Derived class. void CMyListBox::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags) { // TODO: Add your message handler code here and/or call default //CListBox::OnChar(nChar, nRepCnt, nFlags); important } comment this code CListBox::OnChar(nChar, nRepCnt, nFlags); Regards Prashanth.v

              C Offline
              C Offline
              chethu665
              wrote on last edited by
              #6

              thanks :) "Men never do evil so completely and cheerfully as when they do it from religious conviction" -Pascal

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups