Properties work
This commit is contained in:
12
Instance.cpp
12
Instance.cpp
@@ -34,13 +34,13 @@ void Update(PROPGRIDITEM)
|
||||
void Instance::initProperties()
|
||||
{
|
||||
PROPGRIDITEM * pItem = new PROPGRIDITEM();
|
||||
pItem->lpszCatalog="Test";
|
||||
pItem->lpszPropName="Offset";
|
||||
pItem->lpszzCmbItems="What";
|
||||
pItem->lpszPropDesc="Description";
|
||||
pItem->lpCurValue=(LPARAM)"0, 0, 0";
|
||||
pItem->iItemType=PIT_EDIT;
|
||||
PropGrid_ItemInit((*pItem));
|
||||
pItem->lpszCatalog="Properties";
|
||||
pItem->lpszPropName="Name";
|
||||
pItem->lpszPropDesc="The name of the current instance";
|
||||
pItem->lpCurValue=(LPARAM)name.c_str();
|
||||
pItem->iItemType=PIT_EDIT;
|
||||
|
||||
properties.push_back(new Property(pItem, Update));
|
||||
}
|
||||
|
||||
|
||||
@@ -111,10 +111,11 @@ void PropertyWindow::_redraw()
|
||||
|
||||
void PropertyWindow::SetProperties(Instance * instance)
|
||||
{
|
||||
//PropGrid_ResetContent(_propGrid);
|
||||
PropGrid_ResetContent(_propGrid);
|
||||
for(size_t i = 0; i < instance->properties.size(); i++)
|
||||
{
|
||||
PropGrid_AddItem(_propGrid, instance->properties.at(i)->item);
|
||||
::PROPGRIDITEM * item = instance->properties.at(i)->item;
|
||||
PropGrid_AddItem(_propGrid, item);
|
||||
}
|
||||
SetWindowLongPtr(_propGrid,GWL_USERDATA,(LONG)this);
|
||||
_redraw();
|
||||
|
||||
Reference in New Issue
Block a user