[wix-users] Enabling of Next button when user reaches end of EULA text

Jayashreeh123 at outlook.com Jayashreeh123 at outlook.com
Tue Jul 30 23:20:44 PDT 2019


Hi,

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?

Regards,
Jayashree H

Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10



More information about the wix-users mailing list