problem with CMFCOutlookBar hiding
hi
i make a new mfc sdi project as if embed a CMFCOutlookBar in this by wizard.
two category is added by wizard in pane.
tree.Create(dwTreeStyle, rectDummy, &bar, 1200);
bNameValid = strTemp.LoadString(IDS_FOLDERS);
ASSERT(bNameValid);
pOutlookBar->AddControl(&tree, strTemp, 2, TRUE, dwStyle);
calendar.Create(rectDummy, &bar, 1201);
bNameValid = strTemp.LoadString(IDS_CALENDAR);
ASSERT(bNameValid);
pOutlookBar->AddControl(&calendar, strTemp, 3, TRUE, dwStyle);
i comment AddControl and delete two category
tree.Create(dwTreeStyle, rectDummy, &bar, 1200);
bNameValid = strTemp.LoadString(IDS_FOLDERS);
ASSERT(bNameValid);
// pOutlookBar->AddControl(&tree, strTemp, 2, TRUE, dwStyle);
calendar.Create(rectDummy, &bar, 1201);
bNameValid = strTemp.LoadString(IDS_CALENDAR);
ASSERT(bNameValid);
// pOutlookBar->AddControl(&calendar, strTemp, 3, TRUE, dwStyle);
i add custom category
pdlgServers=new CServersDlg(&bar);
pdlgServers->Create(IDD_DIALOG_SERVERS, &bar);
bNameValid = strTemp.LoadString(IDS_SERVERS);
ASSERT(bNameValid);
pOutlookBar->AddControl(pdlgServers, strTemp, 2, TRUE, dwStyle);
pdlgServers->ShowWindow(SW_SHOW);
but this pane be hide.
what is my bug?
Re: problem with CMFCOutlookBar hiding
Quote:
Originally Posted by
hessamini
i add custom category
Code:
pdlgServers=new CServersDlg(&bar);
pdlgServers->Create(IDD_DIALOG_SERVERS, &bar);
bNameValid = strTemp.LoadString(IDS_SERVERS);
ASSERT(bNameValid);
pOutlookBar->AddControl(pdlgServers, strTemp, 2, TRUE, dwStyle);
pdlgServers->ShowWindow(SW_SHOW);
but this pane be hide.
what is my bug?
Did you check the return values of
Code:
bNameValid = strTemp.LoadString(IDS_SERVERS);
and
Code:
pOutlookBar->AddControl(pdlgServers, strTemp, 2, TRUE, dwStyle);
Re: problem with CMFCOutlookBar hiding
i don't think my problem be it. because if i run project once this pane is shown but from next run this pane will be hide. i think my problem is about change registry when i close project so on next run load new setting of registry and this pane can not be shown.
Re: problem with CMFCOutlookBar hiding
my problem do not solve . help me please.....
Re: problem with CMFCOutlookBar hiding
Quote:
Originally Posted by
hessamini
i don't think my problem be it. because if i run project once this pane is shown but from next run this pane will be hide. i think my problem is about change registry when i close project so on next run load new setting of registry and this pane can not be shown.
I don't care what you think. You must check the return values of the functions you call to be sure they succeded.
As for registry - find where in registry your applicaton saves some settings and what settings there are.
Re: problem with CMFCOutlookBar hiding
i did check your needed. but any thing was ok. i think you did angry from me. i'm sorry for bad English. i can not describe very well . but i said :
my project work very well when i don't comment
// pOutlookBar->AddControl(&tree, strTemp, 2, TRUE, dwStyle);
and
// pOutlookBar->AddControl(&calendar, strTemp, 3, TRUE, dwStyle);
but after comment these, third AddControl as if i wrote its:
pOutlookBar->AddControl(pdlgServers, strTemp, 2, TRUE, dwStyle);
does show for once run. means: after once run and close project and run again this pane not show even if i uncomment the two.
I found a solution for return this pane : i remove item registry : [HKEY_CURRENT_USER\Software\Local AppWizard-Generated Applications\Sccm\Workspace\DockingManager-128] and pane show again.
my Experience in vc++,mfc is about 8 years. but i can not solve a little problem . i am very gray. help me please.
Re: problem with CMFCOutlookBar hiding
Quote:
Originally Posted by
hessamini
i did check your needed. but any thing was ok. i think you did angry from me. i'm sure for bad English.
Don't worry! Your English is pretty good!
And I am not angry at all!
Quote:
Originally Posted by
hessamini
I found a solution for return this pane : i remove item registry : [HKEY_CURRENT_USER\Software\Local AppWizard-Generated Applications\Sccm\Workspace\DockingManager-128] and pane show again.
my Experience in vc++,mfc is about 8 years. but i can not solve a little problem . i am very gray. help me please.
It is good that you found a solution (or, workaround)
If don't want to dig deeper you can just use this workaround: delete theis registry key by application start!
Re: problem with CMFCOutlookBar hiding