Click here to Skip to main content
15,887,861 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Can not print in Landscape Mode Pin
Paolo Messina19-Apr-03 9:20
professionalPaolo Messina19-Apr-03 9:20 
GeneralRe: Can not print in Landscape Mode Pin
ATC19-Apr-03 11:33
ATC19-Apr-03 11:33 
GeneralRe: Can not print in Landscape Mode Pin
Paolo Messina19-Apr-03 11:55
professionalPaolo Messina19-Apr-03 11:55 
GeneralRe: Can not print in Landscape Mode Pin
ATC19-Apr-03 12:36
ATC19-Apr-03 12:36 
GeneralRe: Can not print in Landscape Mode Pin
Bartosz Bien20-Apr-03 4:41
Bartosz Bien20-Apr-03 4:41 
GeneralRe: Can not print in Landscape Mode Pin
ATC20-Apr-03 5:34
ATC20-Apr-03 5:34 
GeneralRe: With your helps, it works now! Pin
ATC22-Apr-03 9:03
ATC22-Apr-03 9:03 
GeneralSplitterWnd - Moving the bar Pin
Shutter19-Apr-03 5:26
Shutter19-Apr-03 5:26 
Hiya,

I have a CSplitterWndEx class derived from CSplitterWnd. I have these two functions to only allow the user to move the bar so that the right pane is between 100 & 200 px wide. I have a variable called m_ULWidth in the CMainFrame class, which stores the width of the pane. It works fine, except for two things...

1) When I minimize and restore the app, the width of the pane reverts back to 150 px (what I initialized it to in the constructor)

2) If I keep clicking and dragging the splitter towards the right, it will still move a few pixels to the right each time even though the pane is at 100 pixels wide.

int CSplitterWndEx::GetSplitterWidth(void)<br />
{<br />
	return m_cxSplitterGap + (m_cxBorder * 2);<br />
}


void CSplitterWndEx::OnMouseMove(UINT nFlags, CPoint point)<br />
{<br />
	CRect rect;<br />
	this->GetParentFrame()->GetWindowRect(rect);<br />
	ScreenToClient(rect);<br />
	<br />
	if (point.x > (rect.right - 200) && point.x < (rect.right - 100)) <br />
		CSplitterWnd::OnMouseMove(nFlags, point);<br />
}


void CMainFrame::OnSizing(UINT fwSide, LPRECT pRect)<br />
{<br />
<br />
	CFrameWnd::OnSizing(fwSide, pRect);<br />
	CRect rect;<br />
	int width, ideal;<br />
	m_wndSplitterLR.GetColumnInfo(1,width, ideal);<br />
	m_ULWidth = width;<br />
}



void CMainFrame::OnSize(UINT nType, int cx, int cy)<br />
{<br />
	CFrameWnd::OnSize(nType, cx, cy);<br />
<br />
	if(m_ULWidth < 100)<br />
		m_ULWidth = 100;<br />
	if(m_ULWidth > 200)<br />
		m_ULWidth = 200;<br />
<br />
	if (  m_bInitSplitter && nType != SIZE_MINIMIZED )<br />
	{<br />
		m_wndSplitterLR.SetColumnInfo( 0, cx - m_ULWidth - m_wndSplitterLR.GetSplitterWidth(), 100);<br />
		m_wndSplitterLR.SetColumnInfo( 1, m_ULWidth, 75);<br />
		m_wndSplitterLR.RecalcLayout();<br />
<br />
	}


Any suggestions? Smile | :)

Shutter
GeneralQuestion about const pointer. Pin
George219-Apr-03 4:04
George219-Apr-03 4:04 
GeneralRe: Question about const pointer. Pin
John M. Drescher19-Apr-03 5:01
John M. Drescher19-Apr-03 5:01 
GeneralRe: Question about const pointer. Pin
George219-Apr-03 18:17
George219-Apr-03 18:17 
GeneralRe: Question about const pointer. Pin
Phil Hamer19-Apr-03 16:44
Phil Hamer19-Apr-03 16:44 
GeneralRe: Question about const pointer. Pin
George219-Apr-03 18:19
George219-Apr-03 18:19 
GeneralModeless Dialog to back and taskbar button Pin
Mathias S.19-Apr-03 2:07
Mathias S.19-Apr-03 2:07 
GeneralRe: Modeless Dialog to back and taskbar button Pin
John M. Drescher19-Apr-03 3:46
John M. Drescher19-Apr-03 3:46 
GeneralRe: Modeless Dialog to back and taskbar button Pin
Michael Dunn19-Apr-03 5:19
sitebuilderMichael Dunn19-Apr-03 5:19 
GeneralWorker-Thread in Win32 Application Pin
ZarrinPour19-Apr-03 1:16
ZarrinPour19-Apr-03 1:16 
GeneralRe: Worker-Thread in Win32 Application Pin
Bartosz Bien19-Apr-03 1:32
Bartosz Bien19-Apr-03 1:32 
GeneralRe: Worker-Thread in Win32 Application Pin
Joe Woodbury19-Apr-03 5:28
professionalJoe Woodbury19-Apr-03 5:28 
GeneralRe: Worker-Thread in Win32 Application Pin
Bartosz Bien19-Apr-03 5:36
Bartosz Bien19-Apr-03 5:36 
QuestionHow To Close All Documents in MDI Pin
Vikrant Vikrant19-Apr-03 1:14
Vikrant Vikrant19-Apr-03 1:14 
AnswerRe: How To Close All Documents in MDI Pin
Bartosz Bien19-Apr-03 1:28
Bartosz Bien19-Apr-03 1:28 
GeneralExplicit Linking problem Pin
Cyberizen19-Apr-03 1:02
Cyberizen19-Apr-03 1:02 
GeneralRe: Explicit Linking problem Pin
Gary R. Wheeler19-Apr-03 3:08
Gary R. Wheeler19-Apr-03 3:08 
Generalpragma once Pin
John-theKing18-Apr-03 23:14
John-theKing18-Apr-03 23:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.