CPanel * CWnd;
...
CPanel = new CWnd();
CPanel->Create(TEXT("STATIC"), L"PANELпанелька", WS_CHILD | WS_VISIBLE|BS_GROUPBOX,
CRect(100, 100, 300, 300), this, 1234);
CPanel->SetWindowTextW(L"XFDSF");
编译完成后,我得到一个1px灰色边框没有标题的正方形。我做错了什么?
答案 0 :(得分:4)
Groupbox是CButton。这个有效:
CButton *m_button;
m_button = new CButton();
CRect m_rec(10,10,150,80);
m_button->Create(L"Select",WS_CHILD | WS_VISIBLE | BS_GROUPBOX,m_rec, this, ID_BUTTON1);