|
It's actually rather simple. I've done exaclty what you're looking for by creating my own CSplitterWnd derived class. You can do something like this:
void CMySplitterWnd::ShowViews(bool bShowView1, bool bShowView2)
{
ASSERT(bShowView1 || bShowView2);
int nViewCount = 0;
if (bShowView1)
nViewCount++;
if (bShowView2)
nViewCount++;
m_nCols = m_nMaxCols = nViewCount;
CRect rc;
m_pView1->GetWindowRect(&rc);
m_sizeView1 = rc.Size();
m_pView2->GetWindowRect(&rc);
m_sizeView2 = rc.Size();
int nMyViewCount = 2;
m_pView1->SetDlgCtrlID(AFX_IDW_PANE_FIRST + nMyViewCount++);
m_pView2->SetDlgCtrlID(AFX_IDW_PANE_FIRST + nMyViewCount++);
int nCount = 0;
if (bShowView1)
{
m_pView1->SetDlgCtrlID(AFX_IDW_PANE_FIRST + nCount);
m_pView1->ShowWindow(SW_SHOW);
SetColumnInfo(nCount, m_sizeView1.cx, 0);
nCount++;
}
else
m_pView1->ShowWindow(SW_HIDE);
if (bShowView2)
{
m_pView2->SetDlgCtrlID(AFX_IDW_PANE_FIRST + nCount);
m_pView2->ShowWindow(SW_SHOW);
SetColumnInfo(nCount, m_sizeView2.cx, 0);
nCount++;
}
else
m_pView2->ShowWindow(SW_HIDE);
RecalcLayout();
}
Edit: Forgot some important code
|
|
|
|
|
I have just designed a look alike RADAR display for which, i have used a static text box as the canvass I have drawn a circle with a line going round at the rate of 1.5 seconds per rev.
Now i have to plot points on this circle.
I have 2 problems
1> My display flickers with every rev of the needle
2> I have used Mapping mode- MM_ISOTROPIC but i am unable to understand how to convert points to the disagram(circle which is the radar display
|
|
|
|
|
anu7873 wrote: I have just designed a look alike RADAR display for which, i have used a static text box as the canvass I have drawn a circle with a line going round at the rate of 1.5 seconds per rev.
Now i have to plot points on this circle.
for First handle WM_ERASEBKGND PRE.clsCode { font-size:110%; } PRE.clsSyntax { font-size:100%; } TD DIV.clsBeta { display:none;} A:link { color:#0000ff; text-decoration:underline;} A:visited { color:#0000ff; text-decoration:underline;} A:hover { color:#3366ff; text-decoration:underline;} MSHelp\:link { color:#0000ff; text-decoration:underline; cursor:hand; hoverColor:#3366ff; filterString: ;} // // // // // //<ph:chm><ph:data><xml id="_topicdata" pagetype="winnotify" proj="WinUIHXS" name="WM_ERASEBKGND" pubpath="/WinUI/WindowsUserInterface/Resources/Icons/IconReference/IconMessages/WM_ERASEBKGND.htm"><root><xml xmlns:mshelp="http://msdn.microsoft.com/mshelp"><mshelp:keyword index="A" term="_win32_WM_ERASEBKGND"><mshelp:keyword index="A" term="_win32_WM_ERASEBKGND_cpp"><mshelp:toctitle title="WM_ERASEBKGND Notification"><mshelp:rltitle title="WM_ERASEBKGND Notification ()"><mshelp:keyword index="F" term="WM_ERASEBKGND"><mshelp:keyword index="K" term="WM_ERASEBKGND"><mshelp:attr name="TopicType" value="kbRef"><mshelp:attr name="Locale" value="kbEnglish"><mshelp:attr name="DevLang" value="C++"><mshelp:attr name="Technology" value="WinUI"><mshelp:attr name="TechnologyVers" value="kbWinUI"><mshelp:attr name="DocSet" value="WCSDK"><mshelp:attr name="DocSet" value="LHSDK"><mshelp:attr name="DocSet" value="PSDK"><mshelp:attr name="TargetOS" value="Windows"><mshelp:attr name="TopicType" value="apiref"><mshelp:attr name="APIName" value="WM_ERASEBKGND"><mshelp:attr name="APIType" value="NA"><mshelp:attr name="TopicType" value="winnotify"> notifcation
|
|
|
|
|
Something messed up with your post.
|
|
|
|
|
prasad_som wrote: Something messed up with your post.
i am just copying from MSDN.. thanks for same!, reposted
|
|
|
|
|
I think you use of a encoding system for your answer ;)
|
|
|
|
|
anu7873 wrote: for First handle WM_ERASEBKGND
for First handle WM_ERASEBKGND
|
|
|
|
|
hi i am having two tab contents in a dialog. if click a "next" button in tab1 it should show the next tab. is there any function for this
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
Are you using CTabCtrl in conjunction with a property sheet? if yes, it would go very ease to do what you want to.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
I think ,you are using property pages. Why do you need next button , if you can go to required tab by clicking it.
Next button are appropriate of wizard like property sheets.
Even though you need it, have a look at CPropertySheet::SetActivePage .
void CMyPage::OnClickNext()
{
((CPropertySheet*)GetParent())->SetActivePage(iIndexOfNextPage);
}
|
|
|
|
|
sorry i dont know about property sheet. what does it mean how to use. please explain me
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
Whatever I'd said, assuming you have used property pages.
How you have created this tabs ?
|
|
|
|
|
i just created two tab panes in the tab control box.each tab pane will have their own dialog. if i clicked the next button in first tab it should show the next tab
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
Oh! I was thinking other way around. Use CTabCtrl::SetCurSel for this.
Refer this[^] sample for more info.
|
|
|
|
|
how to use CTabCtrl::SetCurSel. since the next button will be in other dialog(displaying at tab1);
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
But, you would have a CTabCtrl variable assoiciated with tab control, in that dialog.
|
|
|
|
|
yes i am having the tabcontrol in a separate dilaog. the dialog for the tabpanes will be a separate one
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
I cant understand the scenario. Have you refered sample given in one of previous posts.
|
|
|
|
|
i am having a tab control in a dialog named IDD_NETWORK wiht MyConfigTab:CTabCtrl. inside this tab i added two items LAN and WAN. these two tabs have separate dialog named (lansettings and wansettings dialogs resp) to display. if i click the button "next" in LAN dialog it should show the next tab ie WAN.
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
deeps_cute wrote: lansettings and wansettings dialogs resp
These would be associated with CTabCtrl variable in some way for sure.Access that variabel and set next tab as active.
|
|
|
|
|
|
Microsoft Visual C++ (also known as MSVC) is an Integrated development environment (IDE) product for the C, C++, and C++/CLI programming languages engineered by Microsoft. It has tools for developing and debugging C++ code, especially that written for the Microsoft Windows API, the DirectX API, and the Microsoft .NET Framework.
Appu..
"My blood group is not B+.But I have it my blood"
|
|
|
|
|
|
WhiteSky wrote: isual C++[^]
one of my Favorite site for GK
|
|
|
|
|
Its interesting for me I can find every answers on the wikipedia.
|
|
|
|