[wix-users] Enabling of Next button when user reaches end of EULA text
Hoover, Jacob
Jacob.Hoover at greenheck.com
Wed Jul 31 07:40:05 PDT 2019
Since you are talking about a custom action, I assume you are doing this in a MSI dialog. The supported answer, move your UI sequence to Burn, and build a custom BA.
To do it on the MSI side, it's going to be fragile and unsupported... That being said, take a look at sinfo.fMask.
Before every call fMask must be initialized with the flags for the desired values:
*SIF_DISABLENOSCROLL: when the new parameters make the scrollbar unnecessary, the scrollbar is only disabled, not removed. (write only)
*SIF_PAGE: nPage contains the page size.
*SIF_POS: nPos contains the slider position.
*SIF_RANGE: nMin and nMax contain the scroll limits.
*SIF_TRACKPOS: nTrackPos contains the current slider position, while the user is dragging the slider. (read only)
-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Jayashreeh123--- via wix-users
Sent: Wednesday, July 31, 2019 1:21 AM
To: wix-users at lists.wixtoolset.org
Cc: Jayashreeh123 at outlook.com
Subject: [wix-users] Enabling of Next button when user reaches end of EULA text
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
____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
NOTE: This email was received from an external source. Please use caution when opening links or attachments in the message.
More information about the wix-users
mailing list