X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=reactos%2Flib%2Fcpl%2Fncpa%2Ftcpip_properties.c;h=7170ee8329e0dddd1d6a152c1636fa7e4ffafa0d;hp=b0a68e0787b1783092a12d79f69768df8573f30a;hb=e90523893caa8309184e12a53073e6d959cf237f;hpb=39a395e1f1d47ea7511f02a743b950f4d0243214 diff --git a/reactos/lib/cpl/ncpa/tcpip_properties.c b/reactos/lib/cpl/ncpa/tcpip_properties.c index b0a68e0787b..7170ee8329e 100644 --- a/reactos/lib/cpl/ncpa/tcpip_properties.c +++ b/reactos/lib/cpl/ncpa/tcpip_properties.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: tcpip_properties.c,v 1.3 2004/10/11 21:08:04 weiden Exp $ +/* $Id: tcpip_properties.c,v 1.4 2004/10/31 11:54:58 ekohl Exp $ * * PROJECT: ReactOS Network Control Panel * FILE: lib/cpl/system/tcpip_properties.c @@ -33,15 +33,17 @@ #include #include #include +#include +#include + #ifdef _MSC_VER -#include #include #else // this is missing on reactos... #ifndef IPM_SETADDRESS -#define IPM_SETADDRESS (WM_USER+101) +#define IPM_SETADDRESS (WM_USER+101) #endif #endif @@ -138,45 +140,32 @@ void DisplayTCPIPProperties(HWND hParent,IP_ADAPTER_INFO *pInfo) { PROPSHEETPAGE psp[1]; PROPSHEETHEADER psh; + INITCOMMONCONTROLSEX cce; + + cce.dwSize = sizeof(INITCOMMONCONTROLSEX); + cce.dwICC = ICC_INTERNET_CLASSES; + InitCommonControlsEx(&cce); + ZeroMemory(&psh, sizeof(PROPSHEETHEADER)); psh.dwSize = sizeof(PROPSHEETHEADER); psh.dwFlags = PSH_PROPSHEETPAGE | PSH_NOAPPLYNOW; psh.hwndParent = hParent; psh.hInstance = hApplet; -#ifdef _MSC_VER psh.hIcon = LoadIcon(hApplet, MAKEINTRESOURCE(IDI_CPLSYSTEM)); -#else - psh.u1.hIcon = LoadIcon(hApplet, MAKEINTRESOURCE(IDI_CPLSYSTEM)); -#endif psh.pszCaption = NULL;//Caption; psh.nPages = sizeof(psp) / sizeof(PROPSHEETPAGE); -#ifdef _MSC_VER psh.nStartPage = 0; psh.ppsp = psp; -#else - psh.u2.nStartPage = 0; - psh.u3.ppsp = psp; -#endif psh.pfnCallback = NULL; InitPropSheetPage(&psp[0], IDD_TCPIPPROPERTIES, TCPIPPropertyPageProc); psp[0].lParam = (LPARAM)pInfo; -#ifdef _MSC_VER - { - INITCOMMONCONTROLSEX cce; - cce.dwSize = sizeof(cce); - cce.dwICC = ICC_INTERNET_CLASSES; - InitCommonControlsEx(&cce); - } -#else - InitCommonControls(); - MessageBox(hParent,_T("If the following Messagebox does not work... fix the reactos #include hell and call the InitCommonControlsEx instead"),_T("Info"),MB_OK); -#endif - if(PropertySheet(&psh)==-1) + if (PropertySheet(&psh) == -1) { MessageBox(hParent,_T("Unable to create property sheet"),_T("Error"),MB_ICONSTOP); - }; + } + return; }