Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Change the color font of menu label
#17
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
Code:
Copy      Help
,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
Code:
Copy      Help
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.


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)