Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我将EDIT 通用控件子类化以在后台添加一些特殊的占位符文本行为,我很好奇如何知道在其中绘制文本的偏移量?
hw在此图中:
h
w
用于EM_GETRECT获取编辑控件的格式矩形。例如:
EM_GETRECT
SendMessage(hedit, EM_GETRECT, 0, (LPARAM)&rect)