Click here to Skip to main content
15,891,745 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow do I use TaskDiaglog or MessageBox at runtime, if TaskDiaglog not supported by comctl32.dll Pin
markyoung1439-Mar-10 5:13
markyoung1439-Mar-10 5:13 
QuestionSerach implementation Pin
johnalek9-Mar-10 3:28
johnalek9-Mar-10 3:28 
AnswerRe: Serach implementation Pin
Richard MacCutchan9-Mar-10 4:10
mveRichard MacCutchan9-Mar-10 4:10 
AnswerRe: Serach implementation Pin
Eugen Podsypalnikov9-Mar-10 4:48
Eugen Podsypalnikov9-Mar-10 4:48 
AnswerRe: Serach implementation Pin
KingsGambit9-Mar-10 4:54
KingsGambit9-Mar-10 4:54 
QuestionCMFCOutlookBarTabCtrl save state problem Pin
A&Ms8-Mar-10 21:49
A&Ms8-Mar-10 21:49 
AnswerRe: CMFCOutlookBarTabCtrl save state problem Pin
Eugen Podsypalnikov8-Mar-10 22:07
Eugen Podsypalnikov8-Mar-10 22:07 
QuestionRe: CMFCOutlookBarTabCtrl save state problem Pin
A&Ms9-Mar-10 4:22
A&Ms9-Mar-10 4:22 
This is my code for CMFCOutlookBarTabCtrl:
BOOL CMainFrame::CreateOutlookBar(CMFCOutlookBar& bar, UINT uiID,  int nInitialWidth/* = 250*/)
{

	//Outlookbar Style
	bar.SetMode2003(FALSE);


	BOOL bNameValid;
	CString strTemp;
	bNameValid = strTemp.LoadString(IDS_SHORTCUTS);
	ASSERT(bNameValid);


	//Creating OutlookBar
	if (!bar.Create(strTemp, this, CRect(0, 0, nInitialWidth, 32000), uiID, WS_CHILD | WS_VISIBLE | CBRS_LEFT))
	{
		return FALSE; // fail to create
	}


	//retrieving OutlookBarTabCtrl pointer
	CMFCOutlookBarTabCtrl* pOutlookBar = (CMFCOutlookBarTabCtrl*)bar.GetUnderlyingWindow();

	if (pOutlookBar == NULL)
	{
		ASSERT(FALSE);
		return FALSE;
	}



	pOutlookBar->EnableInPlaceEdit(TRUE);
	

	//Creating Tab Panes
	
	DWORD dwPaneStyle = AFX_DEFAULT_TOOLBAR_STYLE | CBRS_FLOAT_MULTI;

	// can float, can autohide, can resize, CAN NOT CLOSE
	DWORD dwStyle = AFX_CBRS_FLOAT | AFX_CBRS_AUTOHIDE | AFX_CBRS_RESIZE;


	static UINT uiPageID = 10;


	_m_OutlookPane1.Create(&bar, dwPaneStyle, uiPageID++, dwStyle);
	_m_OutlookPane1.SetOwner(this);
	_m_OutlookPane1.EnableTextLabels();
	_m_OutlookPane1.EnableDocking(CBRS_ALIGN_ANY);
	//_m_OutlookPane1.SetDefaultState();
	pOutlookBar->AddControl(&_m_OutlookPane1, _T("Scene*"), 0, TRUE, dwStyle);


	_m_OutlookPane2.Create(&bar, dwPaneStyle, uiPageID++, dwStyle);
	_m_OutlookPane2.SetOwner(this);
	_m_OutlookPane2.EnableTextLabels();
	_m_OutlookPane2.EnableDocking(CBRS_ALIGN_ANY);
	//_m_OutlookPane2.SetDefaultState();
	pOutlookBar->AddControl(&_m_OutlookPane2, _T("Walls*"), 1, TRUE, dwStyle);


	_m_OutlookPane3.Create(&bar, dwPaneStyle, uiPageID++, dwStyle);
	_m_OutlookPane3.SetOwner(this);
	_m_OutlookPane3.EnableTextLabels();
	_m_OutlookPane3.EnableDocking(CBRS_ALIGN_ANY);
	//_m_OutlookPane3.SetDefaultState();
	pOutlookBar->AddControl(&_m_OutlookPane3, _T("Furnitures*"), 2, TRUE, dwStyle);


	_m_OutlookPane4.Create(&bar, dwPaneStyle, uiPageID++, dwStyle);
	_m_OutlookPane4.SetOwner(this);
	_m_OutlookPane4.EnableTextLabels();
	_m_OutlookPane4.EnableDocking(CBRS_ALIGN_ANY);
	//_m_OutlookPane4.SetDefaultState();
	pOutlookBar->AddControl(&_m_OutlookPane4, _T("Decorations*"), 3, TRUE, dwStyle);


	_m_OutlookPane5.Create(&bar, dwPaneStyle, uiPageID++, dwStyle);
	_m_OutlookPane5.SetOwner(this);
	_m_OutlookPane5.EnableTextLabels();
	_m_OutlookPane5.EnableDocking(CBRS_ALIGN_ANY);
	//_m_OutlookPane5.SetDefaultState();
	pOutlookBar->AddControl(&_m_OutlookPane5, _T("Lights*"), 4, TRUE, dwStyle);



	//set Pane 2 as active default Tab
	_m_OutlookPane2.SetDefaultState();



	bar.SetPaneStyle(bar.GetPaneStyle() | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC);


	pOutlookBar->SetImageList(IDB_TABPANESHC, 24);

	pOutlookBar->RecalcLayout();

	BOOL bAnimation = theApp.GetInt(_T("OutlookAnimation"), TRUE);
	CMFCOutlookBarTabCtrl::EnableAnimation(bAnimation);

	bar.SetButtonsFont(&afxGlobalData.fontBold);

	return TRUE;
}



