本文整理汇总了C++中ListBox::Create方法的典型用法代码示例。如果您正苦于以下问题:C++ ListBox::Create方法的具体用法?C++ ListBox::Create怎么用?C++ ListBox::Create使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ListBox
的用法示例。
在下文中一共展示了ListBox::Create方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnCreate
int MainWindow::OnCreate(CREATESTRUCT* pcs)
{
Edit edit; edit.Create(* this,WS_CHILD | WS_VISIBLE | WS_BORDER,"",IDC_EDIT,120,10,100,24 );
Button button_add; button_add.Create(* this,WS_CHILD | WS_VISIBLE,"add",IDC_ADD,120,40,100,24);
Button button_remove; button_remove.Create(* this,WS_CHILD | WS_VISIBLE,"remove",IDC_REMOVE,120,70,100,24);
ListBox listbox; listbox.Create(* this,WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL,"listbox",IDC_LB,10,10,100,100);
EnableWindow(GetDlgItem(*this,IDC_REMOVE),false);
// TODO: create all child windows
// TODO: disable "Remove" button
return 0;
}
示例2: OnCreate
int MainWindow::OnCreate(CREATESTRUCT* pcs)
{
// TODO: create all child windows
ListBox listbox; listbox.Create(*this, WS_CHILD | WS_VISIBLE | WS_BORDER , "", IDC_LB, 10, 10, 180, 150);
Edit edit; edit.Create(*this, WS_CHILD | WS_VISIBLE | WS_BORDER, "", IDC_EDIT, 202, 10, 150, 40);
Button button_add; button_add.Create(*this, WS_CHILD | WS_VISIBLE | WS_BORDER ,"Add", IDC_ADD, 202, 60, 150, 40);
Button button_remove; button_remove.Create(*this, WS_CHILD | WS_VISIBLE | WS_BORDER, "Remove", IDC_REMOVE, 202, 110, 150, 40);
// TODO: disable "Remove" button
EnableWindow(GetDlgItem(*this, IDC_REMOVE), false);
//disable "Add" button until something is written in edit
EnableWindow(GetDlgItem(*this, IDC_ADD), false);
return 0;
}
示例3: OnCreate
int MainWindow::OnCreate(CREATESTRUCT* pcs)
{
//texstbox
edit.Create(*this, WS_CHILD | WS_VISIBLE | WS_BORDER, "", IDC_EDIT, 220, 10, 150, 50);
char s[128];
//Kreirai buttoni
LoadString(0, IDS_Add, s, sizeof s);
button.Create(*this, WS_CHILD | WS_VISIBLE | WS_BORDER, s, IDC_ADD, 220, 70, 150, 50);
LoadString(0, IDS_Remove, s, sizeof s);
button.Create(*this, WS_CHILD | WS_VISIBLE | WS_DISABLED, s, IDC_REMOVE, 220, 130, 150, 50);
//Listbox
listBox.Create(*this, WS_CHILD | WS_VISIBLE | WS_BORDER, "", IDC_LB, 10, 10, 200, 300);
return 0;
}