Added a ComboBox
This commit is contained in:
@@ -58,6 +58,7 @@ bool PropertyWindow::onCreate(int x, int y, int sx, int sy, HMODULE hThisInstanc
|
|||||||
|
|
||||||
if (!createWindowClass("propHWND",PropProc,hThisInstance))
|
if (!createWindowClass("propHWND",PropProc,hThisInstance))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
_hwndProp = CreateWindowEx(
|
_hwndProp = CreateWindowEx(
|
||||||
WS_EX_TOOLWINDOW,
|
WS_EX_TOOLWINDOW,
|
||||||
"propHWND",
|
"propHWND",
|
||||||
@@ -72,6 +73,21 @@ bool PropertyWindow::onCreate(int x, int y, int sx, int sy, HMODULE hThisInstanc
|
|||||||
hThisInstance,
|
hThisInstance,
|
||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
|
_explorerComboBox = CreateWindowEx(
|
||||||
|
NULL,
|
||||||
|
"COMBOBOX",
|
||||||
|
"Combo",
|
||||||
|
WS_VISIBLE | WS_CHILD | CBS_DROPDOWNLIST,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
280,
|
||||||
|
20,
|
||||||
|
_hwndProp, // parent
|
||||||
|
NULL, // menu
|
||||||
|
hThisInstance,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
|
||||||
_propGrid = New_PropertyGrid(_hwndProp,IDC_PROPERTYGRID);
|
_propGrid = New_PropertyGrid(_hwndProp,IDC_PROPERTYGRID);
|
||||||
|
|
||||||
@@ -117,7 +133,7 @@ bool PropertyWindow::onCreate(int x, int y, int sx, int sy, HMODULE hThisInstanc
|
|||||||
PropGrid_ExpandAllCatalogs(_propGrid);
|
PropGrid_ExpandAllCatalogs(_propGrid);
|
||||||
|
|
||||||
SetWindowLongPtr(_hwndProp,GWL_USERDATA,(LONG)this);
|
SetWindowLongPtr(_hwndProp,GWL_USERDATA,(LONG)this);
|
||||||
_redraw();
|
_resize();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -128,14 +144,15 @@ PropertyWindow::PropertyWindow(int x, int y, int sx, int sy, HMODULE hThisInstan
|
|||||||
|
|
||||||
void PropertyWindow::onResize()
|
void PropertyWindow::onResize()
|
||||||
{
|
{
|
||||||
_redraw();
|
_resize();
|
||||||
}
|
}
|
||||||
|
|
||||||
void PropertyWindow::_redraw()
|
void PropertyWindow::_resize()
|
||||||
{
|
{
|
||||||
RECT rect;
|
RECT rect;
|
||||||
GetClientRect(_hwndProp,&rect);
|
GetClientRect(_hwndProp,&rect);
|
||||||
SetWindowPos(_propGrid, NULL, 0, 20, rect.right, rect.bottom-20, SWP_NOZORDER | SWP_NOACTIVATE);
|
SetWindowPos(_propGrid, NULL, 0, 20, rect.right, rect.bottom-20, SWP_NOZORDER | SWP_NOACTIVATE);
|
||||||
|
SetWindowPos(_explorerComboBox, NULL, 0, 0, rect.right, 20, SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PropertyWindow::SetProperties(Instance * instance)
|
void PropertyWindow::SetProperties(Instance * instance)
|
||||||
@@ -153,7 +170,7 @@ void PropertyWindow::SetProperties(Instance * instance)
|
|||||||
}
|
}
|
||||||
PropGrid_ExpandAllCatalogs(_propGrid);
|
PropGrid_ExpandAllCatalogs(_propGrid);
|
||||||
SetWindowLongPtr(_propGrid,GWL_USERDATA,(LONG)this);
|
SetWindowLongPtr(_propGrid,GWL_USERDATA,(LONG)this);
|
||||||
_redraw();
|
_resize();
|
||||||
}
|
}
|
||||||
|
|
||||||
void PropertyWindow::ClearProperties()
|
void PropertyWindow::ClearProperties()
|
||||||
|
|||||||
@@ -11,5 +11,6 @@ public:
|
|||||||
HWND _hwndProp;
|
HWND _hwndProp;
|
||||||
private:
|
private:
|
||||||
HWND _propGrid;
|
HWND _propGrid;
|
||||||
void _redraw();
|
HWND _explorerComboBox;
|
||||||
|
void _resize();
|
||||||
};
|
};
|
||||||
Reference in New Issue
Block a user