响应listbox的LBN_DBLCLK消息(就是双击消息)
在这个消息里面获取到选中的用户名
以这个用户名做索引,获取到此人的其他信息,比如(年龄,性别等)
然后定一个对话框,把这些值传入,再创建对话框即可:
CDlgInfo dlg;
dlg.username = "张三";
dlg.age = "33";
dlg.sex = "不男不女";
//必须把上面的值传给CDlgInfo上表示这些信息的响应控件的变量
dlg.DoModal();
// list_begin.cpp
// compile with: /EHsc
#include
#include
int main( )
{
using namespace std;
list
list
list
c1.push_back( 1 );
c1.push_back( 2 );
c1_Iter = c1.begin( );
cout << "The first element of c1 is " << *c1_Iter << endl;
*c1_Iter = 20;
c1_Iter = c1.begin( );
cout << "The first element of c1 is now " << *c1_Iter << endl;
// The following line would be an error because iterator is const
// *c1_cIter = 200;
}
存储数据:
list
l.push_back(str);
取出:
list
for (it = l.begin(); it != l.end(); it++)
{
cout << *it << endl;
}
list
LoveSports.push_back("篮球");
LoveSports.push_back("羽毛球");
LoveSports.push_back("排球");
list
for (; it != LoveSports.end(); it++)
{
cout<<*it<