WINAPI Edit User Border Management

What is the correct way to implement a custom rounded border for managing EDIT in pure WinAPI (without MFC)? I need to change with the border as follows:

enter image description here

Should I manage the subclass and do regular painting in WM_NCPAINT or something like that?

+4
source share
1 answer

I think you have two options:

  • As you said, you can subclass and override WM_NCPAINT, etc., to provide your own non-client area.
  • Alternatively, you can simply turn off the border styles in the edit control and make the parent window responsible for drawing the frame.

# 1 WM_NCCALCSIZE, (.. ), WM_NCPAINT, . WM_NCHITTEST. , , .

, , , №2. , , , , .

, WS_BORDER WS_EX_CLIENTEDGE , . , , WM_PAINT, . , WS_CLIPCHILDREN , .

, , , , .

+2

All Articles