_redraw(HWND) is now just _redraw()

This commit is contained in:
MusicalProgrammer
2018-10-22 15:02:44 -04:00
parent 551a0e4b9e
commit ccf440a65e
3 changed files with 9 additions and 10 deletions

View File

@@ -49,10 +49,10 @@ bool PropertyWindow::onCreate(int x, int y, int sx, int sy, HMODULE hThisInstanc
PropGrid_ItemInit(pItem); PropGrid_ItemInit(pItem);
pItem.lpszCatalog="Test"; pItem.lpszCatalog="Test";
pItem.lpszPropName="Test2"; pItem.lpszPropName="Offset";
pItem.lpszzCmbItems="What"; pItem.lpszzCmbItems="What";
pItem.lpszPropDesc="Description"; pItem.lpszPropDesc="Description";
pItem.lpCurValue=0; pItem.lpCurValue=(LPARAM)"0, 0, 0";
pItem.iItemType=PIT_EDIT; pItem.iItemType=PIT_EDIT;
@@ -87,7 +87,7 @@ bool PropertyWindow::onCreate(int x, int y, int sx, int sy, HMODULE hThisInstanc
PropGrid_ExpandAllCatalogs(_propGrid); PropGrid_ExpandAllCatalogs(_propGrid);
SetWindowLongPtr(_propGrid,GWL_USERDATA,(LONG)this); SetWindowLongPtr(_propGrid,GWL_USERDATA,(LONG)this);
_redraw(_hwndProp); _redraw();
return true; return true;
} }
@@ -98,13 +98,12 @@ PropertyWindow::PropertyWindow(int x, int y, int sx, int sy, HMODULE hThisInstan
void PropertyWindow::onResize() void PropertyWindow::onResize()
{ {
_redraw(_hwndProp); _redraw();
} }
void PropertyWindow::_redraw(HWND hwnd) void PropertyWindow::_redraw()
{ {
RECT rect; RECT rect;
GetClientRect(hwnd,&rect); GetClientRect(_hwndProp,&rect);
SetWindowPos(_propGrid, NULL, 0, 0, rect.right, rect.bottom, SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE); SetWindowPos(_propGrid, NULL, 0, 20, rect.right, rect.bottom-20, SWP_NOZORDER | SWP_NOACTIVATE);
} }

View File

@@ -8,5 +8,5 @@ public:
private: private:
HWND _propGrid; HWND _propGrid;
HWND _hwndProp; HWND _hwndProp;
void _redraw(HWND hwnd); void _redraw();
}; };