Click here to Skip to main content
15,909,939 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: how can I call a .exe in c++ Pin
Cedric Moonen19-Jul-06 2:19
Cedric Moonen19-Jul-06 2:19 
AnswerRe: how can I call a .exe in c++ Pin
Hamid_RT19-Jul-06 2:31
Hamid_RT19-Jul-06 2:31 
GeneralRe: how can I call a .exe in c++ Pin
mwolf12219-Jul-06 21:36
mwolf12219-Jul-06 21:36 
QuestionSetTimer, nIDEvent and timer identification Pin
Dimitris Vikeloudas19-Jul-06 1:41
Dimitris Vikeloudas19-Jul-06 1:41 
AnswerRe: SetTimer, nIDEvent and timer identification Pin
Kurt _B19-Jul-06 2:57
Kurt _B19-Jul-06 2:57 
GeneralRe: SetTimer, nIDEvent and timer identification Pin
Dimitris Vikeloudas19-Jul-06 3:17
Dimitris Vikeloudas19-Jul-06 3:17 
GeneralRe: SetTimer, nIDEvent and timer identification [modified] Pin
bosfan19-Jul-06 4:06
bosfan19-Jul-06 4:06 
QuestionMenus Disable when Switch from One View to Another View. [modified] Pin
Uday Janaswamy19-Jul-06 1:30
Uday Janaswamy19-Jul-06 1:30 
hi all,

when i switch from one CFormView to Another CFormView, I am observing that my menu items for the second form are Disabled. I cant Understand why this is Happen when i switch from one view to another.

//---------Code -----------------------------------//

void CMainFrame::SwitchView()
{
CView *pOldView;
CView *pNewView;

pOldView = GetActiveView();

if (m_pCFirstView == NULL)
m_pCFirstView = pOldView;

if (m_pCSecondView == NULL)
{
CRuntimeClass *pCR = RUNTIME_CLASS(CSecondView);
m_pCSecondView = static_cast<cview*>(pCR->CreateObject());
m_pCSecondView->Create(NULL,NULL,AFX_WS_DEFAULT_VIEW,rectDefault,this,AFX_IDW_PANE_FIRST+1,NULL);
}
if (m_bFirstViewActive)
pNewView = m_pCSecondView;
else
pNewView = m_pCFirstView;
int nChildId = pNewView->GetDlgCtrlID();
pNewView->SetDlgCtrlID(AFX_IDW_PANE_FIRST);
pOldView->SetDlgCtrlID(nChildId);

CDocument *pDoc = pOldView->GetDocument();
pDoc->AddView(pNewView);
pDoc->RemoveView(pOldView);
SetActiveView(pNewView);
RecalcLayout();
pNewView->ShowWindow(SW_SHOW);
pOldView->ShowWindow(SW_HIDE);
m_bFirstViewActive = !m_bFirstViewActive;
}
//-----------------------------//------------------------------------//

Every thing is Ok but the Menu Items are Enabled when i transform from View to Another View. Please Provide me good Solution.

is there any Custom Command Routing for this.

please help me out.

uday.

-- modified at 7:36 Wednesday 19th July, 2006
AnswerRe: Menus Disable when Switch from One View to Another View. Pin
Steve S19-Jul-06 1:49
Steve S19-Jul-06 1:49 
GeneralRe: Menus Disable when Switch from One View to Another View. Pin
Uday Janaswamy19-Jul-06 1:57
Uday Janaswamy19-Jul-06 1:57 
GeneralRe: Menus Disable when Switch from One View to Another View. Pin
Steve S19-Jul-06 6:34
Steve S19-Jul-06 6:34 
QuestionTAB CONTROL [modified] Pin
ashish dogra19-Jul-06 0:38
ashish dogra19-Jul-06 0:38 
AnswerRe: TAB CONTROL Pin
Hamid_RT19-Jul-06 2:27
Hamid_RT19-Jul-06 2:27 
Questiondouble to CString and back Pin
Desmo1619-Jul-06 0:29
Desmo1619-Jul-06 0:29 
AnswerRe: double to CString and back Pin
see me19-Jul-06 0:48
see me19-Jul-06 0:48 
AnswerRe: double to CString and back Pin
Roland Pibinger19-Jul-06 8:28
Roland Pibinger19-Jul-06 8:28 
AnswerRe: double to CString and back Pin
Naveen19-Jul-06 0:48
Naveen19-Jul-06 0:48 
AnswerRe: double to CString and back Pin
Ștefan-Mihai MOGA19-Jul-06 0:50
professionalȘtefan-Mihai MOGA19-Jul-06 0:50 
AnswerRe: double to CString and back Pin
Hamid_RT19-Jul-06 2:37
Hamid_RT19-Jul-06 2:37 
GeneralRe: double to CString and back Pin
Desmo1619-Jul-06 3:39
Desmo1619-Jul-06 3:39 
GeneralRe: double to CString and back [modified] Pin
toxcct19-Jul-06 3:40
toxcct19-Jul-06 3:40 
GeneralRe: double to CString and back Pin
Zac Howland19-Jul-06 4:32
Zac Howland19-Jul-06 4:32 
GeneralRe: double to CString and back Pin
toxcct19-Jul-06 4:46
toxcct19-Jul-06 4:46 
GeneralRe: double to CString and back [modified] Pin
Zac Howland19-Jul-06 4:55
Zac Howland19-Jul-06 4:55 
GeneralRe: double to CString and back Pin
toxcct19-Jul-06 5:00
toxcct19-Jul-06 5:00 

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.