Author: pschweitzer
Date: Thu Dec 27 17:40:02 2007
New Revision: 31460
URL:
http://svn.reactos.org/svn/reactos?rev=31460&view=rev
Log:
Added help tooltips to header buttons
Modified:
trunk/rosapps/downloader/lang/de-DE.rc
trunk/rosapps/downloader/lang/en-US.rc
trunk/rosapps/downloader/lang/es-ES.rc
trunk/rosapps/downloader/lang/fr-FR.rc
trunk/rosapps/downloader/lang/id-ID.rc
trunk/rosapps/downloader/lang/it-IT.rc
trunk/rosapps/downloader/lang/ru-RU.rc
trunk/rosapps/downloader/lang/uk-UA.rc
trunk/rosapps/downloader/main.c
trunk/rosapps/downloader/resources.h
Modified: trunk/rosapps/downloader/lang/de-DE.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/downloader/lang/de-DE.rc?r…
==============================================================================
--- trunk/rosapps/downloader/lang/de-DE.rc (original)
+++ trunk/rosapps/downloader/lang/de-DE.rc Thu Dec 27 17:40:02 2007
@@ -54,4 +54,7 @@
IDS_DOWNLOAD_FOLDER "Downloader"
IDS_UNABLECREATE_FOLDER "Es konnte kein Ordner mit diesem Namen erstellt
werden!"
IDS_UPDATE_URL "http://svn.reactos.org"
+ TTT_HELPBUTTON, "Get help about the downloader"
+ TTT_UPDATEBUTTON, "Not yet available"
+ TTT_PROFBUTTON, "Let you configure the downloader"
END
Modified: trunk/rosapps/downloader/lang/en-US.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/downloader/lang/en-US.rc?r…
==============================================================================
--- trunk/rosapps/downloader/lang/en-US.rc (original)
+++ trunk/rosapps/downloader/lang/en-US.rc Thu Dec 27 17:40:02 2007
@@ -54,4 +54,7 @@
IDS_DOWNLOAD_FOLDER "Downloader"
IDS_UNABLECREATE_FOLDER "Unable to create a folder with this name!"
IDS_UPDATE_URL "http://svn.reactos.org"
+ TTT_HELPBUTTON, "Get help about the downloader"
+ TTT_UPDATEBUTTON, "Not yet available"
+ TTT_PROFBUTTON, "Let you configure the downloader"
END
Modified: trunk/rosapps/downloader/lang/es-ES.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/downloader/lang/es-ES.rc?r…
==============================================================================
--- trunk/rosapps/downloader/lang/es-ES.rc (original)
+++ trunk/rosapps/downloader/lang/es-ES.rc Thu Dec 27 17:40:02 2007
@@ -59,4 +59,7 @@
IDS_DOWNLOAD_FOLDER "Downloader"
IDS_UNABLECREATE_FOLDER "¡Imposible crear una carpeta con este nombre!"
IDS_UPDATE_URL "http://svn.reactos.org"
+ TTT_HELPBUTTON, "Get help about the downloader"
+ TTT_UPDATEBUTTON, "Not yet available"
+ TTT_PROFBUTTON, "Let you configure the downloader"
END
Modified: trunk/rosapps/downloader/lang/fr-FR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/downloader/lang/fr-FR.rc?r…
==============================================================================
--- trunk/rosapps/downloader/lang/fr-FR.rc (original)
+++ trunk/rosapps/downloader/lang/fr-FR.rc Thu Dec 27 17:40:02 2007
@@ -54,4 +54,7 @@
IDS_DOWNLOAD_FOLDER "Downloader"
IDS_UNABLECREATE_FOLDER "Échec lors du répertoire avec ce nom !"
IDS_UPDATE_URL "http://svn.reactos.org"
+ TTT_HELPBUTTON, "Obtenez de l'aide à propros du téléchargeur"
+ TTT_UPDATEBUTTON, "Pas encore disponible"
+ TTT_PROFBUTTON, "Vous permet de configurer le téléchargeur"
END
Modified: trunk/rosapps/downloader/lang/id-ID.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/downloader/lang/id-ID.rc?r…
==============================================================================
--- trunk/rosapps/downloader/lang/id-ID.rc (original)
+++ trunk/rosapps/downloader/lang/id-ID.rc Thu Dec 27 17:40:02 2007
@@ -54,4 +54,7 @@
IDS_DOWNLOAD_FOLDER "Downloader"
IDS_UNABLECREATE_FOLDER "Unable to create a folder with this name!"
IDS_UPDATE_URL "http://svn.reactos.org"
+ TTT_HELPBUTTON, "Get help about the downloader"
+ TTT_UPDATEBUTTON, "Not yet available"
+ TTT_PROFBUTTON, "Let you configure the downloader"
END
Modified: trunk/rosapps/downloader/lang/it-IT.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/downloader/lang/it-IT.rc?r…
==============================================================================
--- trunk/rosapps/downloader/lang/it-IT.rc (original)
+++ trunk/rosapps/downloader/lang/it-IT.rc Thu Dec 27 17:40:02 2007
@@ -54,4 +54,7 @@
IDS_DOWNLOAD_FOLDER "Downloader"
IDS_UNABLECREATE_FOLDER "Unable to create a folder with this name!"
IDS_UPDATE_URL "http://svn.reactos.org"
+ TTT_HELPBUTTON, "Get help about the downloader"
+ TTT_UPDATEBUTTON, "Not yet available"
+ TTT_PROFBUTTON, "Let you configure the downloader"
END
Modified: trunk/rosapps/downloader/lang/ru-RU.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/downloader/lang/ru-RU.rc?r…
==============================================================================
--- trunk/rosapps/downloader/lang/ru-RU.rc (original)
+++ trunk/rosapps/downloader/lang/ru-RU.rc Thu Dec 27 17:40:02 2007
@@ -56,4 +56,7 @@
IDS_DOWNLOAD_FOLDER "Ñêà÷àòü!"
IDS_UNABLECREATE_FOLDER "Íå óäàëîñü ñîçäàòü ïàïêó ñ òàêèì èìåíåì!"
IDS_UPDATE_URL "http://svn.reactos.org"
+ TTT_HELPBUTTON, "Get help about the downloader"
+ TTT_UPDATEBUTTON, "Not yet available"
+ TTT_PROFBUTTON, "Let you configure the downloader"
END
Modified: trunk/rosapps/downloader/lang/uk-UA.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/downloader/lang/uk-UA.rc?r…
==============================================================================
--- trunk/rosapps/downloader/lang/uk-UA.rc (original)
+++ trunk/rosapps/downloader/lang/uk-UA.rc Thu Dec 27 17:40:02 2007
@@ -62,4 +62,7 @@
IDS_DOWNLOAD_FOLDER "Downloader"
IDS_UNABLECREATE_FOLDER "Íå âäàëîñÿ ñòâîðèòè ïàïêó ç òàêèì ³ì'ÿì!"
IDS_UPDATE_URL "http://svn.reactos.org"
+ TTT_HELPBUTTON, "Get help about the downloader"
+ TTT_UPDATEBUTTON, "Not yet available"
+ TTT_PROFBUTTON, "Let you configure the downloader"
END
Modified: trunk/rosapps/downloader/main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/downloader/main.c?rev=3146…
==============================================================================
--- trunk/rosapps/downloader/main.c (original)
+++ trunk/rosapps/downloader/main.c Thu Dec 27 17:40:02 2007
@@ -143,6 +143,31 @@
}
}
+BOOL CreateToolTip(HWND hwndTool, HWND hDlg, WCHAR* pText)
+{
+ if (!hwndTool || !hDlg || !pText)
+ return FALSE;
+
+ HWND hwndTip = CreateWindowExW(0, TOOLTIPS_CLASS, NULL,
+ WS_POPUP |TTS_ALWAYSTIP | TTS_BALLOON,
+ CW_USEDEFAULT, CW_USEDEFAULT,
+ CW_USEDEFAULT, CW_USEDEFAULT,
+ hDlg, NULL,
+ GetModuleHandle(NULL), NULL);
+ if (!hwndTip)
+ return FALSE;
+
+ TOOLINFO toolInfo = {0};
+ toolInfo.cbSize = sizeof(toolInfo);
+ toolInfo.hwnd = hDlg;
+ toolInfo.uFlags = TTF_IDISHWND | TTF_SUBCLASS;
+ toolInfo.uId = (UINT_PTR)hwndTool;
+ toolInfo.lpszText = pText;
+ SendMessage(hwndTip, TTM_ADDTOOL, 0, (LPARAM)&toolInfo);
+
+ return TRUE;
+}
+
BOOL
SetupControls (HWND hwnd)
{
@@ -150,6 +175,7 @@
HIMAGELIST hImageList;
HINSTANCE hInstance = GetModuleHandle(NULL);
WCHAR Cats[MAX_STRING_LENGHT], Apps[MAX_STRING_LENGHT];
+ WCHAR Tooltip1[MAX_STRING_LENGHT], Tooltip2[MAX_STRING_LENGHT],
Tooltip3[MAX_STRING_LENGHT];
TCHAR Buf[MAX_PATH];
char Tmp[MAX_PATH];
int i;
@@ -184,18 +210,28 @@
WS_CHILD | WS_VISIBLE | BS_ICON,
550, 10, 40, 40,
hwnd, 0, hInstance, NULL);
+ LoadString(hInstance, TTT_HELPBUTTON, Tooltip1, MAX_STRING_LENGHT);
+ CreateToolTip(hHelpButton, hwnd, Tooltip1);
+
hUpdateButton = CreateWindowW(L"Button", L"",
WS_CHILD | WS_VISIBLE | BS_ICON,
450, 10, 40, 40,
hwnd, 0, hInstance, NULL);
+ LoadString(hInstance, TTT_UPDATEBUTTON, Tooltip2, MAX_STRING_LENGHT);
+ CreateToolTip(hUpdateButton, hwnd, Tooltip2);
+
hProfButton = CreateWindowW(L"Button", L"",
WS_CHILD | WS_VISIBLE | BS_ICON,
500, 10, 40, 40,
hwnd, 0, hInstance, NULL);
+ LoadString(hInstance, TTT_PROFBUTTON, Tooltip3, MAX_STRING_LENGHT);
+ CreateToolTip(hProfButton, hwnd, Tooltip3);
+
hDownloadButton = CreateWindowW(L"Button", L"",
WS_CHILD | WS_VISIBLE | BS_BITMAP,
330, 505, 140, 33,
hwnd, 0, hInstance, NULL);
+
hUninstallButton = CreateWindowW(L"Button", L"",
WS_CHILD | WS_VISIBLE | BS_BITMAP,
260, 505, 140, 33,
Modified: trunk/rosapps/downloader/resources.h
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/downloader/resources.h?rev…
==============================================================================
--- trunk/rosapps/downloader/resources.h (original)
+++ trunk/rosapps/downloader/resources.h Thu Dec 27 17:40:02 2007
@@ -58,6 +58,10 @@
#define IDS_UNABLECREATE_FOLDER 25
#define IDS_UPDATE_URL 26
+#define TTT_HELPBUTTON 50
+#define TTT_UPDATEBUTTON 51
+#define TTT_PROFBUTTON 52
+
#define IDD_PROF 6000