mirror of
https://github.com/reactos/reactos.git
synced 2025-01-06 06:20:13 +00:00
Added help tooltips to header buttons
svn path=/trunk/; revision=31460
This commit is contained in:
parent
76133b4c4c
commit
5f52a2893f
10 changed files with 64 additions and 0 deletions
|
@ -54,4 +54,7 @@ BEGIN
|
|||
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
|
||||
|
|
|
@ -54,4 +54,7 @@ BEGIN
|
|||
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
|
||||
|
|
|
@ -59,4 +59,7 @@ BEGIN
|
|||
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
|
||||
|
|
|
@ -54,4 +54,7 @@ BEGIN
|
|||
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
|
||||
|
|
|
@ -54,4 +54,7 @@ BEGIN
|
|||
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
|
||||
|
|
|
@ -54,4 +54,7 @@ BEGIN
|
|||
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
|
||||
|
|
|
@ -56,4 +56,7 @@ BEGIN
|
|||
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
|
||||
|
|
|
@ -62,4 +62,7 @@ BEGIN
|
|||
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
|
||||
|
|
|
@ -143,6 +143,31 @@ CategoryChoosen(HWND hwnd, struct Category* Category)
|
|||
}
|
||||
}
|
||||
|
||||
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 @@ SetupControls (HWND hwnd)
|
|||
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 @@ SetupControls (HWND hwnd)
|
|||
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,
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue