   window borders thickness
  Hello everyone,Im trying to find out the correct window border thickness using windows API, but i dont seem to find a way to do it, for example, to get the caption thockness i use GetSystemMetrics ( SM_CYCAPTION ), it returns 20, when the actual caption thickness is 30 ( tested it with the mouse pos, seems to be 30. ), same with borders, how can i get the correct values?   
  Why do you need to know this? It sounds like what you want is AdjustWindowRectEx.   ;  i want it because, when i create a window, i specify a height and a width, and i use the same values for the directX backbuffer width/height, so it gets some kind of "stretched" because the window client rect is width-border*2 and height-caption-border, so window rect is smaller than the backbuffer, i think you got the point? (tho i might be wrong with something there, but adding the borders thickness in addition to the width/height when creating window solves the problem ) ( not sure if AdjustWindowRect is what im looking for, unless i used it in a wrong way? )   ;  After you created the Window, you can use GetClientRect(HWND window,rect* R) to get the rect of the client area of your window. (As the function says ;) )That excludes the Borders and Menu bar, and is just perfect for that!Note, that the left and top side of your rect will always be 0, so you have to use just the Right and Bottom. They hold the size of your client area.;  problem's that i dont want the width/height parameters for the window, i want them for the client area, so if i create the window with the parameters, the client area will be smaller, and thus the directx backbuffer will also get stretched, which is not what im looking for, which brings us back to the first question, how to get the border's thickness of a window?   ;  Sorry i was using AdjustWindowRectEx in a wrong way, now it works perfectly, thanks everyone.   ;  AdjustWindowRectEx is exactly what you want then:Quote:The AdjustWindowRectEx function calculates the required size of the window rectangle, based on the desired size of the client rectangle. The window rectangle can then be passed to the CreateWindowEx function to create a window whose client area is the desired size.EDIT: Too slow...   