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. clear the list box

clear the list box

Scheduled Pinned Locked Moved C / C++ / MFC
c++tutorial
10 Posts 3 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.
  • B Offline
    B Offline
    bhat
    wrote on last edited by
    #1

    hi i am working in VC++ 6 using Win32 App. ............. tell me how to clear the listbox

    AbidBhat

    C 1 Reply Last reply
    0
    • B bhat

      hi i am working in VC++ 6 using Win32 App. ............. tell me how to clear the listbox

      AbidBhat

      C Offline
      C Offline
      CPallini
      wrote on last edited by
      #2

      Send the LB_RESETCONTENT [^] message to the list box window. :)

      If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
      This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke

      B 1 Reply Last reply
      0
      • C CPallini

        Send the LB_RESETCONTENT [^] message to the list box window. :)

        If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
        This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke

        B Offline
        B Offline
        bhat
        wrote on last edited by
        #3

        Thanks: can u tell me how to tranfer the selected item(text) from combobox to editbox....

        AbidBhat

        C 1 Reply Last reply
        0
        • B bhat

          Thanks: can u tell me how to tranfer the selected item(text) from combobox to editbox....

          AbidBhat

          C Offline
          C Offline
          CPallini
          wrote on last edited by
          #4

          int iSel = SendMessage(hCombo, CB_GETCURSEL, 0,0);
          if (iSel != -1)
          {
          SendMessage(hCombo, CB_GETLBTEXT, iSel, (LPARAM) buffer);
          SendMessage(hEdit, WM_SETTEXT, 0, (LPARAM) buffer);
          }

          Where buffer is a (properly sized) TCHAR array. :)

          If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
          This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke

          B 1 Reply Last reply
          0
          • C CPallini

            int iSel = SendMessage(hCombo, CB_GETCURSEL, 0,0);
            if (iSel != -1)
            {
            SendMessage(hCombo, CB_GETLBTEXT, iSel, (LPARAM) buffer);
            SendMessage(hEdit, WM_SETTEXT, 0, (LPARAM) buffer);
            }

            Where buffer is a (properly sized) TCHAR array. :)

            If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
            This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke

            B Offline
            B Offline
            bhat
            wrote on last edited by
            #5

            Hey i am not getting ...... where should i add these lines ......i mean to say on which control's event

            AbidBhat

            B 1 Reply Last reply
            0
            • B bhat

              Hey i am not getting ...... where should i add these lines ......i mean to say on which control's event

              AbidBhat

              B Offline
              B Offline
              bhat
              wrote on last edited by
              #6

              Thanks Pallani i got it ......it is nice to help me ......thank u once again

              AbidBhat

              C 1 Reply Last reply
              0
              • B bhat

                Thanks Pallani i got it ......it is nice to help me ......thank u once again

                AbidBhat

                C Offline
                C Offline
                CPallini
                wrote on last edited by
                #7

                bhat wrote:

                Thanks Pallani i got it ......it is nice to help me ......thank u once again

                Actually is Pallini, anyway... You're welcome. :)

                If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke

                H 1 Reply Last reply
                0
                • C CPallini

                  bhat wrote:

                  Thanks Pallani i got it ......it is nice to help me ......thank u once again

                  Actually is Pallini, anyway... You're welcome. :)

                  If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                  This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke

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

                  I think you said where's George and now its on the previous thread. :laugh:

                  C 1 Reply Last reply
                  0
                  • H Hamid Taebi

                    I think you said where's George and now its on the previous thread. :laugh:

                    C Offline
                    C Offline
                    CPallini
                    wrote on last edited by
                    #9

                    Yes, he's back! :-D

                    If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                    This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke

                    H 1 Reply Last reply
                    0
                    • C CPallini

                      Yes, he's back! :-D

                      If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                      This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke

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

                      He's back with two questions. :)

                      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