Spread 12 scroll bar issues in MFC CWinFormsView

Posted by: Peter.Priestley on 3 February 2020, 5:01 pm EST

  • Posted 3 February 2020, 5:01 pm EST

    I am using a Spread 12 control in a C++ MFC application using the CWinFormsView class wrapper.

    First, I create a C# User Control Library which wraps the FpSpread control.
    Next, I implement the MFC view using CWinFormsView. Essentially CWinFormsView wraps the User Control as described here:

    This works fine for just about every functionality of Spread. One difference I notice is that the Spread scroll bars no longer "repeat" when the buttons are held with the mouse, i.e. the control scrolls by only one row, rather than scrolling slowly through all the rows (while the mouse button is held).

    If I write a C# Windows Form front end for the User Control, then it all works fine. Therefore I guess it can be asserted that the MFC CWinFormsView implementation is at fault.

    One interesting fact is that Spread 11 did not have this problem (and worked fine with the MFC scenario I outlined above). It started with Spread 12 (and it looks like 13 behaves like 12). Can the developers offer any suggestions about what changed with the scroll bar implementation in Spread 12 that might help me to craft a work-around?
  • Replied 4 February 2020, 11:59 pm EST

    Hello Peter,

    Thank you for explaining your Spread usage-scenario. I understand your point of concern, that long pressing the scrollbar button shows different behavior in MFC vs that in Windows Forms.
    However, I do not have expertise in c++ and upon trying to follow the below articles, I get stuck at point#4, so would it be possible for you to share an application to demonstrate this? That would really expedite the investigation.
    Microsoft Article: https://docs.microsoft.com/en-gb/cpp/dotnet/how-to-create-the-user-control-and-host-mdi-view?view=vs-2019

    With thanks,
  • Replied 5 February 2020, 1:21 pm EST

    Hello Ruchir,
    Please find sample code attached as a zip file.
    Please open \TestFpSpread12\TestFpSpread12.sln from Visual Studio 2017. You will probably need to have C++ MFC and C++/CLI installed in your VS2017 environment which might not be the default these days.

    The Spread version I am using is 12.45.20193.0


  • Replied 5 February 2020, 11:35 pm EST

    Thanks Peter. But I cannot run the application as it seems to be missing the MFCMIFC80 assembly!
    Can you please check and re-upload?

  • Replied 6 February 2020, 12:44 pm EST

    Hi Ruchir,
    I'm assuming you can build the solution, but you can't run it due to lack of MFCMIFC80.
    I have modified the project to copy MFCMIFC80.dll to the build folder. That should make the assembly available at run time. See zip attached.

    (Alternatively, if you can't build the solution, the issue is probably no MFC libraries installed in Visual Studio).


  • Replied 6 February 2020, 11:42 pm EST

    Thanks, Peter. I can run the application now and also I can observe the difference between Spread versions. Hence, I have forwarded it to the developers for fix [ID: SPNET:2907].

    With thanks & regards,
  • Marked as Answer

    Replied 29 June 2020, 7:15 pm EST


    I am pleased to inform that the issue is fixed in Spread.Net 13. So, you are requested to Spread.Net v13 latest version.
    The scroll now happen continuously till the scrollbar button is pressed. Please confirm.

  • Replied 30 June 2020, 3:33 pm EST

    Hi Ruchir,
    I have tested the latest Spread.Net 13.45.20201.0 and happily it does resolve my problem.
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels