Click here to Skip to main content

Kuldip Rindani - Professional Profile

797
Author
25
Authority
14
Debator
180
Editor
58
Organiser
274
Participant
0
Enquirer
C++, Unix Shell Scripts, DOTNET, ASP.NET, Sql Server 2000 and Oracle.
Member since Monday, September 15, 2003 (8 years, 8 months)

For more information on Reputation please see the FAQ.
 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
  Refresh
GeneralAvoiding Multiple instance of Application to start Pin
Wednesday, March 21, 2012 9:15 PM
http://www.flounder.com/nomultiples.htm
 
GeneralTruncate Log file in Sql server for reclaiming diskspace Pin
Tuesday, March 24, 2009 9:04 PM
BACKUP LOG %DB_NAME% WITH TRUNCATE_ONLY
DBCC SHRINKFILE (%LOG_NAME%, %LOG_SIZE%)
 
GeneralHow to Switch View - MFC Pin
Tuesday, January 20, 2009 12:12 AM
BOOL CMViewApp::SwitchView(CRuntimeClass *pNewView, int nRowView, int nColView)
{
CFrameWnd* pMainWnd = (CFrameWnd*)AfxGetMainWnd();
// CView* pOldActiveView = pMainWnd->GetActiveView();
CView* pOldActiveView = (CView *)((CMainFrame *)pMainWnd)->m_wndSplitter.GetPane(nRowView, nColView);
CDocument* pCurrentDoc = ((CFrameWnd*)m_pMainWnd)->GetActiveDocument();
 

CSplitterWnd* pSplitter = (CSplitterWnd *)pOldActiveView->GetParent();
//int row, col;
ASSERT(pSplitter->IsChildPane(pOldActiveView, nRowView, nColView));
CRect viewrect;
pOldActiveView->GetWindowRect(&viewrect);
 
// set flag so that document will not be deleted when view is destroyed
m_bAutoDelete = FALSE;
 
// Delete existing view
pOldActiveView->DestroyWindow();
 
// Create new view
CCreateContext context;
context.m_pNewViewClass = pNewView;
context.m_pCurrentDoc = pCurrentDoc;
context.m_pNewDocTemplate = NULL;
context.m_pLastView = NULL;
context.m_pCurrentFrame = NULL;
if (!pSplitter->CreateView(nRowView, nColView, pNewView, viewrect.Size(),
&context))
{
return FALSE; //error occured,
}
 
pMainWnd->InitialUpdateFrame(pCurrentDoc, TRUE);
 
// Set active
CView* pNewViewClass = (CView *)pSplitter->GetPane(nRowView, nColView);
pSplitter->GetParentFrame()->SetActiveView(pNewViewClass);

pSplitter->RecalcLayout();
pNewViewClass->SendMessage(WM_PAINT);
 
return TRUE;
}

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   


Advertise | Privacy | Mobile
Web03 | 2.5.120528.1 | Last Updated 28 May 2012
Copyright © CodeProject, 1999-2012
All Rights Reserved. Terms of Use
Layout: fixed | fluid