Click here to Skip to main content
15,895,606 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Avoid includei in header files Pin
toxcct7-Sep-08 21:21
toxcct7-Sep-08 21:21 
GeneralRe: Avoid includei in header files Pin
reza matinnejad7-Sep-08 21:28
reza matinnejad7-Sep-08 21:28 
GeneralRe: Avoid includei in header files Pin
toxcct7-Sep-08 21:34
toxcct7-Sep-08 21:34 
Questioncaptureing right click mouse event........ Pin
ani_ikram7-Sep-08 19:58
ani_ikram7-Sep-08 19:58 
AnswerRe: captureing right click mouse event........ Pin
Rane7-Sep-08 20:11
Rane7-Sep-08 20:11 
AnswerRe: captureing right click mouse event........ Pin
SandipG 7-Sep-08 20:12
SandipG 7-Sep-08 20:12 
GeneralRe: captureing right click mouse event........ Pin
ani_ikram7-Sep-08 20:34
ani_ikram7-Sep-08 20:34 
GeneralRe: captureing right click mouse event........ Pin
SandipG 7-Sep-08 21:15
SandipG 7-Sep-08 21:15 
You can try something like this..

BEGIN_MESSAGE_MAP(CMyEdit, CEdit)
	//{{AFX_MSG_MAP(CMyEdit)
	ON_WM_CONTEXTMENU()
	//}}AFX_MSG_MAP
	ON_MESSAGE(WM_COPY,OnCopy)
	ON_MESSAGE(WM_PASTE,OnPaste)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CMyEdit message handlers

void CMyEdit::OnContextMenu(CWnd* pWnd, CPoint point) 
{
	// TODO: Add your message handler code here
}
void CMyEdit::OnCopy(WPARAM wParam,LPARAM lParam) 
{
	// TODO: Add your message handler code here
}
void CMyEdit::OnPaste(WPARAM wParam,LPARAM lParam) 
{
	// TODO: Add your message handler code here
}


And declarations..

protected:
	//{{AFX_MSG(CMyEdit)
	afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
	//}}AFX_MSG

	void OnCopy(WPARAM wParam,LPARAM lParam) ;
	void OnPaste(WPARAM wParam,LPARAM lParam) ;


I hope it helps.
I assume you can derive the class from CEdit and add similar handlers to your class.
Also don't forget to add the control variable of type CMyEdit for the Edit Box.

Regards,
Sandip.

GeneralRe: captureing right click mouse event........ Pin
ani_ikram7-Sep-08 21:18
ani_ikram7-Sep-08 21:18 
GeneralRe: captureing right click mouse event........ Pin
SandipG 7-Sep-08 21:25
SandipG 7-Sep-08 21:25 
GeneralRe: captureing right click mouse event........ Pin
ani_ikram9-Sep-08 17:23
ani_ikram9-Sep-08 17:23 
GeneralRe: captureing right click mouse event........ Pin
SandipG 9-Sep-08 19:02
SandipG 9-Sep-08 19:02 
QuestionRegSetValueEx crashing Pin
monsieur_jj7-Sep-08 19:28
monsieur_jj7-Sep-08 19:28 
AnswerRe: RegSetValueEx crashing Pin
Rane7-Sep-08 20:04
Rane7-Sep-08 20:04 
GeneralRe: RegSetValueEx crashing Pin
monsieur_jj7-Sep-08 20:22
monsieur_jj7-Sep-08 20:22 
GeneralRe: RegSetValueEx crashing Pin
Rane8-Sep-08 0:07
Rane8-Sep-08 0:07 
QuestionRe: RegSetValueEx crashing Pin
CPallini7-Sep-08 23:45
mveCPallini7-Sep-08 23:45 
QuestionRe: RegSetValueEx crashing Pin
David Crow8-Sep-08 4:02
David Crow8-Sep-08 4:02 
QuestionGetting the IP adress of the computer Pin
Deepu Antony7-Sep-08 19:02
Deepu Antony7-Sep-08 19:02 
AnswerRe: Getting the IP adress of the computer Pin
_AnsHUMAN_ 7-Sep-08 19:12
_AnsHUMAN_ 7-Sep-08 19:12 
GeneralRe: Getting the IP adress of the computer Pin
Deepu Antony7-Sep-08 21:35
Deepu Antony7-Sep-08 21:35 
AnswerRe: Getting the IP adress of the computer Pin
Rane7-Sep-08 19:13
Rane7-Sep-08 19:13 
GeneralRe: Getting the IP adress of the computer Pin
Deepu Antony7-Sep-08 21:33
Deepu Antony7-Sep-08 21:33 
GeneralRe: Getting the IP adress of the computer Pin
SandipG 7-Sep-08 21:40
SandipG 7-Sep-08 21:40 
QuestionRun as Service Pin
cpvc++7-Sep-08 18:55
cpvc++7-Sep-08 18:55 

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.