mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 07:23:13 +00:00
- In cmd, add ConOutResPrintf and ConErrResPrintf functions for printf-ing from a resource string; use it to shorten several instances of LoadString+Con*Printf.
- Also change FilePromptYN and FilePromptYNA to take a resource ID. Remove varargs code which nobody used (and didn't actually work anyway) svn path=/trunk/; revision=34816
This commit is contained in:
parent
33ab9a11a5
commit
198d88a60b
27 changed files with 127 additions and 234 deletions
|
@ -24,7 +24,6 @@
|
|||
|
||||
INT cmd_label (LPTSTR cmd, LPTSTR param)
|
||||
{
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szRootPath[] = _T("A:\\");
|
||||
TCHAR szLabel[80];
|
||||
TCHAR szOldLabel[80];
|
||||
|
@ -74,18 +73,15 @@ INT cmd_label (LPTSTR cmd, LPTSTR param)
|
|||
/* print drive info */
|
||||
if (szOldLabel[0] != _T('\0'))
|
||||
{
|
||||
LoadString(CMD_ModuleHandle, STRING_LABEL_HELP2, szMsg, RC_STRING_MAX_SIZE);
|
||||
ConOutPrintf(szMsg, _totupper(szRootPath[0]), szOldLabel);
|
||||
ConOutResPrintf(STRING_LABEL_HELP2, _totupper(szRootPath[0]), szOldLabel);
|
||||
}
|
||||
else
|
||||
{
|
||||
LoadString(CMD_ModuleHandle, STRING_LABEL_HELP3, szMsg, RC_STRING_MAX_SIZE);
|
||||
ConOutPrintf(szMsg, _totupper(szRootPath[0]));
|
||||
ConOutResPrintf(STRING_LABEL_HELP3, _totupper(szRootPath[0]));
|
||||
}
|
||||
|
||||
/* print the volume serial number */
|
||||
LoadString(CMD_ModuleHandle, STRING_LABEL_HELP4, szMsg, RC_STRING_MAX_SIZE);
|
||||
ConOutPrintf(szMsg, HIWORD(dwSerialNr), LOWORD(dwSerialNr));
|
||||
ConOutResPrintf(STRING_LABEL_HELP4, HIWORD(dwSerialNr), LOWORD(dwSerialNr));
|
||||
|
||||
if (szLabel[0] == _T('\0'))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue