Author: janderwald
Date: Thu May 30 11:41:12 2013
New Revision: 59116
URL:
http://svn.reactos.org/svn/reactos?rev=59116&view=rev
Log:
[NETSHELL]
- Fix column width of listview
Modified:
trunk/reactos/dll/win32/netshell/lanstatusui.cpp
Modified: trunk/reactos/dll/win32/netshell/lanstatusui.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/lanstat…
==============================================================================
--- trunk/reactos/dll/win32/netshell/lanstatusui.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netshell/lanstatusui.cpp [iso-8859-1] Thu May 30 11:41:12
2013
@@ -421,6 +421,7 @@
PIP_PER_ADAPTER_INFO pPerAdapter;
DWORD dwSize;
HWND hDlgCtrl;
+ RECT rect;
switch(uMsg)
{
@@ -428,8 +429,15 @@
pContext = (LANSTATUSUI_CONTEXT*)lParam;
hDlgCtrl = GetDlgItem(hwndDlg, IDC_DETAILS);
- InsertColumnToListView(hDlgCtrl, IDS_PROPERTY, 0, 80);
- InsertColumnToListView(hDlgCtrl, IDS_VALUE, 1, 80);
+
+ /* get client rect */
+ GetClientRect(hDlgCtrl, &rect);
+
+ /* calculate column width */
+ dwSize = rect.right / 2;
+
+ InsertColumnToListView(hDlgCtrl, IDS_PROPERTY, 0, dwSize);
+ InsertColumnToListView(hDlgCtrl, IDS_VALUE, 1, dwSize);
dwSize = 0;
pCurAdapter = NULL;