Click here to Skip to main content
15,910,121 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Problem in messages scheduling using timers Pin
toxcct8-Apr-04 2:14
toxcct8-Apr-04 2:14 
GeneralRe: Problem in messages scheduling using timers Pin
David Crow8-Apr-04 2:16
David Crow8-Apr-04 2:16 
GeneralRe: Problem in messages scheduling using timers Pin
Prakash Nadar8-Apr-04 6:36
Prakash Nadar8-Apr-04 6:36 
GeneralFor SSL tunneling wt is Connect command syntax for connecting to HTTP Proxy server Pin
Anonymous8-Apr-04 1:31
Anonymous8-Apr-04 1:31 
GeneralRe: For SSL tunneling wt is Connect command syntax for connecting to HTTP Proxy server Pin
valikac8-Apr-04 9:02
valikac8-Apr-04 9:02 
QuestionHow to save CDC content to a Bitmap file Pin
JHAKAS8-Apr-04 1:14
JHAKAS8-Apr-04 1:14 
GeneralDesktop Context Menu Pin
/P/8-Apr-04 1:09
suss/P/8-Apr-04 1:09 
GeneralRe: Desktop Context Menu Pin
avenger_sb258-Apr-04 12:25
avenger_sb258-Apr-04 12:25 
First of all, i consider u r familiar with the VC++ IDE.
So, first of all, add a "Resource Script" to ur project. Then insert an MENU into it. Add a few feilds to the menu and give it a "DENTIFIER STRING".

Then to display a CONTEXT MENU u hav 2 write:
IN MFC:
void CMenuTestView::OnRButtonDown(UINT nFlags, CPoint point) 
{
	// TODO: Add your message handler code here and/or call default
	CMenu myMenu;
	CMenu *ptrMenu;
	myMenu.LoadMenu(IDR_MYMENU);
	ptrMenu=myMenu.GetSubMenu(0);
	ClientToScreen(&point);
	ptrMenu->TrackPopupMenu
		(
        TPM_LEFTALIGN|TPM_RIGHTBUTTON,
        point.x,
        point.y,
        this,
        NULL
		);
	CView::OnRButtonDown(nFlags, point);
}

IN WINDOWS API:
case WM_RBUTTONDOWN:
POINT p;
GetCursorPos(&p);
TrackPopupMenu(GetSubMenu(LoadMenu(gloInst,"MYMENU"),0),
TPM_LEFTALIGN | TPM_LEFTBUTTON,p.x,p.y,0,hwnd,NULL);
break;


...Avenger

Remember... testing & debugging are always part of programming ...so exterminate those stinking bugs
GeneralRe: Desktop Context Menu Pin
8-Apr-04 15:26
suss8-Apr-04 15:26 
GeneralInprocess object handler for Ms-Office Pin
anshumanshinde8-Apr-04 0:55
anshumanshinde8-Apr-04 0:55 
GeneralFatal error C1010 Pin
roadragedave8-Apr-04 0:52
roadragedave8-Apr-04 0:52 
GeneralRe: Fatal error C1010 Pin
toxcct8-Apr-04 1:08
toxcct8-Apr-04 1:08 
GeneralRe: Fatal error C1010 Pin
Diddy8-Apr-04 1:35
Diddy8-Apr-04 1:35 
GeneralRe: Fatal error C1010 Pin
Mike Beckerleg8-Apr-04 1:40
Mike Beckerleg8-Apr-04 1:40 
GeneralRe: Fatal error C1010 Pin
Michael Dunn8-Apr-04 4:31
sitebuilderMichael Dunn8-Apr-04 4:31 
QuestionWhy is it bad to use a macro function? Pin
-Dy8-Apr-04 0:14
-Dy8-Apr-04 0:14 
AnswerRe: Why is it bad to use a macro function? Pin
toxcct8-Apr-04 0:25
toxcct8-Apr-04 0:25 
GeneralRe: Why is it bad to use a macro function? Pin
Ravi Bhavnani8-Apr-04 3:52
professionalRavi Bhavnani8-Apr-04 3:52 
GeneralRe: Why is it bad to use a macro function? Pin
toxcct8-Apr-04 4:09
toxcct8-Apr-04 4:09 
AnswerRe: Why is it bad to use a macro function? Pin
Maximilien8-Apr-04 0:47
Maximilien8-Apr-04 0:47 
AnswerRe: Why is it bad to use a macro function? Pin
Antony M Kancidrowski8-Apr-04 2:07
Antony M Kancidrowski8-Apr-04 2:07 
GeneralRe: Why is it bad to use a macro function? Pin
toxcct8-Apr-04 2:08
toxcct8-Apr-04 2:08 
AnswerRe: Why is it bad to use a macro function? Pin
Tim Smith8-Apr-04 4:17
Tim Smith8-Apr-04 4:17 
AnswerRe: Why is it bad to use a macro function? Pin
Nemanja Trifunovic8-Apr-04 5:15
Nemanja Trifunovic8-Apr-04 5:15 
AnswerRe: Why is it bad to use a macro function? Pin
John R. Shaw8-Apr-04 8:26
John R. Shaw8-Apr-04 8:26 

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.