本文整理汇总了C++中CDevice::get_room方法的典型用法代码示例。如果您正苦于以下问题:C++ CDevice::get_room方法的具体用法?C++ CDevice::get_room怎么用?C++ CDevice::get_room使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CDevice
的用法示例。
在下文中一共展示了CDevice::get_room方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: draw
void CRoom::draw()
{
POSITION pos;
CButton* Button;
CStatic* staticText;
CString btnText[2];
CDevice* tmpDevice;
int top = 10;
int bottom = 30;
int i = 0;
int countButtonID = 3001;
int countStaticID = 2001;
CObList* list = phandleData->get_deviceList();
for (pos = list->GetHeadPosition(); pos != NULL;)
{
tmpDevice = (CDevice*)list->GetNext(pos);
if(tmpDevice->get_room() != room)
continue;
if(tmpDevice->get_typ() == _T("fs20rsu"))
{
btnText[0] = _T("Auf");
btnText[1] = _T("Ab");
}
else
{
btnText[0] = _T("An");
btnText[1] = _T("Aus");
}
staticText = new CStatic();
DWORD dwStyleStatic = WS_EX_STATICEDGE;
staticText->Create(tmpDevice->get_name(),dwStyleStatic,CRect(10,top,260,bottom),this,countStaticID);
staticText->ShowWindow(TRUE);
Button = new CButton();
DWORD dwStyle = WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON;
Button->Create(btnText[0], dwStyle, CRect(300,top,340,bottom), this, countButtonID);
Button->ShowWindow(TRUE);
Button = NULL;
buttonIDs[i][i] = countButtonID;
countButtonID++;
Button = new CButton();
Button->Create(btnText[1], dwStyle, CRect(360,top,400,bottom), this, countButtonID);
Button->ShowWindow(TRUE);
Button = NULL;
buttonIDs[i][i+1] = countButtonID;
countButtonID++;
Button = new CButton();
Button->Create(_T("Details"), dwStyle, CRect(420,top,480,bottom), this, countButtonID);
Button->ShowWindow(TRUE);
Button = NULL;
buttonIDs[i][i+2] = countButtonID;
top += 30;
bottom += 30;
staticText = NULL;
countButtonID++;
countStaticID++;
i++;
}
}