Re: Replace Titlebar with Region ?
I've tried the code below and it is causing this error message.
***error C2228: left of '.Add' must have class/struct/union type***
And I'm not sure where the problem is, or I have forgotten exactly how
this should be written.
class CBmpBkgdTBarDlg
{
private:
CRect rectarray[4];
}
OnInitDialog()
{
for(int i = 0; i < 4; y++)
rectarray[i] = NULL;
CRect r;
m_cTopBorder.GetWindowRect(&r);
rectarray.Add(r);
m_cLeftBorder.GetWindowRect(&r);
rectarray.Add(r);
m_cRightBorder.GetWindowRect(&r);
rectarray.Add(r);
m_cBottomBorder.GetWindowRect(&r);
rectarray.Add(r);
}
"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message
news:g26j939gk6133kanl0v3o4pecmse1m4r4c@4ax.com...
You wouldn't use an LPRECT.
CRect r;
c_TopBorder.GetWindowRect(&r);
rectarry.Add(r);
c_LeftBorder.GetWindowRect(&r);
rectarray.Add(r);
c_RightBorder.GetWindowRect(&r);
rectarray.Add(r);
c_BottomBorder.GetWindowRect(&r);
rectarray.Add(r);
then use the rectarray as I illustrated in my previous reply.
joe
On Sun, 15 Jul 2007 01:32:18 GMT, "cdg" <anyone@anywhere.com> wrote:
I would like to use GetWindowRect(LPRECT lpRect) with the four control
variables of the four static controls (one for each side). GetWindowRect
uses screen coordinates so they wouldn't have to be converted. However, I
don't know how to write the code for the LPRECT. And I thought there
would a
way to use the dot operator with the control variables.
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm