Click here to Skip to main content
15,892,643 members
Please Sign up or sign in to vote.
2.50/5 (2 votes)
See more:
In my SDI application, I create the status bar by using something like:


class CJBK_III_SB : public CMFCStatusBar
{
define# SB_STYLE   WS_CHILD | WS_VISIBLE | CBRS_BOTTOM | CBRS_TOOLTIPS | CBRS_FLYBY
.......
}

    CJBK_III_SB* p_SBCls = new CJBK_III_SB;
    ASSERT(p_SBCls->CreateEx(this, 0, SB_STYLE, nID));


Although the status bar looks and acts as expencted, when I call

p_StatusBar->GetClientRect(rcResult);


I get rcResult.x == rcResult.y == rcResult.top == rcResult.bottom == 0

p_StatusBar->GetWindowRect(rcResult); 


yields something like rcResult.top == rcResult.bottom == 150 and rcResult.left == rcResult.right == 0.

Can anyone please explain what this means and why?

Thanks,

Barry
Posted
Updated 27-Mar-11 15:51pm
v4
Comments
Wendelius 27-Mar-11 15:22pm    
Pre tags added
Richard MacCutchan 27-Mar-11 15:26pm    
What is CJBK_III_SB
What is p_SBCls
What is p_StatusBar

Try showing how you have defined these classes/objects.
BarryPearlman 27-Mar-11 21:20pm    
Sorry about that.

CJBK_III_SB is a class derived directly from CMFCStatusBar.

CJBK_III_SB* p_SBCls = new CJBK_III_SB;

p_StatusBar == p_SBCls (Typo on my part. It should have been p_SBCls all along).

Hope that this helps

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900