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

C / C++ / MFC

 
GeneralRe: Sleep less than 1 ms Pin
softwaremonkey7-Jan-10 11:32
softwaremonkey7-Jan-10 11:32 
QuestionHow to send a msg between MainFrame and a view? Pin
Software20075-Jan-10 5:57
Software20075-Jan-10 5:57 
AnswerRe: How to send a msg between MainFrame and a view? Pin
Richard MacCutchan5-Jan-10 9:31
mveRichard MacCutchan5-Jan-10 9:31 
GeneralRe: How to send a msg between MainFrame and a view? Pin
Software20075-Jan-10 9:51
Software20075-Jan-10 9:51 
GeneralRe: How to send a msg between MainFrame and a view? Pin
Richard MacCutchan5-Jan-10 9:59
mveRichard MacCutchan5-Jan-10 9:59 
GeneralRe: How to send a msg between MainFrame and a view? Pin
Software20075-Jan-10 10:02
Software20075-Jan-10 10:02 
GeneralRe: How to send a msg between MainFrame and a view? Pin
Richard MacCutchan5-Jan-10 10:50
mveRichard MacCutchan5-Jan-10 10:50 
GeneralRe: How to send a msg between MainFrame and a view? Pin
Software20076-Jan-10 2:30
Software20076-Jan-10 2:30 
The following code works, but breaks some of the standard Windows shortcuts for some reason. How do I just implement ONLeftMouse and OnRightMouse handlers to do the equivalent? I tried doing void CMainFrame::OnLButtonDown(UINT Flags,CPoint point) & void CMainFrame::OnRButtonDown(UINT Flags,CPoint point), but It isn't going there. Any ideas?

BOOL CMainFrame::PreTranslateMessage(MSG* pMsg)
{


  	 POSITION FirstDoc =theApp.m_pMainDocTemplate->GetFirstDocPosition();
	 if(FirstDoc !=NULL){
		CMYAppDoc* pDoc = (CMYAppDoc*)theApp.m_pMainDocTemplate->GetNextDoc(FirstDoc);

		if(pDoc != NULL){

			POSITION pos =  pDoc->GetFirstViewPosition();
			while (pos != NULL){
				CView* pActiveView =  pDoc->GetNextView(pos);
				

			//Get All the Consoles and Static Graphs
			   if(pActiveView->IsKindOf( RUNTIME_CLASS(CRealView)) ){
				    CRealView *pView = (CRealView*)pActiveView;
				       if (pMsg->message == WM_LBUTTONDOWN)      //Left Click                              
					       pView->SendMessage(WM_LBUTTONDOWN,(WPARAM)0, (LPARAM)0);    //Send Left Click Message to CRealView

				       else if (pMsg->message == WM_RBUTTONDOWN) //Right Click
					       pView->SendMessage(WM_RBUTTONDOWN,(WPARAM)0,(LPARAM)0);    //Send Right Click Message to CRealView		
				
				}

			}//end while
		}//end doc ! NULL

	 }

  

    return CFrameWnd::PreTranslateMessage(pMsg);

}

GeneralRe: How to send a msg between MainFrame and a view? Pin
Richard MacCutchan6-Jan-10 3:48
mveRichard MacCutchan6-Jan-10 3:48 
QuestionRe-drawing Transparent Bitmap - Strange Behavior Pin
softwaremonkey5-Jan-10 5:05
softwaremonkey5-Jan-10 5:05 
AnswerRe: Re-drawing Transparent Bitmap - Strange Behavior Pin
Cedric Moonen5-Jan-10 8:28
Cedric Moonen5-Jan-10 8:28 
GeneralRe: Re-drawing Transparent Bitmap - Strange Behavior Pin
softwaremonkey5-Jan-10 8:42
softwaremonkey5-Jan-10 8:42 
GeneralRe: Re-drawing Transparent Bitmap - Strange Behavior Pin
Cedric Moonen5-Jan-10 9:14
Cedric Moonen5-Jan-10 9:14 
GeneralRe: Re-drawing Transparent Bitmap - Strange Behavior Pin
softwaremonkey5-Jan-10 9:31
softwaremonkey5-Jan-10 9:31 
GeneralRe: Re-drawing Transparent Bitmap - Strange Behavior Pin
Rozis6-Jan-10 10:15
Rozis6-Jan-10 10:15 
GeneralRe: Re-drawing Transparent Bitmap - Strange Behavior Pin
softwaremonkey6-Jan-10 11:39
softwaremonkey6-Jan-10 11:39 
QuestionEditCtrl Pin
kumar sanghvi5-Jan-10 2:27
kumar sanghvi5-Jan-10 2:27 
AnswerRe: EditCtrl Pin
CPallini5-Jan-10 2:42
mveCPallini5-Jan-10 2:42 
Questionhow to get a hidden file extensions? Pin
nenfa5-Jan-10 1:33
nenfa5-Jan-10 1:33 
QuestionRe: how to get a hidden file extensions? Pin
CPallini5-Jan-10 2:26
mveCPallini5-Jan-10 2:26 
AnswerRe: how to get a hidden file extensions? Pin
Hamid_RT5-Jan-10 3:35
Hamid_RT5-Jan-10 3:35 
AnswerRe: how to get a hidden file extensions? Pin
Steve Mayfield5-Jan-10 9:53
Steve Mayfield5-Jan-10 9:53 
QuestionHooking Pin
S p k 5215-Jan-10 0:50
S p k 5215-Jan-10 0:50 
Questionc++ Pin
surekha.btech5-Jan-10 0:15
surekha.btech5-Jan-10 0:15 
AnswerRe: c++ Pin
«_Superman_»5-Jan-10 0:28
professional«_Superman_»5-Jan-10 0:28 

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.