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. AddItem-method for MSHFlexGrid 6.0

AddItem-method for MSHFlexGrid 6.0

Scheduled Pinned Locked Moved C / C++ / MFC
c++csshelpquestion
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.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    Hello! I am new to programming in VC++ and I have a problem with the MSHFlexGrid 6.0. I have three edit-fields and a FlexGrid with three columns. When I push a button the entries from the edit-fields shall be put in the columns of the grid and a new row must be added. I thought I can do this with the AddItem-method, but I couldn´t get it working. The syntax is: Object.AddItem(LPCSTR item; const Variant &); What must I enter for the second term? Or do you have any other ideas how I can solve my problem? Thanks for reading, Stefan

    R 1 Reply Last reply
    0
    • L Lost User

      Hello! I am new to programming in VC++ and I have a problem with the MSHFlexGrid 6.0. I have three edit-fields and a FlexGrid with three columns. When I push a button the entries from the edit-fields shall be put in the columns of the grid and a new row must be added. I thought I can do this with the AddItem-method, but I couldn´t get it working. The syntax is: Object.AddItem(LPCSTR item; const Variant &); What must I enter for the second term? Or do you have any other ideas how I can solve my problem? Thanks for reading, Stefan

      R Offline
      R Offline
      Remus Lazar
      wrote on last edited by
      #2

      The method should describe the variant type For example if you need a BSTR as variant type you need for second parameter CString strString = "Your Text"; VARIANT va; VariantInit(&va); va.vt = VT_BSTR; va.bstrVal = strString.AllocSysString(); Object.AddItem("Whatever",&va); For other type of variant initialze proper memeber of VARIANT . vt memeber will descibe what member will be used and you will initialize that one (could be more) Best regards, /REMUS

      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