Click here to Skip to main content
15,889,931 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: control event list empty in VS2008 - no messages listed Pin
yooyo21-Apr-10 1:17
yooyo21-Apr-10 1:17 
Questionwebbrowser problem Pin
Aric Wang1-Apr-10 21:00
Aric Wang1-Apr-10 21:00 
AnswerRe: webbrowser problem Pin
Cedric Moonen1-Apr-10 21:11
Cedric Moonen1-Apr-10 21:11 
GeneralRe: webbrowser problem Pin
Aric Wang1-Apr-10 21:27
Aric Wang1-Apr-10 21:27 
GeneralRe: webbrowser problem Pin
Aric Wang1-Apr-10 21:33
Aric Wang1-Apr-10 21:33 
GeneralRe: webbrowser problem Pin
Eugen Podsypalnikov1-Apr-10 21:44
Eugen Podsypalnikov1-Apr-10 21:44 
GeneralRe: webbrowser problem Pin
Aric Wang4-Apr-10 0:45
Aric Wang4-Apr-10 0:45 
QuestionOnContextMenu not working in View class Pin
Anu_Bala1-Apr-10 20:46
Anu_Bala1-Apr-10 20:46 
Hi, i have a popup menu for contextmenu.And i wrote the function for each menu in CMainframe.
I have OnContextMenu() in each view class and in one dialog class.Its works fine in Dialog class.But not in View class.Codings are below:
CMainframe funciton:
void CMainFrame::OnUpdateFptrend(CCmdUI* pCmdUI) 
{
((CMainFrame *)AfxGetMainWnd())->SendMessage(WM_COMMAND,ID_TRENDVIEW,NULL);	
}
void CMainFrame::OnUpdateFptuning(CCmdUI* pCmdUI) 
{
((CMainFrame *)AfxGetMainWnd())->SendMessage(WM_COMMAND,ID_TUNINGVIEW,NULL);	
}


Dialog class Contextmenu:
void CFacePlate::OnContextMenu(CWnd* pWnd, CPoint point) 
{
	CMenu mnuPopup;
	mnuPopup.LoadMenu(IDR_FPMENU);
	CRect rBarRect;
	rBarRect.left = rBarRect.top = 0;rBarRect.right = 1000;rBarRect.bottom = 300;
	
	CMenu *mnuPopupMenu = mnuPopup.GetSubMenu(0);
	ASSERT(mnuPopupMenu);	
	if( rBarRect.PtInRect(point) ) 
		mnuPopupMenu->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, point.x, point.y, this);	
}


View class:
void CGroupView::OnContextMenu(CWnd* pWnd, CPoint point) 
{
	CMenu mnuPopup;
	mnuPopup.LoadMenu(IDR_FPMENU);

	CRect rBarRect;
	rBarRect.left = rBarRect.top = 0;rBarRect.right = 1150;rBarRect.bottom = 390;

	CMenu *mnuPopupMenu = mnuPopup.GetSubMenu(0);
	ASSERT(mnuPopupMenu);		
	
	if( rBarRect.PtInRect(point) )
		mnuPopupMenu->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, point.x, point.y, this);
	
}


When i press popup menu from Faceplate(Dialogclass),it goes to Mainframe function.At the same time when i press menu from any view class,it doesnot go to Mainframe function.Why its like that?
Anu

AnswerRe: OnContextMenu not working in View class Pin
Eugen Podsypalnikov1-Apr-10 21:25
Eugen Podsypalnikov1-Apr-10 21:25 
QuestionProcessing strings ASAP Pin
PaulowniaK1-Apr-10 20:02
PaulowniaK1-Apr-10 20:02 
QuestionRe: Processing strings ASAP Pin
CPallini1-Apr-10 21:21
mveCPallini1-Apr-10 21:21 
AnswerRe: Processing strings ASAP Pin
PaulowniaK1-Apr-10 21:32
PaulowniaK1-Apr-10 21:32 
GeneralRe: Processing strings ASAP Pin
CPallini1-Apr-10 21:48
mveCPallini1-Apr-10 21:48 
GeneralRe: Processing strings ASAP Pin
PaulowniaK1-Apr-10 22:03
PaulowniaK1-Apr-10 22:03 
GeneralRe: Processing strings ASAP Pin
CPallini1-Apr-10 22:16
mveCPallini1-Apr-10 22:16 
GeneralRe: Processing strings ASAP Pin
PaulowniaK4-Apr-10 14:20
PaulowniaK4-Apr-10 14:20 
GeneralRe: Processing strings ASAP Pin
CPallini5-Apr-10 0:09
mveCPallini5-Apr-10 0:09 
Questioncsv file problem Pin
Member 5903101-Apr-10 19:29
Member 5903101-Apr-10 19:29 
AnswerRe: csv file problem Pin
Eugen Podsypalnikov1-Apr-10 19:45
Eugen Podsypalnikov1-Apr-10 19:45 
GeneralRe: csv file problem Pin
Member 5903101-Apr-10 20:01
Member 5903101-Apr-10 20:01 
GeneralRe: csv file problem Pin
Eugen Podsypalnikov1-Apr-10 20:12
Eugen Podsypalnikov1-Apr-10 20:12 
GeneralRe: csv file problem Pin
Member 5903101-Apr-10 20:31
Member 5903101-Apr-10 20:31 
GeneralRe: csv file problem Pin
Eugen Podsypalnikov1-Apr-10 20:35
Eugen Podsypalnikov1-Apr-10 20:35 
GeneralRe: csv file problem Pin
Member 5903101-Apr-10 20:45
Member 5903101-Apr-10 20:45 
GeneralRe: csv file problem Pin
Eugen Podsypalnikov1-Apr-10 20:53
Eugen Podsypalnikov1-Apr-10 20:53 

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.