demarcy
asked on
Equivalence between twips and inches or pixels
Hi all..
I have added an ActiveX control to my application.. specifically it is a FlexGrid control. I need to know the height of the row so that I will be able to define the number of rows at run time. The problem is that the FlexGrid RowHeight property returns a value measured in twips, so that I need to convert it into pixels. That way I could use GetClientRect to know how many rows the control need to have when application is initialized.
I use Visual C++ 6.0.
Any advice? suggestion? help?
Thanks a lot in advance
Demarcy
I have added an ActiveX control to my application.. specifically it is a FlexGrid control. I need to know the height of the row so that I will be able to define the number of rows at run time. The problem is that the FlexGrid RowHeight property returns a value measured in twips, so that I need to convert it into pixels. That way I could use GetClientRect to know how many rows the control need to have when application is initialized.
I use Visual C++ 6.0.
Any advice? suggestion? help?
Thanks a lot in advance
Demarcy
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You can use either CClientDC or GetDC. If you use GetDC make sure to release the DC using ReleaseDC.
ASKER
I saw you used CClientDC... I have used CDC* pDC = GetDC() instead and it worked.. is it right? or should I use CClientDC in that case?
Demarcy