Menu

Problems with CB_SELECTSTRING

2003-02-13
2012-09-26
  • Nobody/Anonymous

    I got a null terminated char string holding a filename (8.3 format).
    I have a checkbox and i want it to display the file in the char var as the current selection.

    char CurConfigSchemeFile[20];
    SendMessage(CBChooseConfigScheme, CB_SELECTSTRING, -1, (LPARAM)(LPCTSTR)CurConfigSchemeFile); 

    Nothing happens... I can see the file is there when I open the CB droplist. I also know that CurConfigSchemeFile is holding the file name correctly through a MessageBox that is displaying it.

    Anyone got any idea what is the problem here?

    What if i declare the char var like this:

    char CurConfigSchemeFile[20], *lpCurConfigSchemeFile;

    Would I be fitting what windows want correctly?

    Thanks for your time :)

     
    • Nobody/Anonymous

      "I have a checkbox and i want..."

      Oh crap, you know I am talking about a damned ComboBox, not a CheckBox... I just need some more coffee...

      :)

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.