Actually I find there is a same demand post here. But I find some problem still, so I have to post another question here.
If I use snipaste to capture the toolbar. I can know the real title bar is 28 like this

But if I use the method in that post like this:
#include<iostream>
#include <wtypes.h>
using namespace std;
int main() {
cout << GetSystemMetrics(SM_CYCAPTION) << endl;
return 0;
}
I will just get 23. Is there any thing I have missed? Or the 28 actually contain other portion besides the title bar? What can I do to find the real height of title bar with c++.