How to get the OBJ_LABEL's width in pixels?

 

example:

----------------

|ABCDEFGHIJ| <------- OBJ_LABEL

----------------

|<-? pixels->|



thansk

 
No way. Sorry.

But You can use Windows API functions: GetDC, GetTextExtentPoint32 and ReleaseDC.

Add 4 pixels to SIZE.cx and You will get width in pixels

 
stringo:
No way. Sorry.

But You can use Windows API functions: GetDC, GetTextExtentPoint32 and ReleaseDC.

Add 4 pixels to SIZE.cx and You will get width in pixels

pretty good, thanks stringo.
Reason: