Reputation:
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?
Upvotes: 0
Views: 425
Reputation: 51463
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.
Upvotes: 1