Click here to Skip to main content
15,914,415 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to return multiple values in MFC ActiveX? Pin
followait12-Nov-08 3:04
followait12-Nov-08 3:04 
AnswerRe: How to return multiple values in MFC ActiveX? Pin
Roger Stoltz12-Nov-08 3:20
Roger Stoltz12-Nov-08 3:20 
GeneralRe: How to return multiple values in MFC ActiveX? Pin
followait13-Nov-08 3:21
followait13-Nov-08 3:21 
QuestionAVI Player Pin
tanmay.kol10-Nov-08 22:49
tanmay.kol10-Nov-08 22:49 
AnswerRe: AVI Player Pin
Hamid_RT11-Nov-08 3:33
Hamid_RT11-Nov-08 3:33 
GeneralRe: AVI Player Pin
tanmay.kol11-Nov-08 23:42
tanmay.kol11-Nov-08 23:42 
GeneralRe: AVI Player Pin
Hamid_RT12-Nov-08 5:49
Hamid_RT12-Nov-08 5:49 
QuestionCRichEditCtrl Problem of displaying text as hyperlink Pin
Dhiraj kumar Saini10-Nov-08 22:40
Dhiraj kumar Saini10-Nov-08 22:40 
I am using CChatRichEd class derived from CRichEditCtrl downloaded from codeproject to show url as hyperlink in my RichEdit control.

Now when I click the url to open the respective url I am facing 3 problems.

1. I neew to click it twice although it should open on a single click.
2. Secondly On clicking the URL link and after the url gets openend if i look at the RichEdit control the cursor is at the position in the url where mouse was clicked and it blinks over as there as a result of which the next text appears at that position where the mouse was clicked.

I want that the the cursor should not be displayed and blink and should move to the next line after the link.

I am using the following code for opening the URL:

BOOL CChatRichEd::OnLink(NMHDR *pNotifyHeader, LRESULT *pResult)
{
	ENLINK	  *pENLink = (ENLINK *) pNotifyHeader;
	CString	  URL ;
	CHARRANGE CharRange ;

	*pResult = 0;

	switch (pNotifyHeader->code)
	{
	case EN_LINK:
		pENLink = (ENLINK *) pNotifyHeader;
	
		switch (pENLink->msg)
		{
		case WM_LBUTTONDOWN:
			GetSel(CharRange);
			SetSel(pENLink->chrg);
			URL = GetSelText();
			SetSel(CharRange);

			{
				CWaitCursor WaitCursor;

				ShellExecute(GetSafeHwnd(), _T("open"), URL, NULL, NULL, SW_SHOWNORMAL);
				*pResult = 1;
			}
			
			break;

		case WM_LBUTTONUP:
			*pResult = 1;
			break ;
		}
		
		break;
	}
	return 0;
} 


Please help me.

Thanks
Dhiraj
QuestionRe: CRichEditCtrl Problem of displaying text as hyperlink Pin
David Crow11-Nov-08 3:17
David Crow11-Nov-08 3:17 
QuestionExecuting Sort.exe using ShellExecute()... etc Pin
Mick Leong10-Nov-08 21:22
Mick Leong10-Nov-08 21:22 
QuestionRe: Executing Sort.exe using ShellExecute()... etc Pin
CPallini10-Nov-08 22:33
mveCPallini10-Nov-08 22:33 
AnswerRe: Executing Sort.exe using ShellExecute()... etc Pin
David Crow11-Nov-08 3:20
David Crow11-Nov-08 3:20 
Questionproblem creating a colored icon Pin
tudorbalan10-Nov-08 21:19
tudorbalan10-Nov-08 21:19 
AnswerRe: problem creating a colored icon [modified] Pin
Mark Salsbery11-Nov-08 6:56
Mark Salsbery11-Nov-08 6:56 
GeneralRe: problem creating a colored icon Pin
tudorbalan11-Nov-08 10:34
tudorbalan11-Nov-08 10:34 
GeneralRe: problem creating a colored icon Pin
Mark Salsbery11-Nov-08 11:28
Mark Salsbery11-Nov-08 11:28 
GeneralRe: problem creating a colored icon Pin
tudorbalan12-Nov-08 0:16
tudorbalan12-Nov-08 0:16 
GeneralRe: problem creating a colored icon Pin
Mark Salsbery12-Nov-08 6:58
Mark Salsbery12-Nov-08 6:58 
GeneralRe: problem creating a colored icon Pin
tudorbalan12-Nov-08 8:52
tudorbalan12-Nov-08 8:52 
GeneralRe: problem creating a colored icon Pin
Mark Salsbery12-Nov-08 8:58
Mark Salsbery12-Nov-08 8:58 
Questionproblem in retriving values from recordset Pin
tasumisra10-Nov-08 20:47
tasumisra10-Nov-08 20:47 
AnswerRe: problem in retriving values from recordset Pin
CPallini10-Nov-08 21:14
mveCPallini10-Nov-08 21:14 
GeneralRe: problem in retriving values from recordset Pin
tasumisra10-Nov-08 21:23
tasumisra10-Nov-08 21:23 
GeneralRe: problem in retriving values from recordset Pin
CPallini10-Nov-08 21:48
mveCPallini10-Nov-08 21:48 
QuestionText Color Change for CRichEditCtrl on a CMdiChildWnd Pin
prithaa10-Nov-08 20:44
prithaa10-Nov-08 20:44 

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.