ページ 1 / 1
AdjustClientRect()を使いたい
Posted: 2010年2月27日(土) 22:41
by .s.s.d
はじめまして。レベルの低い質問ですいません。
クライアント領域の大きさを指定したくてAdjustClientRect()を使用したのですが”Error: 外部シンボル '_AdjustClientRect' が未解決”とエラーがでます。 どうやったらいいのでしょうか。
OSは WindowsXP コンパイラは Borand C++です。
Re:AdjustClientRect()を使いたい
Posted: 2010年2月28日(日) 16:10
by fatens
Re:AdjustClientRect()を使いたい
Posted: 2010年2月28日(日) 16:21
by non
AdjustClientRect()という関数は、何でしょう?
何かのライブラリにあるのなら何のライブラリにあるか教えてください。
Re:AdjustClientRect()を使いたい
Posted: 2010年2月28日(日) 18:02
by 16F57
Adjust...がなくても、
GetClientRectとGetWindowRect、MoveWindowを使えばいいと思います。
1.GetClientRect・・・クライアント領域のサイズ取得
2.GetWindowRect・・・ウィンドウ全体のサイズ取得
3.MoveWindow・・・ウィンドウの位置とサイズ設定
①1.と2.でウィンドウの境界のサイズ取得
②3.でサイズ変更
short dx,dy;
RECT rcw,rcc;
GetClientRect(hWnd,&rcc);
GetWindowRect(hWnd,&rcw);
dx=(rcw.right-rcw.left)-rcc.right;
dy=(rcw.bottom-rcw.top)-rcc.bottom;
MoveWindow(hWnd,rcw.left,rcw.top,(Xサイズ)+dx,(Yサイズ)+dy,1);