| | |
about ComboBox problem
Please support our C advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Jul 2006
Posts: 14
Reputation:
Solved Threads: 0
about ComboBox problem
<<<<<<<Dialog.h>>>>>>>>
.........
public:
CComboBox Cbx;
struct Data
{
LPCTSTR lpszName;
LPCTSTR lpszValue;
int ID;
};
<<<<<<<Dialog.Cpp>>>>>>>
Data d;
d.lpszName=_T("Name");
d.lpszValue=_T("Value");
d.ID=1;
Cbx.InsertString(0,d.lpszName);
Cbx.SetItemDataPtr(0,(void *)d);
how to struct data append to ComboBox Control,thank
<<<<<<<Dialog.h>>>>>>>>
.........
public:
CComboBox Cbx;
struct Data
{
LPCTSTR lpszName;
LPCTSTR lpszValue;
int ID;
};
<<<<<<<Dialog.Cpp>>>>>>>
Data d;
d.lpszName=_T("Name");
d.lpszValue=_T("Value");
d.ID=1;
Cbx.InsertString(0,d.lpszName);
Cbx.SetItemDataPtr(0,(void *)d);
how to struct data append to ComboBox Control,thank
Use CComboBox's methods GetItemDataPtr() and SetItemDataPtr() to attach the structure to an item in the combo box.
![]() |
Similar Threads
- ComboBox Events (VB.NET)
- ComboBox bind data problem (VB.NET)
- Issue related to combobox.... (VB.NET)
- ComboBox UpDate Problem (VB.NET)
- How to use combobox function (C++)
Other Threads in the C Forum
- Previous Thread: do U know??
- Next Thread: simple question about fstream
| Thread Tools | Search this Thread |
Tag cloud for C
adobe ansi api array arrays bash binarysearch centimeter char convert copyanyfile copypdffile cprogramme createcopyoffile createprocess() csyntax directory dynamic fflush file fork frequency getlasterror givemetehcodez global graphics gtkgcurlcompiling hardware highest homework i/o ide inches infiniteloop initialization interest kilometer km lazy linked linkedlist linux linuxsegmentationfault list locate logical_drives match matrix meter microsoft motherboard multi mysql open opendocumentformat opensource openwebfoundation owf pattern pdf performance pointer pointers posix power problem probleminc program programming pyramidusingturboccodes read recursion recv repetition scanf scheduling segmentationfault send shape single socketprograming socketprogramming spoonfeeding stack standard strchr string strings structures suggestions system systemcall test testautomation unix user voidmain() wab win32api windows.h






