mirror of
https://github.com/reactos/reactos.git
synced 2024-11-09 08:08:38 +00:00
ca60bdfbe8
Better than the one we currently have. For now in rosapps, so we can test it, if it's all working fine, we should replace the wine one. Changes by me: use pow() instead of cbrt(), as cbrt doesn't work in our tree. I imported the whole codebase, although the mpfr files are not used. I moved the localizations to "lang" and the icons to "res" subfolder. svn path=/trunk/; revision=31512
33 lines
983 B
C
33 lines
983 B
C
#include "calc.h"
|
|
|
|
#define MAX_LICENSE_SIZE 1000 // it's enought!
|
|
|
|
INT_PTR CALLBACK AboutDlgProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp)
|
|
{
|
|
TCHAR *license;
|
|
|
|
switch (msg) {
|
|
case WM_INITDIALOG:
|
|
license = (TCHAR *)alloca(MAX_LICENSE_SIZE*sizeof(TCHAR));
|
|
if (LoadString(calc.hInstance, IDS_STRING_LICENSE, license, MAX_LICENSE_SIZE))
|
|
SendDlgItemMessage(hWnd, IDC_EDIT_LICENSE, WM_SETTEXT, 0, (LPARAM)license);
|
|
/* Update software version */
|
|
SendDlgItemMessage(hWnd, IDC_TEXT_VERSION, WM_GETTEXT, (WPARAM)MAX_LICENSE_SIZE, (LPARAM)license);
|
|
_tcscat(license, CALC_VERSION);
|
|
SendDlgItemMessage(hWnd, IDC_TEXT_VERSION, WM_SETTEXT, 0, (LPARAM)license);
|
|
return TRUE;
|
|
case WM_COMMAND:
|
|
switch (LOWORD(wp)) {
|
|
case IDOK:
|
|
EndDialog(hWnd, 0);
|
|
return TRUE;
|
|
}
|
|
break;
|
|
|
|
case WM_CLOSE:
|
|
EndDialog(hWnd, 0);
|
|
return 0;
|
|
}
|
|
return FALSE;
|
|
}
|
|
|