07-09-2016, 12:29 PM
When calculating the string width, I get slighter higher values in MeasureMenuItem than in DrawMenuItem> I would appreciate it if you could kindly comment on it. I use the following statements in these sub-functions :
Function MeasureMenuItem
Function DrawMenuItem
Many thanks in advance.
Function MeasureMenuItem
,int hdc=GetDC(hDlg)
;,out F"{s} - {hdc}"
,int c=s.lenu
,SIZE sz
,_i=GetTextExtentPoint32(hdc, s, c, &sz)
,out F"{s} - {_i} - {c} - {sz.cx} - {sz.cy}"
Function DrawMenuItem
int c=s.lenu
SIZE sz
int hdc=d.hDC
_i=GetTextExtentPoint32(hdc, s, c, &sz)
out F"{s} - {_i} - {c} - {sz.cx} - {sz.cy}"
Many thanks in advance.