The simple answer is no. Not for a specific window.
Difficult answer: the border is displayed as part of the non-client area of ββthe window. All this is processed (under the hood) using the default processing (i.e. DefWindowProc), as well as the title, minimize, maximize buttons, etc. You can override this by processing the WM_NCPAINT message. You will then be responsible for drawing the entire non-client area of ββyour window. You will also want to process the WM_NCCALCSIZE message so that Windows knows how much space is left for your client area.
Alternatively, you can set the border style of your window to none. This will allow Windows to draw a title for you, although it will probably look a little different. Unfortunately, by doing this, you lose drag-to-resize functionality. To do this, you need to process the WM_NCHITTEST message.
source share