CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2021
    Posts
    51

    [RESOLVED] How to set excel column width?

    I have searched and used some formula: ClientToScreen,.. to find CPoint.
    My result:

    Code:
    CPoint cp1 ;x-y (314;448)
    CPoint cp2 ;x-y (802;448)
    from this, Can I draw the CPoint on the screen to check these point correctly?
    If I want to change columnwidth in excel, can I use this code?

    Code:
    RangePtr rng;
    rng.Setcolumnwidth(cp1.x-xp2.x);
    Thanks you!
    Last edited by Dang.D.Khanh; July 18th, 2021 at 03:49 AM.

  2. #2
    Join Date
    Jun 2021
    Posts
    51

    Re: How to set excel column width?

    Hi,
    I'm missing the pixel factor. problem solved

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured