I'm subclassing the EDIT common control to add some special placeholder text behavior in the background and I'm curious how to know offsets to draw text within in?
h
and w
in this diagram:
Use EM_GETRECT
to get the formatting rectangle for edit control. For example:
SendMessage(hedit, EM_GETRECT, 0, (LPARAM)&rect)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.