in src/native/windows/src/gui.c [346:398]
static LRESULT CALLBACK __apxAboutDlgProc(HWND hDlg, UINT uMsg,
WPARAM wParam, LPARAM lParam)
{
static HWND hRich = NULL;
static POINT ptScroll;
HRSRC hRsrc;
HGLOBAL hGlob;
LPSTR szTxt;
switch (uMsg) {
case WM_INITDIALOG:
apxCenterWindow(hDlg, _st_sys_gui.hMainWnd);
hRich = GetDlgItem(hDlg, IDC_LICENSE);
hRsrc = FindResource(GetModuleHandleA(NULL), MAKEINTRESOURCE(IDR_LICENSE),
TEXT("RTF"));
hGlob = LoadResource(GetModuleHandleA(NULL), hRsrc);
szTxt = (LPSTR)LockResource(hGlob);
SendMessageA(hRich, WM_SETTEXT, 0, (LPARAM)szTxt);
SetDlgItemText(hDlg, IDC_ABOUTAPP, apxLoadResourceW(IDS_APPFULLNAME, 0));
ptScroll.x = 0;
ptScroll.y = 0;
return TRUE;
break;
case WM_COMMAND:
if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL) {
EndDialog(hDlg, LOWORD(wParam));
return TRUE;
}
else if (LOWORD(wParam) == IAB_SYSINF)
__apxShellAbout(hDlg);
break;
case WM_MOUSEWHEEL:
{
int nScroll, nLines;
if ((SHORT)HIWORD(wParam) < 0)
nScroll = _st_sys_gui.nWhellScroll;
else
nScroll = _st_sys_gui.nWhellScroll * (-1);
ptScroll.y += (nScroll * 11);
if (ptScroll.y < 0)
ptScroll.y = 0;
nLines = (int)SendMessage(hRich, EM_GETLINECOUNT, 0, 0) + 1;
if (ptScroll.y / 11 > nLines)
ptScroll.y = nLines * 11;
SendMessage(hRich, EM_SETSCROLLPOS, 0, (LPARAM)&ptScroll);
}
break;
}
return FALSE;
UNREFERENCED_PARAMETER(lParam);
}