Mouse wheel scroll does not work in Win7
Mouse wheel scroll does not work in Win7
I tested this on couple of PC, the mouse wheel worked perfect in Win10,but did not work in Win7,I changed 3 PC (win7).
-
- Site Admin
- Posts: 17564
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Mouse wheel scroll does not work in Win7
What version of Delphi do you use to compile applications?
Re: Mouse wheel scroll does not work in Win7
Delphi 10.2
-
- Site Admin
- Posts: 17564
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Mouse wheel scroll does not work in Win7
I confirm the problem: no mouse wheel scrolling in TSRichViewEdit in Windows versions prior to 10, for applications compiled in RAD Studio 10.1 and 10.2
It will be fixed in the next update (I'll try to upload it later today)
It will be fixed in the next update (I'll try to upload it later today)
Re: Mouse wheel scroll does not work in Win7
Thanks a lot:) I'm waiting for the new version.
-
- Site Admin
- Posts: 17564
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Mouse wheel scroll does not work in Win7
Sorry for the delay, it is uploaded today (for registered users)
Re: Mouse wheel scroll does not work in Win7
Downloaded latest version of TSRichViewEdit. Now modules compiled on Windows 10 machine with RAD Studio 10.2 work fine on Windows 7 or prior but on Windows 10 scrolling does not work!
-
- Site Admin
- Posts: 17564
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Mouse wheel scroll does not work in Win7
Make sure that you completely recompiled your application (Project | Build All Project).
If the problem still persists, I ask you to do some tests.
The first of them. Please open SclRView.pas, find TSRichViewEdit.DoMouseWheel.
It must be:
Is it correct? Compile your application with debug info. Put a breakpoint at the beginning of this method. Is it called when you scroll with a mouse wheel?
PS: please pay attention: in older versions of Windows, mouse wheels scrolls the focused control. In Windows 10, mouse wheels scrolls the control below the mouse pointer.
If the problem still persists, I ask you to do some tests.
The first of them. Please open SclRView.pas, find TSRichViewEdit.DoMouseWheel.
It must be:
Code: Select all
function TSRichViewEdit.DoMouseWheel(Shift: TShiftState; WheelDelta: Integer;
MousePos: TPoint): Boolean;
begin
Result := inherited DoMouseWheel(Shift, WheelDelta, MousePos);
if RVWIN10 and not Result then
HookMouseWheelEvent(Self, Shift, WheelDelta, MousePos, Result);
end;
PS: please pay attention: in older versions of Windows, mouse wheels scrolls the focused control. In Windows 10, mouse wheels scrolls the control below the mouse pointer.
Re: Mouse wheel scroll does not work in Win7
Thank you for support. The problem is still persists. HookMouseWheelEvent in TSRichViewEdit.DoMouseWheel event is never called because variable RVWIN10 is false. In addition the vi.dwMajorVersion == 6 in RVUni.RVCheckNT but we have Windows 10 Pro x64.
-
- Site Admin
- Posts: 17564
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Mouse wheel scroll does not work in Win7
If dwMajorVersion = 6, this means that your application is not marked as Win10-compatible.
I thought that the difference in mouse wheel processing in applications compiled in 10.1 and 10.2 is because they are marked as Win10-compatible (in their manifest). Currently, I have no other ideas.
If you do not have special reasons for using a custom manifest, change in Project | Options, Application, Manifest file = Auto Generate.
I thought that the difference in mouse wheel processing in applications compiled in 10.1 and 10.2 is because they are marked as Win10-compatible (in their manifest). Currently, I have no other ideas.
If you do not have special reasons for using a custom manifest, change in Project | Options, Application, Manifest file = Auto Generate.
Re: Mouse wheel scroll does not work in Win7
Hello,
in my case it doesn't work either in our application. It does work in sample ActionTest software. The thing is that alhough I am using Windows 10 64 bit Slovenian and I have to use custom manifest due to some reasons and I deliberately have no compliance with Windows 10 in manifest file. I did slight investigation as our software does recognize different windows, from XP to 10, how You do it. You have to modify a bit RVUni.pas as so:
Add in line 186:
Substiute the procedure with this code:
So far as I have been checking around our customers (n*100) works okay. If anyone else around has similar problems, please do try and confirm correction.
Best regards,
Goran
in my case it doesn't work either in our application. It does work in sample ActionTest software. The thing is that alhough I am using Windows 10 64 bit Slovenian and I have to use custom manifest due to some reasons and I deliberately have no compliance with Windows 10 in manifest file. I did slight investigation as our software does recognize different windows, from XP to 10, how You do it. You have to modify a bit RVUni.pas as so:
Add in line 186:
Code: Select all
function RtlGetVersion (var lpVersionInformation: TOSVERSIONINFOEXW): DWORD; stdcall; // Windows 2000 and later
external 'ntdll.dll' name 'RtlGetVersion';
Code: Select all
procedure RVCheckNT;
var
//vi: TOSVersionInfo; //<---- old, not in use in WIn10
vi :_OSVersionInfoExW;
begin
vi.dwOSVersionInfoSize := sizeof(vi);
//GetVersionEx(vi); //<--- substituted with line below
RtlGetVersion(vi);
RVNT := vi.dwPlatformId = VER_PLATFORM_WIN32_NT;
RVVista := RVNT and (vi.dwMajorVersion >= 6);
RVWin10 := RVNT and (vi.dwMajorVersion >= 10);
if not RVNT then
begin
RVFORMATCANVASFACTOR := 10;
RVFORMATCANVASRESOLUTION := 96 * RVFORMATCANVASFACTOR;
end;
{
if RVNT then
RVDI_GETDRAGIMAGE := RegisterWindowMessage('ShellGetDragImage')
else
RVDI_GETDRAGIMAGE := 0;
}
end;
Best regards,
Goran
Last edited by GoranBru on Wed Jan 22, 2020 2:44 pm, edited 1 time in total.
-
- Site Admin
- Posts: 17564
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Mouse wheel scroll does not work in Win7
I'll include your changes in the next update.
But since the current solution works with standard Delphi manifests, I'll not activate these changed by default.
They will be activated if you specify the compiler $define RVKERNELWINVERCHECK when compiling your project.
But since the current solution works with standard Delphi manifests, I'll not activate these changed by default.
They will be activated if you specify the compiler $define RVKERNELWINVERCHECK when compiling your project.