How to use resizable frame in Windows

On Windows when you want to select some file or icons you can use a simple frame, just click and drag mouse pointer.

My question is how can I do it (using Visual Studio C++) to use such frame in a window? I have a window displaying a map. I would like to use this frame so mark certain area and to get the coordinates after I realease mouse button.

How is this function called and what library it is using?
Do you want standard Windows focus rect?
https://msdn.microsoft.com/en-us/library/dd162479.aspx
This API function is deprecated I believe. I think usual way to do this is to just draw a rectangle with predefined style on canvas.
Thanks. I have found some example https://msdn.microsoft.com/en-us/library/hh298352.aspx so I hope I will find out how to use it

1
2
3
4
5
6
7
8
9
10
    switch (message) 
    { 
    case WM_DRAWITEM: 
           DrawFocusRect(hDC, &rcBitmap);
           return TRUE; 
    default: 
           return FALSE; 
 
    } 
    return FALSE; 
Topic archived. No new replies allowed.