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. About CComboBox::GetLBText()

About CComboBox::GetLBText()

Scheduled Pinned Locked Moved C / C++ / MFC
2 Posts 2 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
    Chrissie ja
    wrote on last edited by
    #1

    I created about 40 CComboBox dynamically, and do following process for every combobox

    -----------------------------------------------------------------
    pComboBox[i]->AddString(str); //line 1
    int iCurIndex = pComboBox[i]->SelectString( -1, str); //line 2
    if(iCurIndex != -1)
    pComboBox[i]->GetLBText(iCurIndex , str); //line 3

    When i is 36, exception will occur at line 3. At this time, iCurIndex is 0, however,content of pComboBox[36] can't be acquired.

    _ 1 Reply Last reply
    0
    • C Chrissie ja

      I created about 40 CComboBox dynamically, and do following process for every combobox

      -----------------------------------------------------------------
      pComboBox[i]->AddString(str); //line 1
      int iCurIndex = pComboBox[i]->SelectString( -1, str); //line 2
      if(iCurIndex != -1)
      pComboBox[i]->GetLBText(iCurIndex , str); //line 3

      When i is 36, exception will occur at line 3. At this time, iCurIndex is 0, however,content of pComboBox[36] can't be acquired.

      _ Offline
      _ Offline
      _Superman_
      wrote on last edited by
      #2

      When i is 36, only pComboBox[0] to pComboBox[35] is valid. So pComboBox[36] is invalid.

      «_Superman_»

      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