Added some stuff to the Properties page
This commit is contained in:
@@ -11,6 +11,7 @@
|
|||||||
} PRGP;*/
|
} PRGP;*/
|
||||||
|
|
||||||
std::vector<PROPGRIDITEM> prop;
|
std::vector<PROPGRIDITEM> prop;
|
||||||
|
std::vector<Instance*> children;
|
||||||
Instance* selectedInstance;
|
Instance* selectedInstance;
|
||||||
LRESULT CALLBACK PropProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
LRESULT CALLBACK PropProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
@@ -31,6 +32,18 @@ LRESULT CALLBACK PropProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
|||||||
propWind->onResize();
|
propWind->onResize();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case WM_COMMAND:
|
||||||
|
{
|
||||||
|
if(HIWORD(wParam) == CBN_SELCHANGE)
|
||||||
|
{
|
||||||
|
int ItemIndex = SendMessage((HWND) lParam, (UINT) CB_GETCURSEL, (WPARAM) 0, (LPARAM) 0);
|
||||||
|
CHAR ListItem[256];
|
||||||
|
SendMessage((HWND) lParam, (UINT) CB_GETLBTEXT, (WPARAM) ItemIndex, (LPARAM) ListItem);
|
||||||
|
MessageBox(hwnd, ListItem, "Item Selected", MB_OK);
|
||||||
|
//SetProperties(children.at(ItemIndex-1));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
case WM_NOTIFY:
|
case WM_NOTIFY:
|
||||||
{
|
{
|
||||||
switch(((LPNMHDR)lParam)->code)
|
switch(((LPNMHDR)lParam)->code)
|
||||||
@@ -60,6 +73,11 @@ void PropertyWindow::refreshExplorer()
|
|||||||
SendMessage(_explorerComboBox,CB_RESETCONTENT,0,0);
|
SendMessage(_explorerComboBox,CB_RESETCONTENT,0,0);
|
||||||
for (unsigned int i=0;i<g_selectedInstances.size();i++) {
|
for (unsigned int i=0;i<g_selectedInstances.size();i++) {
|
||||||
SendMessage(_explorerComboBox,CB_ADDSTRING, 0,(LPARAM)g_selectedInstances[i]->name.c_str());
|
SendMessage(_explorerComboBox,CB_ADDSTRING, 0,(LPARAM)g_selectedInstances[i]->name.c_str());
|
||||||
|
children = g_selectedInstances[i]->getChildren();
|
||||||
|
for(size_t z = 0; z < children.size(); z++)
|
||||||
|
{
|
||||||
|
SendMessage(_explorerComboBox,CB_ADDSTRING, 0,(LPARAM)children.at(i)->name.c_str());
|
||||||
|
}
|
||||||
SendMessage(_explorerComboBox,CB_SETCURSEL,0,(LPARAM)0);
|
SendMessage(_explorerComboBox,CB_SETCURSEL,0,(LPARAM)0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user