Because I have used pOutlookBar->EnableInPlaceEdit(TRUE); user can change the title of outlook bars
and after I have changed them while running once, any changes in source became effectiveness and when I rebuild The whole Project from beginning it appears the same as I have changed while running, and not from my source code.
AnswerRe: CMFCOutlookBarTabCtrl save state problem [modified] Pin
Eugen Podsypalnikov9-Mar-10 4:38
Eugen Podsypalnikov9-Mar-10 4:38 
QuestionRe: CMFCOutlookBarTabCtrl save state problem Pin
A&Ms9-Mar-10 9:04
A&Ms9-Mar-10 9:04 
AnswerRe: CMFCOutlookBarTabCtrl save state problem Pin
A&Ms9-Mar-10 9:20
A&Ms9-Mar-10 9:20 
GeneralRe: CMFCOutlookBarTabCtrl save state problem Pin
laoyun9-Mar-10 9:35
laoyun9-Mar-10 9:35 
GeneralRe: CMFCOutlookBarTabCtrl save state problem Pin
A&Ms9-Mar-10 19:13
A&Ms9-Mar-10 19:13 
AnswerRe: CMFCOutlookBarTabCtrl save state problem Pin
Eugen Podsypalnikov9-Mar-10 21:23
Eugen Podsypalnikov9-Mar-10 21:23 
AnswerRe: CMFCOutlookBarTabCtrl save state problem Pin
Richard MacCutchan9-Mar-10 1:03
mveRichard MacCutchan9-Mar-10 1:03 
GeneralRe: CMFCOutlookBarTabCtrl save state problem Pin
A&Ms9-Mar-10 4:26
A&Ms9-Mar-10 4:26 
Questiondevice return ERROR_GEN_FAILURE Pin
Tinf73788-Mar-10 21:18
Tinf73788-Mar-10 21:18 
QuestionRepainting of dialog box takes time. Pin
Le@rner8-Mar-10 18:47
Le@rner8-Mar-10 18:47 
AnswerRe: Repainting of dialog box takes time. Pin
BIJU Manjeri8-Mar-10 19:03
BIJU Manjeri8-Mar-10 19:03 
GeneralRe: Repainting of dialog box takes time. Pin
Le@rner8-Mar-10 19:13
Le@rner8-Mar-10 19:13 
GeneralRe: Repainting of dialog box takes time. Pin
KingsGambit8-Mar-10 19:33
KingsGambit8-Mar-10 19:33 
AnswerRe: Repainting of dialog box takes time. Pin
R@jeev K R8-Mar-10 19:13
R@jeev K R8-Mar-10 19:13 
GeneralRe: Repainting of dialog box takes time. Pin
R@jeev K R8-Mar-10 19:29
R@jeev K R8-Mar-10 19:29 
GeneralRe: Repainting of dialog box takes time. Pin
Le@rner8-Mar-10 20:09
Le@rner8-Mar-10 20:09 
GeneralRe: Repainting of dialog box takes time. Pin
R@jeev K R8-Mar-10 20:43
R@jeev K R8-Mar-10 20:43 

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.