第三章最后一个实例:
VOID CListCtrlDlg::InitListCtrl(void)
{
this->list.InsertColumn ( 0, L" 姓名", LVCFMT_CENTER, 80 ) ;
this->list.InsertColumn ( 1, L"身份证", LVCFMT_CENTER, 200 ) ;
this->list.InsertColumn ( 2, L"性别", LVCFMT_CENTER, 60 ) ;
this->list.InsertColumn ( 3, L"籍贯", LVCFMT_CENTER, 80 ) ;
this->list.SetExtendedStyle ( this->list.GetExtendedStyle()|LVS_EX_FULLROWSELECT) ;
this->list.InsertItem ( 0, L"张三丰" ) ;
this->list.SetItemText ( 0, 1, L"1234356789123456789" ) ;
this->list.SetItemText ( 0, 2, L"男" ) ;
this->list.SetItemText ( 0, 3, L"武当" ) ;
this->list.InsertItem ( 1, L"灭绝师太" ) ;
this->list.SetItemText ( 1, 1, L"123456789987654321" ) ;
this->list.SetItemText ( 1, 2, L"女" ) ;
this->list.SetItemText ( 1, 3, L"峨眉" ) ;
this->list.InsertItem ( 2, L"阳顶天" ) ;
this->list.SetItemText ( 2, 1, L"431354345657657686" ) ;
this->list.SetItemText ( 2, 2, L"男" ) ;
this->list.SetItemText ( 2, 3, L"明教" ) ;
this->list.InsertItem ( 3, L"乔峰" ) ;
this->list.SetItemText ( 3, 1, L"123123132132321321" ) ;
this->list.SetItemText ( 3, 2, L"男" ) ;
this->list.SetItemText ( 3, 3, L"丐帮" ) ;
return VOID();
}
一、既然无参,为什么不干脆空着?
二、既然无返回值,最后为什么还要加一个return VOID()?
[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课