Click here to Skip to main content
15,917,174 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Modal Dailog Box Pin
Ravi Bhavnani8-Jul-03 11:01
professionalRavi Bhavnani8-Jul-03 11:01 
GeneralRe: Modal Dailog Box Pin
ppathan8-Jul-03 11:08
ppathan8-Jul-03 11:08 
GeneralRe: Modal Dailog Box Pin
Ravi Bhavnani8-Jul-03 11:14
professionalRavi Bhavnani8-Jul-03 11:14 
GeneralRe: Modal Dailog Box Pin
Ryan Binns8-Jul-03 17:02
Ryan Binns8-Jul-03 17:02 
GeneralNeed CEditView source code or Example Pin
Anonymous8-Jul-03 9:36
Anonymous8-Jul-03 9:36 
GeneralRe: Need CEditView source code or Example Pin
David Crow8-Jul-03 9:44
David Crow8-Jul-03 9:44 
GeneralControls losing focus Pin
PaulFrazee8-Jul-03 8:31
PaulFrazee8-Jul-03 8:31 
GeneralRestricting resizing of controlbars Pin
electronicman_x8-Jul-03 8:08
electronicman_x8-Jul-03 8:08 
I'm currently using controlbars (stingray studio SECControlbars which are derived from CControlbar) and I'm trying to limit the size that you can reduce them to. Currently, i'm able to catch the WM_SIZE message in my SECControlbar derived class, but im not entirely able to control the actual sizing. What happens is i catch the size message and im able to see what size is requested, but when i attempt to change the size and pass to the base class, the results are incorrect.

In my specific case, im trying to limit the width of a vertical controlbar to 132 or more pixels. What happens with my code is the first sizing that goes below the 132 barrier actually happens despite my efforts to stop it. When i size again (also attempting below 132) the size is adjusted towards my 132 barrier but not exactly right and depending on how small i actually tried to make it. These two results happen one after the other, so every other size appears to try and size correctly. I think im setting my size after the actual controlbar size is interpretted but i can't seem to find the message i should capture and override to prevent this. I've tried using spy++ on the window but i can't seem to find any other messages that could be responsible. I also think I could be misusing the CalcDynamicLayout() function, but i've tried most all of the options and it doesnt seem to matter all that much. Any solution for a CControlbar should work in this situation, but i haven't seen one in any examples.

Here's part of my OnSize handler:

void VHelpDlg::OnSize(UINT nType, int cx, int cy) <br />
{<br />
	<br />
	VMainFrame *pMainFrame = static_cast<VMainFrame*>(AfxGetMainWnd());<br />
	if(pMainFrame)<br />
		VGENyDoc* pDoc = pMainFrame->GetDocument();<br />
	else<br />
		return;<br />
<br />
	CSize szCtrlBar;<br />
<br />
	if(this->m_szDockVert.cx<132)<br />
	{<br />
		this->m_szDockVert.cx=132;<br />
		cx=132;<br />
		szCtrlBar=CalcDynamicLayout(132,LM_COMMIT|LM_VERTDOCK|LM_STRETCH); <br />
	}<br />
	SECControlBar::OnSize(nType,cx,cy); <br />
	Invalidate();<br />
}<br />


Jeff Rothenberg

Project Engineer
Vector CANtech, Inc.
GeneralRe: Restricting resizing of controlbars Pin
David Crow8-Jul-03 9:54
David Crow8-Jul-03 9:54 
GeneralRe: Restricting resizing of controlbars Pin
electronicman_x8-Jul-03 10:36
electronicman_x8-Jul-03 10:36 
GeneralModeless Child Dialog Pin
Daishy8-Jul-03 8:00
Daishy8-Jul-03 8:00 
GeneralRe: Modeless Child Dialog Pin
Magnus Westin8-Jul-03 8:14
Magnus Westin8-Jul-03 8:14 
GeneralRe: Modeless Child Dialog Pin
Daishy10-Jul-03 3:38
Daishy10-Jul-03 3:38 
GeneralRecent File List (MRU) Pin
Rome Singh8-Jul-03 7:26
Rome Singh8-Jul-03 7:26 
GeneralRe: Recent File List (MRU) Pin
David Crow8-Jul-03 7:34
David Crow8-Jul-03 7:34 
GeneralRe: Recent File List (MRU) Pin
Rome Singh8-Jul-03 7:45
Rome Singh8-Jul-03 7:45 
QuestionEveryone has STUpload source code in MCSD C++ Kit? Pin
Anonymous8-Jul-03 7:06
Anonymous8-Jul-03 7:06 
GeneralGetOpenFileName thread problem Pin
Anonymous8-Jul-03 6:59
Anonymous8-Jul-03 6:59 
GeneralRe: GetOpenFileName thread problem Pin
Joaquín M López Muñoz8-Jul-03 7:08
Joaquín M López Muñoz8-Jul-03 7:08 
GeneralRe: GetOpenFileName thread problem Pin
John M. Drescher8-Jul-03 7:14
John M. Drescher8-Jul-03 7:14 
GeneralRe: GetOpenFileName thread problem Pin
Anonymous8-Jul-03 7:29
Anonymous8-Jul-03 7:29 
GeneralRe: GetOpenFileName thread problem Pin
David Crow8-Jul-03 7:24
David Crow8-Jul-03 7:24 
GeneralRe: GetOpenFileName thread problem Pin
Anonymous8-Jul-03 7:31
Anonymous8-Jul-03 7:31 
GeneralRe: GetOpenFileName thread problem Pin
David Crow8-Jul-03 7:38
David Crow8-Jul-03 7:38 
QuestionText Editor as a list control? Pin
Jay Hova8-Jul-03 6:36
Jay Hova8-Jul-03 6:36 

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.