15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


Making my DialogBar not moveable.

Ronen Ashkenazi -- rashken@ms-israel.kla.com
Wednesday, December 04, 1996


Environment: VC++ 4.2b, NT 4.0


Hi,

I have an SDI MFC application. I inserted a DialogBar into my application   
using the component gallery, and all works fine.
 I want to make the DialogBar not moveable meaning that it will not be   
affected by "Double Click" and will not respond to dragging. Can this be   
accomplished ?
If it can, How ?

Thanks,
Ronen.



Randy Taylor -- randy_taylor@ebt.com
Saturday, December 07, 1996

[Mini-digest: 4 responses]

CFrameWnd::EnableDocking
CControlBar::EnableDocking

----------
> From: Ronen Ashkenazi 
> To: 'mfcl' 
> Subject: Making my DialogBar not moveable.
> Date: Wednesday, December 04, 1996 7:30 PM
> 
> 
> Environment: VC++ 4.2b, NT 4.0
> 
> 
> Hi,
> 
> I have an SDI MFC application. I inserted a DialogBar into my application
  
> using the component gallery, and all works fine.
>  I want to make the DialogBar not moveable meaning that it will not be   
> affected by "Double Click" and will not respond to dragging. Can this be 
 
> accomplished ?
> If it can, How ?
> 
> Thanks,
> Ronen.
-----From: "Vincent W. Mayfield" 

Ronen,
	In the OnCreate of CMainFrame remove the following :

	// TODO: Delete these three lines if you don't want the toolbar to
	//  be dockable
	m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
	EnableDocking(CBRS_ALIGN_ANY);
	DockControlBar(&m_wndToolBar);

P.S. If you used Component Gallery to insert this Dialog Bar the code =
above including the //TODO: are put there by default. Perhaps this was =
an oversight.

Vincent W. Mayfield
Senior Software Engineer
vmax@gulf.net
"It is better to beg for forgiveness than ask for permission."


----------
From: 	Ronen Ashkenazi[SMTP:rashken@ms-israel.kla.com]
Sent: 	Wednesday, December 04, 1996 6:30 PM
To: 	'mfcl'
Subject: 	Making my DialogBar not moveable.


Environment: VC++ 4.2b, NT 4.0


Hi,

I have an SDI MFC application. I inserted a DialogBar into my =
application  =20
using the component gallery, and all works fine.
 I want to make the DialogBar not moveable meaning that it will not be   =

affected by "Double Click" and will not respond to dragging. Can this be =
 =20
accomplished ?
If it can, How ?

Thanks,
Ronen.
-----From: "Vincent W. Mayfield" 

Ronen,
	My apologies I cut out the wrong section of code. Here it is : The same =
thing except it is m_wndMyDialogBar.

		m_wndMyDialogBar.EnableDocking(CBRS_ALIGN_TOP | CBRS_ALIGN_BOTTOM);=0A=
		EnableDocking(CBRS_ALIGN_ANY);=0A=
		DockControlBar(&m_wndMyDialogBar);=0A=

Vincent W. Mayfield
Senior Software Engineer
vmax@gulf.net
"It is better to beg for forgiveness than ask for permission."

----------
From: 	Vincent W. Mayfield[SMTP:vmax@gulf.net]
Sent: 	Saturday, December 07, 1996 4:02 PM
To: 	'mfc-l@netcom.com'
Subject: 	RE: Making my DialogBar not moveable.

Ronen,
	In the OnCreate of CMainFrame remove the following :

	// TODO: Delete these three lines if you don't want the toolbar to
	//  be dockable
	m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
	EnableDocking(CBRS_ALIGN_ANY);
	DockControlBar(&m_wndToolBar);

P.S. If you used Component Gallery to insert this Dialog Bar the code =
above including the //TODO: are put there by default. Perhaps this was =
an oversight.

Vincent W. Mayfield
Senior Software Engineer
vmax@gulf.net
"It is better to beg for forgiveness than ask for permission."


----------
From: 	Ronen Ashkenazi[SMTP:rashken@ms-israel.kla.com]
Sent: 	Wednesday, December 04, 1996 6:30 PM
To: 	'mfcl'
Subject: 	Making my DialogBar not moveable.


Environment: VC++ 4.2b, NT 4.0


Hi,

I have an SDI MFC application. I inserted a DialogBar into my =
application  =20
using the component gallery, and all works fine.
 I want to make the DialogBar not moveable meaning that it will not be   =

affected by "Double Click" and will not respond to dragging. Can this be =
 =20
accomplished ?
If it can, How ?

Thanks,
Ronen.



-----From: Rob den Breejen 

Hi Ronen,

I have a 'CControlPanel' class derived from CDialogBar. The panel should not be floating so I wrote the following code to prevent this.

void CControlPanel::OnLButtonDown(UINT nFlags, CPoint point) 
{
	// Don't call superclass (CDialogBar) member to prevent floating
	CWnd::OnLButtonDown(nFlags, point);
}

void CControlPanel::OnLButtonDblClk(UINT nFlags, CPoint point) 
{
	// Don't call superclass (CDialogBar) member to prevent floating
	CWnd::OnLButtonDblClk(nFlags, point);
}

I hope this helps.

--Rob den Breejen.

----------
From: 	Ronen Ashkenazi[SMTP:rashken@ms-israel.kla.com]
Sent: 	Thursday, December 05, 1996 1:30 AM
To: 	'mfcl'
Subject: 	Making my DialogBar not moveable.


Environment: VC++ 4.2b, NT 4.0


Hi,

I have an SDI MFC application. I inserted a DialogBar into my application   
using the component gallery, and all works fine.
 I want to make the DialogBar not moveable meaning that it will not be   
affected by "Double Click" and will not respond to dragging. Can this be   
accomplished ?
If it can, How ?

Thanks,
Ronen.




| Вернуться в корень Архива |