Click here to Skip to main content
15,892,059 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Question About Mobile App Pin
toxcct22-Mar-05 21:12
toxcct22-Mar-05 21:12 
QuestionCan we displaying a form as a dialog? Pin
Santanu Lahiri22-Mar-05 6:05
Santanu Lahiri22-Mar-05 6:05 
AnswerRe: Can we displaying a form as a dialog? Pin
Ravi Bhavnani23-Mar-05 2:49
professionalRavi Bhavnani23-Mar-05 2:49 
GeneralSysTray Icon Pin
Menny Even Danan22-Mar-05 5:58
Menny Even Danan22-Mar-05 5:58 
GeneralRe: SysTray Icon Pin
David Crow22-Mar-05 7:22
David Crow22-Mar-05 7:22 
GeneralRe: SysTray Icon Pin
Menny Even Danan22-Mar-05 20:36
Menny Even Danan22-Mar-05 20:36 
GeneralWave File Manipulation Pin
RedDragon2k22-Mar-05 5:51
RedDragon2k22-Mar-05 5:51 
GeneralClipping a Dialog Window Pin
sweep12322-Mar-05 5:45
sweep12322-Mar-05 5:45 
I have been trying to get a dialog window displayed big and then small, but the SetWindowPos seems to do nothing since I added resize code.

I have a divider to control the clipping of the lower section of the dialog. See code below (Called via push button to hide/show details)

void CEditDlg::OnBnClickedAdvanced()
{
	static bool m_bExpand = false; 
	if (rcLarge.IsRectNull())
	{
		// Large window 
		GetWindowRect(rcLarge); 

		// Small window 
		CWnd* pWndDivider = GetDlgItem (IDC_DIVIDER); 
		pWndDivider->GetWindowRect (rcDivider); 

		rcSmall = rcLarge; 
                // Small windos cuts off at the divider
		rcSmall.bottom = rcDivider.top; 
		//Init the controls for re-sizing
		InitResizerLarge();
	}

	if(m_bExpand) 
	{ 
		SetWindowPos(NULL, 0, 0, rcLarge.Width(), rcLarge.Height(), SWP_NOMOVE | SWP_NOZORDER); 
		m_origSize = CPoint(rcLarge.Width(), rcLarge.Height());
		m_bExpand = false; 
		m_cAdvancedButton.SetWindowText("Hide Details");
	} 
	else 
	{ 
		SetWindowPos(NULL, 0, 0, rcSmall.Width(), rcSmall.Height(), SWP_NOMOVE | SWP_NOZORDER); 
		m_origSize = CPoint(rcSmall.Width(), rcSmall.Height());
		m_bExpand = true; 
		m_cAdvancedButton.SetWindowText("More Details");
	}
}


ANy way to get this code to toggle between big/small dialog; i.e. clip the window at the divider.
Generalpc to cash register Pin
yunuskajee22-Mar-05 4:09
yunuskajee22-Mar-05 4:09 
GeneralRe: pc to cash register Pin
Renjith Ramachandran22-Mar-05 22:25
Renjith Ramachandran22-Mar-05 22:25 
GeneralRe: pc to cash register Pin
Cerebro91119-Mar-09 22:54
Cerebro91119-Mar-09 22:54 
GeneralSetting Default Soundcard Pin
peterchen22-Mar-05 3:34
peterchen22-Mar-05 3:34 
GeneralRe: Setting Default Soundcard Pin
Mircea Puiu22-Mar-05 4:36
Mircea Puiu22-Mar-05 4:36 
GeneralRe: Setting Default Soundcard Pin
peterchen22-Mar-05 5:41
peterchen22-Mar-05 5:41 
QuestionHow to display raw 12-bit image buffer? Pin
Ajay L D22-Mar-05 3:29
Ajay L D22-Mar-05 3:29 
AnswerRe: How to display raw 12-bit image buffer? Pin
Chris Losinger22-Mar-05 7:22
professionalChris Losinger22-Mar-05 7:22 
GeneralRe: How to display raw 12-bit image buffer? Pin
Ajay L D22-Mar-05 22:16
Ajay L D22-Mar-05 22:16 
GeneralMultilingual support in vc++ Pin
inbakumar.G22-Mar-05 3:14
inbakumar.G22-Mar-05 3:14 
GeneralRe: Multilingual support in vc++ Pin
Mircea Puiu22-Mar-05 4:14
Mircea Puiu22-Mar-05 4:14 
GeneralRe: Multilingual support in vc++ Pin
22-Mar-05 4:20
suss22-Mar-05 4:20 
GeneralRe: Multilingual support in vc++ Pin
Mircea Puiu22-Mar-05 4:30
Mircea Puiu22-Mar-05 4:30 
GeneralRe: Multilingual support in vc++ Pin
inbakumar.G22-Mar-05 4:39
inbakumar.G22-Mar-05 4:39 
GeneralRe: Multilingual support in vc++ Pin
Mircea Puiu22-Mar-05 4:51
Mircea Puiu22-Mar-05 4:51 
GeneralRenaming files Pin
Gagnon Claude22-Mar-05 3:12
Gagnon Claude22-Mar-05 3:12 
GeneralRe: Renaming files Pin
David Crow22-Mar-05 3:31
David Crow22-Mar-05 3:31 

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.