Enabling of Next button when user reaches end of EULA text in License Agreement Dialog

  • Thread starter Thread starter JAYASHREEH
  • Start date Start date
J

JAYASHREEH

Guest
I'm trying to enable Next button when user reaches end of EULA text.

However its working fine on scrolling down EULA by
1) mouse wheel
2) Down arrow key
3) Right Click Scroll ->Click Bottom

But Next button is not getting enabled if I scroll down using Scrollbar. In CustomAction I took handle of ScrollText, on Scroll down using Scrollbar immediate release position of scrollbar is showing zero.

BOOL CALLBACK EnumChildProc(HWND hwnd, LPARAM lParam)
{
TCHAR buf[100];
GetClassName(hwnd, (LPTSTR)&buf, 100);
if (_tcscmp(buf, _T("RichEdit20W")) == 0)
{
*(HWND*)lParam = hwnd;
return FALSE;
}
return TRUE;
}
hWnd = FindWindow(NULL, TEXT("ProductName"));
if (hWnd) {
EnumChildWindows(hWnd, EnumChildProc, (LPARAM)&hWndChild);
if (hWndChild) {

SCROLLINFO sinfo;
ZeroMemory(&sinfo, sizeof(sinfo));
sinfo.cbSize = sizeof(sinfo);
sinfo.fMask = SIF_TRACKPOS | SIF_PAGE;
GetScrollInfo(hWndChild, SB_VERT, &sinfo);
UINT MaxScrollPos = sinfo.nMax - (sinfo.nPage - 1);
MaxScrollPos = MaxScrollPos - 5;

if ((sinfo.nTrackPos > MaxScrollPos)){
//Enable Next button
}
}
}
How to get release position of scrollbar in WIX custom actions?

Continue reading...
 
Back
Top