I want to place a vertical line on my Window like the following:
I have tried to create a "STATIC"
control with the SS_SUNKEN
style and with a width of 2
:
CreateWindowEx(NULL, "STATIC", "", WS_CHILD | WS_VISIBLE | SS_SUNKEN, 10, 10, 2, 200, hParentWindow, NULL, GetModuleHandle(NULL), NULL);
It had worked, but I am wondering if this is the correct way of doing it?
如果您想自己绘制,也可以使用DrawEdge函数。
An alternative to using a Static control is to render the sunken border yourself.
If no theme is applied, use DrawEdge .
If a theme is applied to the window, call DrawThemeBackground passing GP_LINEVERT
for iPartId . See Parts and States for additional information on theme rendering.
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.