diff --git a/reactos/subsys/system/welcome/Makefile b/reactos/subsys/system/welcome/Makefile index aa782dbfbac..d72de560f5a 100755 --- a/reactos/subsys/system/welcome/Makefile +++ b/reactos/subsys/system/welcome/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.4 2003/11/16 21:46:46 sedwards Exp $ +# $Id: Makefile,v 1.5 2003/12/21 14:38:25 ekohl Exp $ PATH_TO_TOP = ../../.. @@ -10,14 +10,12 @@ TARGET_NAME = welcome TARGET_INSTALLDIR = system32 -TARGET_CFLAGS = -D__USE_W32API +TARGET_CFLAGS = -Wall -Werror TARGET_SDKLIBS = kernel32.a gdi32.a user32.a TARGET_OBJECTS = $(TARGET_NAME).o -TARGET_CFLAGS = -Wall -Werror - include $(PATH_TO_TOP)/rules.mak include $(TOOLS_PATH)/helper.mk diff --git a/reactos/subsys/system/welcome/res/background-right.bmp b/reactos/subsys/system/welcome/res/background-right.bmp deleted file mode 100755 index 99918f45e50..00000000000 Binary files a/reactos/subsys/system/welcome/res/background-right.bmp and /dev/null differ diff --git a/reactos/subsys/system/welcome/res/background-top.bmp b/reactos/subsys/system/welcome/res/background-top.bmp deleted file mode 100755 index 3b318f34301..00000000000 Binary files a/reactos/subsys/system/welcome/res/background-top.bmp and /dev/null differ diff --git a/reactos/subsys/system/welcome/res/default.bmp b/reactos/subsys/system/welcome/res/default.bmp deleted file mode 100755 index 4b7a7e292c1..00000000000 Binary files a/reactos/subsys/system/welcome/res/default.bmp and /dev/null differ diff --git a/reactos/subsys/system/welcome/res/icon.ico b/reactos/subsys/system/welcome/res/icon.ico deleted file mode 100755 index e3ee7ef24d9..00000000000 Binary files a/reactos/subsys/system/welcome/res/icon.ico and /dev/null differ diff --git a/reactos/subsys/system/welcome/res/title.bmp b/reactos/subsys/system/welcome/res/title.bmp index bc175d6fbcd..335383f3f1d 100755 Binary files a/reactos/subsys/system/welcome/res/title.bmp and b/reactos/subsys/system/welcome/res/title.bmp differ diff --git a/reactos/subsys/system/welcome/res/topic0.bmp b/reactos/subsys/system/welcome/res/topic0.bmp deleted file mode 100755 index cb1392d4aea..00000000000 Binary files a/reactos/subsys/system/welcome/res/topic0.bmp and /dev/null differ diff --git a/reactos/subsys/system/welcome/res/topic1.bmp b/reactos/subsys/system/welcome/res/topic1.bmp deleted file mode 100755 index 5caa2b096f0..00000000000 Binary files a/reactos/subsys/system/welcome/res/topic1.bmp and /dev/null differ diff --git a/reactos/subsys/system/welcome/res/topic2.bmp b/reactos/subsys/system/welcome/res/topic2.bmp deleted file mode 100755 index 76b1b60e4b2..00000000000 Binary files a/reactos/subsys/system/welcome/res/topic2.bmp and /dev/null differ diff --git a/reactos/subsys/system/welcome/res/welcome.ico b/reactos/subsys/system/welcome/res/welcome.ico new file mode 100644 index 00000000000..53acecef4fb Binary files /dev/null and b/reactos/subsys/system/welcome/res/welcome.ico differ diff --git a/reactos/subsys/system/welcome/resource.h b/reactos/subsys/system/welcome/resource.h index efde0a82289..6a96d2bcb80 100755 --- a/reactos/subsys/system/welcome/resource.h +++ b/reactos/subsys/system/welcome/resource.h @@ -3,7 +3,7 @@ #define IDS_DEFAULTTOPICTITLE 1001 #define IDS_DEFAULTTOPICDESC 1002 #define IDS_FONTNAME 1003 -//#define IDS_CHECKTEXT 1004 +#define IDS_CHECKTEXT 1004 #define IDS_CLOSETEXT 1005 #define IDS_TOPICBUTTON0 1010 @@ -65,10 +65,7 @@ /* Bitmaps */ #define IDB_TITLEBITMAP 101 #define IDB_DEFAULTTOPICBITMAP 102 -#define IDB_TBACKGROUNDBITMAP 103 -#define IDB_RBACKGROUNDBITMAP 104 -#if 0 #define IDB_TOPICBITMAP0 110 #define IDB_TOPICBITMAP1 111 #define IDB_TOPICBITMAP2 112 @@ -79,10 +76,8 @@ #define IDB_TOPICBITMAP7 117 #define IDB_TOPICBITMAP8 118 #define IDB_TOPICBITMAP9 119 -#endif +#define IDC_CLOSEBUTTON 2000 +#define IDC_CHECKBUTTON 2001 -#define IDC_CLOSEBUTTON 2000 -#define IDC_CHECKBUTTON 2001 - -#define IDI_MAIN 3000 +#define IDI_MAIN 3000 diff --git a/reactos/subsys/system/welcome/welcome.c b/reactos/subsys/system/welcome/welcome.c index f1bdd202397..88b54ad6bb6 100755 --- a/reactos/subsys/system/welcome/welcome.c +++ b/reactos/subsys/system/welcome/welcome.c @@ -1,6 +1,6 @@ /* * ReactOS applications - * Copyright (C) 2001, 2002 ReactOS Team + * Copyright (C) 2001, 2002, 2003 ReactOS Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,14 +16,20 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: welcome.c,v 1.3 2003/10/18 18:49:08 weiden Exp $ +/* $Id: welcome.c,v 1.4 2003/12/21 14:38:25 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS welcome/autorun application * FILE: subsys/system/welcome/welcome.c * PROGRAMMERS: Eric Kohl (ekohl@rz-online.de) * Casper S. Hornstrup (chorns@users.sourceforge.net) + * + * NOTE: + * This utility can be customized by modifying the resources. + * Please do NOT change the source code in order to customize this + * utility but change the resources! */ + #include "../../../include/reactos/version.h" #include #include @@ -34,14 +40,16 @@ -#define LIGHT_BLUE 0x00F0CAA6 -#define DARK_BLUE 0x00996633 +#define LIGHT_BLUE 0x00F7EFD6 +#define DARK_BLUE 0x008C7B6B +#define TITLE_WIDTH 480 +#define TITLE_HEIGHT 93 /* GLOBALS ******************************************************************/ -TCHAR szFrameClass [] = "WelcomeWindowClass"; +TCHAR szFrameClass [] = TEXT("WelcomeWindowClass"); TCHAR szAppTitle [80]; HINSTANCE hInstance; @@ -49,19 +57,18 @@ HINSTANCE hInstance; HWND hwndMain = 0; HWND hwndDefaultTopic = 0; -HBITMAP hTitleBitmap = 0; -HBITMAP hTopBackgroundBitmap = 0; -HBITMAP hRightBackgroundBitmap = 0; HDC hdcDisplay=0; HDC hdcMem = 0; int nTopic = -1; int nDefaultTopic = -1; -ULONG ulInnerWidth = 480; -ULONG ulInnerHeight = 360; +ULONG ulInnerWidth = TITLE_WIDTH; +ULONG ulInnerHeight = (TITLE_WIDTH * 3) / 4; +ULONG ulTitleHeight = TITLE_HEIGHT + 3; -HBITMAP hDefaultTopicBitmap; +HBITMAP hTitleBitmap = 0; +HBITMAP hDefaultTopicBitmap = 0; HBITMAP hTopicBitmap[10]; HWND hwndTopicButton[10]; HWND hwndCloseButton; @@ -72,8 +79,6 @@ HFONT hfontTopicTitle; HFONT hfontTopicDescription; HFONT hfontCheckButton; -HFONT hfontBannerTitle; - HBRUSH hbrLightBlue; HBRUSH hbrDarkBlue; HBRUSH hbrRightPanel; @@ -106,6 +111,7 @@ WinMain(HINSTANCE hInst, RECT rcWindow; HICON hMainIcon; DWORD dwStyle = WS_OVERLAPPED | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_CAPTION | WS_SYSMENU | WS_VISIBLE; + BITMAP BitmapInfo; hInstance = hInst; @@ -119,7 +125,7 @@ WinMain(HINSTANCE hInst, wndclass.cbWndExtra = 0; wndclass.hInstance = hInstance; wndclass.hIcon = hMainIcon; - wndclass.hCursor = LoadCursor (NULL, (LPCTSTR)IDC_ARROW); + wndclass.hCursor = LoadCursor (NULL, MAKEINTRESOURCE(IDC_ARROW)); wndclass.hbrBackground = 0; wndclass.lpszMenuName = NULL; wndclass.lpszClassName = szFrameClass; @@ -129,6 +135,16 @@ WinMain(HINSTANCE hInst, RegisterClassEx(&wndclass); + hTitleBitmap = LoadBitmap (hInstance, MAKEINTRESOURCE(IDB_TITLEBITMAP)); + if (hTitleBitmap != NULL) + { + GetObject(hTitleBitmap, sizeof(BITMAP), &BitmapInfo); + ulInnerWidth = BitmapInfo.bmWidth; + ulInnerHeight = (ulInnerWidth * 3) / 4; + ulTitleHeight = BitmapInfo.bmHeight + 3; + } + ulInnerHeight -= GetSystemMetrics(SM_CYCAPTION); + rcWindow.top = 0; rcWindow.bottom = ulInnerHeight - 1; rcWindow.left = 0; @@ -144,7 +160,7 @@ WinMain(HINSTANCE hInst, yPos = (GetSystemMetrics(SM_CYSCREEN) - yHeight) / 2; rcTitlePanel.top = 0; - rcTitlePanel.bottom = 93; + rcTitlePanel.bottom = ulTitleHeight; rcTitlePanel.left = 0; rcTitlePanel.right = ulInnerWidth - 1; @@ -159,7 +175,7 @@ WinMain(HINSTANCE hInst, rcRightPanel.right = ulInnerWidth - 1; if (!LoadString(hInstance, (UINT)MAKEINTRESOURCE(IDS_APPTITLE), szAppTitle, 80)) - _tcscpy(szAppTitle, TEXT("ReactOS Welcome")); + lstrcpy(szAppTitle, TEXT("ReactOS Welcome")); /* Create main window */ hwndMain = CreateWindow(szFrameClass, @@ -199,7 +215,7 @@ ButtonSubclassWndProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { nTopic = i; SetFocus(hWnd); - InvalidateRect(hwndMain, NULL, TRUE); + InvalidateRect(hwndMain, &rcRightPanel, TRUE); } } @@ -212,8 +228,8 @@ RunApplication(int nTopic) { PROCESS_INFORMATION ProcessInfo; STARTUPINFO StartupInfo; - CHAR AppName[256]; - CHAR CurrentDir[256]; + TCHAR AppName[256]; + TCHAR CurrentDir[256]; int nLength; InvalidateRect(hwndMain, NULL, TRUE); @@ -222,17 +238,20 @@ RunApplication(int nTopic) nLength = LoadString(hInstance, IDS_TOPICACTION0 + nTopic, AppName, 256); if (nLength == 0) - return(FALSE); + return TRUE; - if (stricmp(AppName, "explorer.exe") == 0) + if (!lstrcmpi(AppName, TEXT(""))) + return FALSE; + + if (lstrcmpi(AppName, TEXT("explorer.exe")) == 0) { - strcat(AppName, " "); - strcat(AppName, CurrentDir); + lstrcat(AppName, TEXT(" ")); + lstrcat(AppName, CurrentDir); } memset(&StartupInfo, 0, sizeof(STARTUPINFO)); StartupInfo.cb = sizeof(STARTUPINFO); - StartupInfo.lpTitle = "Test"; + StartupInfo.lpTitle = TEXT("Test"); StartupInfo.dwFlags = STARTF_USESHOWWINDOW; StartupInfo.wShowWindow = SW_SHOWNORMAL; @@ -244,9 +263,10 @@ RunApplication(int nTopic) CloseHandle(ProcessInfo.hProcess); CloseHandle(ProcessInfo.hThread); - return(TRUE); + return TRUE; } + static VOID SubclassButton(HWND hWnd) { @@ -279,24 +299,16 @@ GetButtonHeight(HDC hDC, static LRESULT OnCreate(HWND hWnd, WPARAM wParam, LPARAM lParam) { - char szText[80]; + TCHAR szText[80]; int i,nLength; DWORD dwTop; DWORD dwHeight = 0; - hbrLightBlue = CreateSolidBrush (LIGHT_BLUE); + hbrLightBlue = CreateSolidBrush(LIGHT_BLUE); hbrDarkBlue = CreateSolidBrush(DARK_BLUE); - hbrRightPanel = CreateSolidBrush (0x00FFFFFF); - - /* Banner fonts */ - hfontBannerTitle = CreateFont(-30,0,0,0,FW_BOLD, - FALSE,FALSE,FALSE,ANSI_CHARSET, - OUT_DEFAULT_PRECIS, - CLIP_DEFAULT_PRECIS, - DEFAULT_QUALITY, - FF_DONTCARE, - "Arial"); + hbrRightPanel = CreateSolidBrush(0x00FFFFFF); + /* Topic title font */ hfontTopicTitle = CreateFont(-18,0,0,0,FW_NORMAL, FALSE,FALSE,FALSE,ANSI_CHARSET, OUT_DEFAULT_PRECIS, @@ -305,7 +317,7 @@ OnCreate(HWND hWnd, WPARAM wParam, LPARAM lParam) FF_DONTCARE, "Arial"); - + /* Topic description font */ hfontTopicDescription = CreateFont(-11,0,0,0,FW_THIN, FALSE,FALSE,FALSE,ANSI_CHARSET, OUT_DEFAULT_PRECIS, @@ -314,6 +326,7 @@ OnCreate(HWND hWnd, WPARAM wParam, LPARAM lParam) FF_DONTCARE, "Arial"); + /* Topic button font */ hfontTopicButton = CreateFont(-11,0,0,0,FW_BOLD, FALSE,FALSE,FALSE,ANSI_CHARSET, OUT_DEFAULT_PRECIS, @@ -322,26 +335,25 @@ OnCreate(HWND hWnd, WPARAM wParam, LPARAM lParam) FF_DONTCARE, "Arial"); - /* Load bitmaps */ - hTitleBitmap = LoadBitmap (hInstance, MAKEINTRESOURCE(IDB_TITLEBITMAP)); + /* Load title bitmap */ + if (hTitleBitmap != 0) + hTitleBitmap = LoadBitmap (hInstance, MAKEINTRESOURCE(IDB_TITLEBITMAP)); + + /* Load topic bitmaps */ hDefaultTopicBitmap = LoadBitmap (hInstance, MAKEINTRESOURCE(IDB_DEFAULTTOPICBITMAP)); -#if 0 for (i=0;i < 10; i++) { hTopicBitmap[i] = LoadBitmap (hInstance, MAKEINTRESOURCE(IDB_TOPICBITMAP0+i)); } -#endif - hTopBackgroundBitmap = LoadBitmap (hInstance, MAKEINTRESOURCE(IDB_TBACKGROUNDBITMAP)); - hRightBackgroundBitmap = LoadBitmap (hInstance, MAKEINTRESOURCE(IDB_RBACKGROUNDBITMAP)); - hdcDisplay = CreateDC ("DISPLAY", NULL, NULL, NULL); + hdcDisplay = CreateDC (TEXT("DISPLAY"), NULL, NULL, NULL); hdcMem = CreateCompatibleDC (hdcDisplay); /* load and create buttons */ dwTop = rcLeftPanel.top; - for (i=0;i < 10; i++) + for (i = 0; i < 10; i++) { - nLength = LoadString(hInstance, IDS_TOPICBUTTON0+i,szText,80); + nLength = LoadString(hInstance, IDS_TOPICBUTTON0 + i, szText, 80); if (nLength > 0) { dwHeight = GetButtonHeight(hdcMem, @@ -349,7 +361,7 @@ OnCreate(HWND hWnd, WPARAM wParam, LPARAM lParam) szText, rcLeftPanel.right - rcLeftPanel.left); - hwndTopicButton[i] = CreateWindow("BUTTON", + hwndTopicButton[i] = CreateWindow(TEXT("BUTTON"), szText, WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | BS_MULTILINE | BS_OWNERDRAW, rcLeftPanel.left, @@ -377,7 +389,7 @@ OnCreate(HWND hWnd, WPARAM wParam, LPARAM lParam) nLength = LoadString(hInstance, IDS_CLOSETEXT, szText, 80); if (nLength > 0) { - hwndCloseButton = CreateWindow("BUTTON", + hwndCloseButton = CreateWindow(TEXT("BUTTON"), szText, WS_VISIBLE | WS_CHILD | BS_FLAT, rcRightPanel.right - 10 - 57, @@ -396,7 +408,7 @@ OnCreate(HWND hWnd, WPARAM wParam, LPARAM lParam) { hwndCloseButton = 0; } -#if 0 + /* Create checkbox */ nLength = LoadString(hInstance, IDS_CHECKTEXT,szText,80); if (nLength > 0) @@ -406,9 +418,9 @@ OnCreate(HWND hWnd, WPARAM wParam, LPARAM lParam) CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, FF_DONTCARE, - "Tahoma"); + TEXT("Tahoma")); - hwndCheckButton = CreateWindow("BUTTON", + hwndCheckButton = CreateWindow(TEXT("BUTTON"), szText, WS_VISIBLE | WS_CHILD | BS_AUTOCHECKBOX, rcLeftPanel.left + 8, @@ -426,7 +438,7 @@ OnCreate(HWND hWnd, WPARAM wParam, LPARAM lParam) hwndCheckButton = 0; hfontCheckButton = 0; } -#endif + return 0; } @@ -454,13 +466,9 @@ PaintBanner(HDC hdc, LPRECT rcPanel) { HBITMAP hOldBitmap; HBRUSH hOldBrush; - HFONT hOldFont; - RECT rcTitle; - int oldBkMode; - CHAR version[50]; - /* Gradient background bitmap */ - hOldBitmap = SelectObject(hdcMem, hTopBackgroundBitmap); + /* Title bitmap */ + hOldBitmap = SelectObject(hdcMem, hTitleBitmap); BitBlt(hdc, rcPanel->left, rcPanel->top, @@ -469,27 +477,7 @@ PaintBanner(HDC hdc, LPRECT rcPanel) hdcMem, 0, 0, SRCCOPY); SelectObject(hdc, hOldBitmap); - hOldFont = SelectObject (hdc, hfontBannerTitle); - SetTextColor(hdc, 0x00000000); - - oldBkMode = GetBkMode(hdc); - SetBkMode(hdc, TRANSPARENT); - - sprintf(version, "ReactOS %d.%d.%d", - KERNEL_VERSION_MAJOR, - KERNEL_VERSION_MINOR, - KERNEL_VERSION_PATCH_LEVEL); - - rcTitle.top = 5; - rcTitle.left = 15; - DrawTextA(hdc, version, -1, &rcTitle, DT_TOP | DT_CALCRECT); - DrawTextA(hdc, version, -1, &rcTitle, DT_TOP); - - SetBkMode(hdc, oldBkMode); - - SelectObject(hdc, hOldFont); - - /* dark blue line */ + /* Dark blue line */ hOldBrush = SelectObject(hdc, hbrDarkBlue); PatBlt(hdc, rcPanel->left, @@ -516,7 +504,8 @@ OnPaint(HWND hWnd, WPARAM wParam, LPARAM lParam) TCHAR szTopicTitle[80]; TCHAR szTopicDesc[256]; int nLength; - //BITMAP bmpInfo; + BITMAP bmpInfo; + TCHAR version[50]; hdc = BeginPaint(hWnd, &ps); @@ -531,25 +520,26 @@ OnPaint(HWND hWnd, WPARAM wParam, LPARAM lParam) rcLeftPanel.right - rcLeftPanel.left, rcLeftPanel.bottom - rcLeftPanel.top, PATCOPY); + SelectObject(hdc, hOldBrush); /* Right panel */ - /* Gradient background bitmap */ - hOldBitmap = SelectObject(hdcMem, hRightBackgroundBitmap); - BitBlt(hdc, + hOldBrush = SelectObject (hdc, WHITE_BRUSH); + PatBlt(hdc, rcRightPanel.left, rcRightPanel.top, rcRightPanel.right - rcRightPanel.left, rcRightPanel.bottom - rcRightPanel.top, - hdcMem, 0, 0, SRCCOPY); - SelectObject(hdc, hOldBitmap); + PATCOPY); + SelectObject(hdc, hOldBrush); + + /* Draw dark verical line */ + hPen = CreatePen(PS_SOLID, 0, DARK_BLUE); + hOldPen = SelectObject(hdc, hPen); + MoveToEx(hdc, rcRightPanel.left, rcRightPanel.top, NULL); + LineTo(hdc, rcRightPanel.left, rcRightPanel.bottom); + SelectObject(hdc, hOldPen); + DeleteObject(hPen); - hPen = CreatePen(PS_SOLID, 0, DARK_BLUE); - hOldPen = SelectObject(hdc, hPen); - MoveToEx(hdc, rcRightPanel.left, rcRightPanel.top, NULL); - LineTo(hdc, rcRightPanel.left, rcRightPanel.bottom); - SelectObject(hdc, hOldPen); - DeleteObject(hPen); -#if 0 /* Draw topic bitmap */ if ((nTopic == -1) && (hDefaultTopicBitmap != 0)) { @@ -579,7 +569,7 @@ OnPaint(HWND hWnd, WPARAM wParam, LPARAM lParam) 0, SRCCOPY); } -#endif + if (nTopic == -1) { nLength = LoadString(hInstance, IDS_DEFAULTTOPICTITLE, szTopicTitle, 80); @@ -604,6 +594,21 @@ OnPaint(HWND hWnd, WPARAM wParam, LPARAM lParam) SetBkMode(hdc, TRANSPARENT); + /* Draw version information */ + wsprintf(version, TEXT("ReactOS %d.%d.%d"), + KERNEL_VERSION_MAJOR, + KERNEL_VERSION_MINOR, + KERNEL_VERSION_PATCH_LEVEL); + + rcTitle.left = rcLeftPanel.left + 8; + rcTitle.right = rcLeftPanel.right - 5; + rcTitle.top = rcLeftPanel.bottom - 40; + rcTitle.bottom = rcLeftPanel.bottom - 5; + hOldFont = SelectObject(hdc, hfontTopicDescription); + DrawText(hdc, version, -1, &rcTitle, DT_BOTTOM | DT_CALCRECT | DT_SINGLELINE); + DrawText(hdc, version, -1, &rcTitle, DT_BOTTOM | DT_SINGLELINE); + SelectObject(hdc, hOldFont); + /* Draw topic title */ rcTitle.left = rcRightPanel.left + 12; rcTitle.right = rcRightPanel.right - 8; @@ -643,7 +648,7 @@ OnDrawItem(HWND hWnd, WPARAM wParam, LPARAM lParam) LPDRAWITEMSTRUCT lpDis = (LPDRAWITEMSTRUCT)lParam; HPEN hPen, hOldPen; HBRUSH hOldBrush; - CHAR szText[80]; + TCHAR szText[80]; int iBkMode; if (lpDis->hwndItem == hwndCloseButton) @@ -651,37 +656,38 @@ OnDrawItem(HWND hWnd, WPARAM wParam, LPARAM lParam) DrawFrameControl(lpDis->hDC, &lpDis->rcItem, DFC_BUTTON, - DFCS_BUTTONPUSH | DFCS_FLAT); + DFCS_BUTTONPUSH | DFCS_FLAT); } else { - if (lpDis->CtlID == (ULONG)nTopic) - hOldBrush = SelectObject(lpDis->hDC, hbrRightPanel); - else - hOldBrush = SelectObject(lpDis->hDC, hbrLightBlue); - PatBlt(lpDis->hDC, - lpDis->rcItem.left, - lpDis->rcItem.top, - lpDis->rcItem.right, - lpDis->rcItem.bottom, - PATCOPY); - SelectObject(lpDis->hDC, hOldBrush); + if (lpDis->CtlID == (ULONG)nTopic) + hOldBrush = SelectObject(lpDis->hDC, hbrRightPanel); + else + hOldBrush = SelectObject(lpDis->hDC, hbrLightBlue); - hPen = CreatePen(PS_SOLID, 0, DARK_BLUE); - hOldPen = SelectObject(lpDis->hDC, hPen); - MoveToEx(lpDis->hDC, lpDis->rcItem.left, lpDis->rcItem.bottom-1, NULL); - LineTo(lpDis->hDC, lpDis->rcItem.right, lpDis->rcItem.bottom-1); - SelectObject(lpDis->hDC, hOldPen); - DeleteObject(hPen); + PatBlt(lpDis->hDC, + lpDis->rcItem.left, + lpDis->rcItem.top, + lpDis->rcItem.right, + lpDis->rcItem.bottom, + PATCOPY); + SelectObject(lpDis->hDC, hOldBrush); - InflateRect(&lpDis->rcItem, -10, -4); - OffsetRect(&lpDis->rcItem, 0, 1); - GetWindowText(lpDis->hwndItem, szText, 80); - SetTextColor(lpDis->hDC, 0x00000000); - iBkMode = SetBkMode(lpDis->hDC, TRANSPARENT); - DrawText(lpDis->hDC, szText, -1, &lpDis->rcItem, DT_TOP | DT_LEFT | DT_WORDBREAK); - SetBkMode(lpDis->hDC, iBkMode); - } + hPen = CreatePen(PS_SOLID, 0, DARK_BLUE); + hOldPen = SelectObject(lpDis->hDC, hPen); + MoveToEx(lpDis->hDC, lpDis->rcItem.left, lpDis->rcItem.bottom-1, NULL); + LineTo(lpDis->hDC, lpDis->rcItem.right, lpDis->rcItem.bottom-1); + SelectObject(lpDis->hDC, hOldPen); + DeleteObject(hPen); + + InflateRect(&lpDis->rcItem, -10, -4); + OffsetRect(&lpDis->rcItem, 0, 1); + GetWindowText(lpDis->hwndItem, szText, 80); + SetTextColor(lpDis->hDC, 0x00000000); + iBkMode = SetBkMode(lpDis->hDC, TRANSPARENT); + DrawText(lpDis->hDC, szText, -1, &lpDis->rcItem, DT_TOP | DT_LEFT | DT_WORDBREAK); + SetBkMode(lpDis->hDC, iBkMode); + } return 0; } @@ -694,7 +700,7 @@ OnMouseMove(HWND hWnd, WPARAM wParam, LPARAM lParam) { nTopic = -1; SetFocus(hWnd); - InvalidateRect(hwndMain, NULL, TRUE); + InvalidateRect(hwndMain, &rcRightPanel, TRUE); } return 0; @@ -718,7 +724,7 @@ static LRESULT OnActivate(HWND hWnd, WPARAM wParam, LPARAM lParam) { nTopic = -1; - InvalidateRect(hwndMain, NULL, TRUE); + InvalidateRect(hwndMain, &rcRightPanel, TRUE); return(0); } @@ -752,16 +758,11 @@ OnDestroy(HWND hWnd, WPARAM wParam, LPARAM lParam) if (hTopicBitmap[i] != 0) DeleteObject(hTopicBitmap[i]); } - DeleteObject(hTopBackgroundBitmap); - DeleteObject(hRightBackgroundBitmap); DeleteObject(hfontTopicTitle); DeleteObject(hfontTopicDescription); DeleteObject(hfontTopicButton); - DeleteObject(hfontBannerTitle); - - if (hfontCheckButton != 0) DeleteObject(hfontCheckButton); diff --git a/reactos/subsys/system/welcome/welcome.rc b/reactos/subsys/system/welcome/welcome.rc index 60085e8b7f8..c6cbb487911 100755 --- a/reactos/subsys/system/welcome/welcome.rc +++ b/reactos/subsys/system/welcome/welcome.rc @@ -3,14 +3,11 @@ /* Icons */ -IDI_MAIN ICON DISCARDABLE "res/icon.ico" +IDI_MAIN ICON "res/welcome.ico" /* Bitmaps */ - IDB_TITLEBITMAP BITMAP DISCARDABLE "res/title.bmp" -IDB_DEFAULTTOPICBITMAP BITMAP DISCARDABLE "res/default.bmp" -IDB_TBACKGROUNDBITMAP BITMAP DISCARDABLE "res/background-top.bmp" -IDB_RBACKGROUNDBITMAP BITMAP DISCARDABLE "res/background-right.bmp" +//IDB_DEFAULTTOPICBITMAP BITMAP DISCARDABLE "res/default.bmp" //IDB_TOPICBITMAP0 BITMAP DISCARDABLE "res/topic0.bmp" //IDB_TOPICBITMAP1 BITMAP DISCARDABLE "res/topic1.bmp" @@ -32,17 +29,18 @@ BEGIN IDS_APPTITLE "ReactOS - Welcome" IDS_DEFAULTTOPICTITLE "ReactOS" IDS_DEFAULTTOPICDESC "Welcome to React Operating System.\n\nClick a topic on the left." - //IDS_CHECKTEXT "Show this dialog again" - IDS_CLOSETEXT "Exit" +// IDS_CHECKTEXT "Show this dialog again" +// IDS_CLOSETEXT "Exit" END /* Topic buttons */ STRINGTABLE DISCARDABLE BEGIN -// IDS_TOPICBUTTON0 "Online Registration" IDS_TOPICBUTTON0 "Install ReactOS" IDS_TOPICBUTTON1 "Browse this CD" -// IDS_TOPICBUTTON4 "E&xit" + IDS_TOPICBUTTON2 "Exit" +// IDS_TOPICBUTTON3 "Empty Topic 3" +// IDS_TOPICBUTTON4 "Empty Topic 4" // IDS_TOPICBUTTON5 "Empty Topic 5" // IDS_TOPICBUTTON6 "Empty Topic 6" // IDS_TOPICBUTTON7 "Empty Topic 7" @@ -53,10 +51,10 @@ END /* Topic titles */ STRINGTABLE DISCARDABLE BEGIN -// IDS_TOPICTITLE0 "Online Registration" IDS_TOPICTITLE0 "Install ReactOS" IDS_TOPICTITLE1 "Browse this CD" -// IDS_TOPICTITLE3 "Exit" + IDS_TOPICTITLE2 "Exit" +// IDS_TOPICTITLE3 "Empty Topic Title 3" // IDS_TOPICTITLE4 "Empty Topic Title 4" // IDS_TOPICTITLE5 "Empty Topic Title 5" // IDS_TOPICTITLE6 "Empty Topic Title 6" @@ -68,10 +66,10 @@ END /* Topic descriptions */ STRINGTABLE DISCARDABLE BEGIN -// IDS_TOPICDESC0 "Register your ReactOS now!\n\nWith registering your ReactOS you get a lot of additional benefits, like unsolicited product information, incompetent hotline services and huge amounts of third-party junk mail." IDS_TOPICDESC0 "Create a new ReactOS installation on your computer or upgrade an existing installation." IDS_TOPICDESC1 "Browse the CD." -// IDS_TOPICDESC3 "Click to exit this application." + IDS_TOPICDESC2 "Click to exit this application." +// IDS_TOPICDESC3 "Topic description 3.\n\nDescribe topic 3 here." // IDS_TOPICDESC4 "Topic description 4.\n\nDescribe topic 4 here." // IDS_TOPICDESC5 "Topic description 5.\n\nDescribe topic 5 here." // IDS_TOPICDESC6 "Topic description 6.\n\nDescribe topic 6 here." @@ -83,9 +81,9 @@ END /* Topic actions */ STRINGTABLE DISCARDABLE BEGIN -// IDS_TOPICACTION0 "signup.exe" IDS_TOPICACTION0 "setup.exe" IDS_TOPICACTION1 "explorer.exe" + IDS_TOPICACTION2 "" /* this quits the app */ // IDS_TOPICACTION3 "..." // IDS_TOPICACTION4 "..." // IDS_TOPICACTION5 "..."