summaryrefslogtreecommitdiff
path: root/vcl/win/source/app/salinst.cxx
diff options
context:
space:
mode:
authorTor Lillqvist <tlillqvist@novell.com>2011-01-24 03:09:02 +0200
committerTor Lillqvist <tlillqvist@novell.com>2011-01-24 03:09:02 +0200
commite46003644b7a109f6e7a856b5730ff28cb01e206 (patch)
treea0add0298c8233db7cbeb9cdbe67084488780564 /vcl/win/source/app/salinst.cxx
parent6cd6af5b9daea7a95359b1b16f0cc8f98a572cb6 (diff)
Kill Win9x and NT4 code
Diffstat (limited to 'vcl/win/source/app/salinst.cxx')
-rw-r--r--vcl/win/source/app/salinst.cxx139
1 files changed, 44 insertions, 95 deletions
diff --git a/vcl/win/source/app/salinst.cxx b/vcl/win/source/app/salinst.cxx
index cee88a2726d2..d69337bf356d 100644
--- a/vcl/win/source/app/salinst.cxx
+++ b/vcl/win/source/app/salinst.cxx
@@ -512,27 +512,19 @@ SalInstance* CreateSalInstance()
SalData* pSalData = GetSalData();
// determine the windows version
- aSalShlData.mbWNT = 0;
aSalShlData.mbWXP = 0;
aSalShlData.mbWPrinter = 0;
WORD nVer = (WORD)GetVersion();
- aSalShlData.mnVersion = (((WORD)LOBYTE(nVer)) * 100) + HIBYTE(nVer);
- if ( aSalShlData.mnVersion >= 400 )
- aSalShlData.mbW40 = 1;
rtl_zeroMemory( &aSalShlData.maVersionInfo, sizeof(aSalShlData.maVersionInfo) );
aSalShlData.maVersionInfo.dwOSVersionInfoSize = sizeof( aSalShlData.maVersionInfo );
if ( GetVersionEx( &aSalShlData.maVersionInfo ) )
{
- if ( aSalShlData.maVersionInfo.dwPlatformId == VER_PLATFORM_WIN32_NT )
- {
- aSalShlData.mbWNT = 1;
- // Windows XP ?
- if ( aSalShlData.maVersionInfo.dwMajorVersion > 5 ||
- ( aSalShlData.maVersionInfo.dwMajorVersion == 5 && aSalShlData.maVersionInfo.dwMinorVersion >= 1 ) )
- aSalShlData.mbWXP = 1;
- if( aSalShlData.maVersionInfo.dwMajorVersion >= 5 )
- aSalShlData.mbWPrinter = 1;
- }
+ // Windows XP ?
+ if ( aSalShlData.maVersionInfo.dwMajorVersion > 5 ||
+ ( aSalShlData.maVersionInfo.dwMajorVersion == 5 && aSalShlData.maVersionInfo.dwMinorVersion >= 1 ) )
+ aSalShlData.mbWXP = 1;
+ if( aSalShlData.maVersionInfo.dwMajorVersion >= 5 )
+ aSalShlData.mbWPrinter = 1;
}
pSalData->mnAppThreadId = GetCurrentThreadId();
@@ -540,90 +532,47 @@ SalInstance* CreateSalInstance()
// register frame class
if ( !pSalData->mhPrevInst )
{
- if ( aSalShlData.mbWNT )
- {
- WNDCLASSEXW aWndClassEx;
- aWndClassEx.cbSize = sizeof( aWndClassEx );
- aWndClassEx.style = CS_OWNDC;
- aWndClassEx.lpfnWndProc = SalFrameWndProcW;
- aWndClassEx.cbClsExtra = 0;
- aWndClassEx.cbWndExtra = SAL_FRAME_WNDEXTRA;
- aWndClassEx.hInstance = pSalData->mhInst;
- aWndClassEx.hCursor = 0;
- aWndClassEx.hbrBackground = 0;
- aWndClassEx.lpszMenuName = 0;
- aWndClassEx.lpszClassName = SAL_FRAME_CLASSNAMEW;
- ImplLoadSalIcon( SAL_RESID_ICON_DEFAULT, aWndClassEx.hIcon, aWndClassEx.hIconSm );
- if ( !RegisterClassExW( &aWndClassEx ) )
- return NULL;
-
- aWndClassEx.hIcon = 0;
- aWndClassEx.hIconSm = 0;
- aWndClassEx.style |= CS_SAVEBITS;
- aWndClassEx.lpszClassName = SAL_SUBFRAME_CLASSNAMEW;
- if ( !RegisterClassExW( &aWndClassEx ) )
- return NULL;
-
- // shadow effect for popups on XP
- if( aSalShlData.mbWXP )
- aWndClassEx.style |= CS_DROPSHADOW;
- aWndClassEx.lpszClassName = SAL_TMPSUBFRAME_CLASSNAMEW;
- if ( !RegisterClassExW( &aWndClassEx ) )
- return NULL;
-
- aWndClassEx.style = 0;
- aWndClassEx.lpfnWndProc = SalComWndProcW;
- aWndClassEx.cbWndExtra = 0;
- aWndClassEx.lpszClassName = SAL_COM_CLASSNAMEW;
- if ( !RegisterClassExW( &aWndClassEx ) )
- return NULL;
- }
- else
- {
- WNDCLASSEXA aWndClassEx;
- aWndClassEx.cbSize = sizeof( aWndClassEx );
- aWndClassEx.style = CS_OWNDC;
- aWndClassEx.lpfnWndProc = SalFrameWndProcA;
- aWndClassEx.cbClsExtra = 0;
- aWndClassEx.cbWndExtra = SAL_FRAME_WNDEXTRA;
- aWndClassEx.hInstance = pSalData->mhInst;
- aWndClassEx.hCursor = 0;
- aWndClassEx.hbrBackground = 0;
- aWndClassEx.lpszMenuName = 0;
- aWndClassEx.lpszClassName = SAL_FRAME_CLASSNAMEA;
- ImplLoadSalIcon( SAL_RESID_ICON_DEFAULT, aWndClassEx.hIcon, aWndClassEx.hIconSm );
- if ( !RegisterClassExA( &aWndClassEx ) )
- return NULL;
-
- aWndClassEx.hIcon = 0;
- aWndClassEx.hIconSm = 0;
- aWndClassEx.style |= CS_SAVEBITS;
- aWndClassEx.lpszClassName = SAL_SUBFRAME_CLASSNAMEA;
- if ( !RegisterClassExA( &aWndClassEx ) )
- return NULL;
-
- aWndClassEx.style = 0;
- aWndClassEx.lpfnWndProc = SalComWndProcA;
- aWndClassEx.cbWndExtra = 0;
- aWndClassEx.lpszClassName = SAL_COM_CLASSNAMEA;
- if ( !RegisterClassExA( &aWndClassEx ) )
- return NULL;
- }
+ WNDCLASSEXW aWndClassEx;
+ aWndClassEx.cbSize = sizeof( aWndClassEx );
+ aWndClassEx.style = CS_OWNDC;
+ aWndClassEx.lpfnWndProc = SalFrameWndProcW;
+ aWndClassEx.cbClsExtra = 0;
+ aWndClassEx.cbWndExtra = SAL_FRAME_WNDEXTRA;
+ aWndClassEx.hInstance = pSalData->mhInst;
+ aWndClassEx.hCursor = 0;
+ aWndClassEx.hbrBackground = 0;
+ aWndClassEx.lpszMenuName = 0;
+ aWndClassEx.lpszClassName = SAL_FRAME_CLASSNAMEW;
+ ImplLoadSalIcon( SAL_RESID_ICON_DEFAULT, aWndClassEx.hIcon, aWndClassEx.hIconSm );
+ if ( !RegisterClassExW( &aWndClassEx ) )
+ return NULL;
+
+ aWndClassEx.hIcon = 0;
+ aWndClassEx.hIconSm = 0;
+ aWndClassEx.style |= CS_SAVEBITS;
+ aWndClassEx.lpszClassName = SAL_SUBFRAME_CLASSNAMEW;
+ if ( !RegisterClassExW( &aWndClassEx ) )
+ return NULL;
+
+ // shadow effect for popups on XP
+ if( aSalShlData.mbWXP )
+ aWndClassEx.style |= CS_DROPSHADOW;
+ aWndClassEx.lpszClassName = SAL_TMPSUBFRAME_CLASSNAMEW;
+ if ( !RegisterClassExW( &aWndClassEx ) )
+ return NULL;
+
+ aWndClassEx.style = 0;
+ aWndClassEx.lpfnWndProc = SalComWndProcW;
+ aWndClassEx.cbWndExtra = 0;
+ aWndClassEx.lpszClassName = SAL_COM_CLASSNAMEW;
+ if ( !RegisterClassExW( &aWndClassEx ) )
+ return NULL;
}
HWND hComWnd;
- if ( aSalShlData.mbWNT )
- {
- hComWnd = CreateWindowExW( WS_EX_TOOLWINDOW, SAL_COM_CLASSNAMEW,
- L"", WS_POPUP, 0, 0, 0, 0, 0, 0,
- pSalData->mhInst, NULL );
- }
- else
- {
- hComWnd = CreateWindowExA( WS_EX_TOOLWINDOW, SAL_COM_CLASSNAMEA,
- "", WS_POPUP, 0, 0, 0, 0, 0, 0,
- pSalData->mhInst, NULL );
- }
+ hComWnd = CreateWindowExW( WS_EX_TOOLWINDOW, SAL_COM_CLASSNAMEW,
+ L"", WS_POPUP, 0, 0, 0, 0, 0, 0,
+ pSalData->mhInst, NULL );
if ( !hComWnd )
return NULL;