메임프레임이 차지하는 행의 수를 찾으려면

Category:
Author: zemna
Date: April 17, 2021
Share this:

메임프레임이 차지하는 행의 수를 찾으려면

뺄셈과 나눗셈만으로 이 문제를 간단히 해결할 수 있습니다. 먼저

메임프레임과 클라이언트 영역의 높이를 계산합니다. 그 다음 프레임의

높이에서 클라이언트 영역의 높이, 프레임의 테두리, 캡션을 뺀 후 마지막으로

메뉴바의 높이로 나누면 됩니다.

int CMainFrame::GetMenuRows() const {

CRect rcFrame, rcClient;

GetWindowRect(rcFrame);

GetClientRect(rcClient);

return(rcFrame.Height() - rcClient.Height() -
::GetSystemMetrics(SM_CYCAPTION) -
(::GetSystemMetrics(SM_CYFRAME)*2))/

::GetSystemMetrics(SM_CYMENU);

Share this:

Leave a Reply

Your email address will not be published. Required fields are marked *

Let's connect and create
something awesome together!
2023 - Copyright, All Rights Reserved, Made by ZEMNA.NET with ❤️
crossmenu linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram