Rich edit control and having a hypertext control to send the messages to windows

Hi

Here is the code to detect that if a click is made on word "START". But
I have many "START" word  Is there any way to detect which "START" word
has been clicked?

Please Let me know if any
Thanks
Anup


void CRichEditGSDlg::OnLinkRicheditStatic(NMHDR* pNMHDR, LRESULT*
pResult)
{
ENLINK *pLink = reinterpret_cast<ENLINK *>(pNMHDR);
  FINDTEXTEX findText;
  *pResult = 0;
  if( pLink->msg == WM_LBUTTONDOWN )
    { long lStart = pLink->chrg.cpMin;
	  long lEnde  = pLink->chrg.cpMin;
      m_Ctrl_RichEditStatic.SetSel(pLink->chrg);
	  CString strLink = m_Ctrl_RichEditStatic.GetSelText();
	  if( 0 == strLink.CompareNoCase(_T("START")) )
	    {
          GetTopLevelParent()->Sendmessage(WM_START_CHAT_WITH,0,0);
//START with the person below whom the start link is clicked.
          } 
	 
	  m_Ctrl_RichEdit.SetFocus();
	}	
}

0
1/23/2007 9:10:06 AM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies
515 Views

Similar Articles

[PageSpeed] 53

On 23 Jan 2007 01:10:06 -0800, "Matrixinline" <anup.kataria@gmail.com>
wrote:

>Hi
>
>Here is the code to detect that if a click is made on word "START". But
>I have many "START" word  Is there any way to detect which "START" word
>has been clicked?
>
>Please Let me know if any
>Thanks
>Anup
>
>
>void CRichEditGSDlg::OnLinkRicheditStatic(NMHDR* pNMHDR, LRESULT*
>pResult)
>{
>ENLINK *pLink = reinterpret_cast<ENLINK *>(pNMHDR);
>  FINDTEXTEX findText;
>  *pResult = 0;
>  if( pLink->msg == WM_LBUTTONDOWN )
>    { long lStart = pLink->chrg.cpMin;
>	  long lEnde  = pLink->chrg.cpMin;
>      m_Ctrl_RichEditStatic.SetSel(pLink->chrg);
>	  CString strLink = m_Ctrl_RichEditStatic.GetSelText();
>	  if( 0 == strLink.CompareNoCase(_T("START")) )
>	    {
>          GetTopLevelParent()->Sendmessage(WM_START_CHAT_WITH,0,0);
>//START with the person below whom the start link is clicked.
>          } 
>	 
>	  m_Ctrl_RichEdit.SetFocus();
>	}	
>}

The only distinguishing data you have is the character range of the
CFE_LINK text. Since one link doesn't overlap another, you could maintain a
(sorted) std::vector of starting positions and find the one clicked on by
using std::lower_bound.

-- 
Doug Harrison
Visual C++ MVP
0
dsh (2498)
1/23/2007 4:51:24 PM
Reply:

Similar Artilces:

retrieving attachments from multiple email messages in one attempt from MS-Outlook 2007
If I have emails from Person 1, Person 2....Person 110 and each email has an attachment is there a way in Outlook 2007 to get download all the attachments from Person 1...Person 110 in one attempt in one folder instead of manually going to each email message and downloading them individually. g wrote: > If I have emails from Person 1, Person 2....Person 110 and each email > has an attachment is there a way in Outlook 2007 to get download all the > attachments from Person 1...Person 110 in one attempt in one folder > instead of manually going to each email message and down...

sending mail in Outlook #3
I am new to this program and am having a hard time figuring out how to send email from one account to the other. I just finished doing it with my ISP email account to a hotmail account and the hotmail account doesn't show it, just the ISP account shows it was sent. What is the problem? Also I keep getting a message sometime that Outlook is not connected to the server when I try to send/receive mail. I see that the Hotmail accounts are synchronizing? What does this mean? Maybe I haven't set up everything correctly, I don't know. Please help, I am very upset right now. Outloo...

Print Error: Windows cannot print due to a problem with the curren
Situation: Windows Vista SP1 [ya, I know], Office 2007 Home & Student SP2 - both fully patched except SP2 for Vista. Samsung ML-2510 monochrome laser printer. Outside of Office, printer functions fine. Can do a test print, print from another application, etc. Have deleted the printer from Vista and it re-installed fine. Have the latest driver as per manufacturer. When trying to print from any Office application [OK tried Word & Excel, but I'll assume all], I get the error message "Windows cannot print due to a problem with the current printer setup". S...

macro problem. Upgraded to Excel 2002, now getting error message
Hello, this is my first time posting so please go easy on me. I am running a macro that pulls data from several files an interpolates information; the process takes about 20-25 mins. upgraded to excel 2002 and now the when I run a large input file i runs about 2/3 of the way then gives me the standard error messag saying the program needs to shut down. If i cut the file up in smalle parts the program will run through, but it's a pain stitching th output back together. I have never had this problem before when I wa running Excel 2000. Is there a setting I have to change? -Thanks :conf...

Tracking e-mail messages
I'm a little confused. (always... but today more than normal ... I think) I have setup a mail account. Done the rule delployment wizard. Noticed that messages are being sent as a copy to the CRM mailbox. When I create a message and ask it to be tracked in CRM.. the activity history etc shows the e-mail message correctly. Now I would have thought that any reply to that message would be automatically tracked on it's return to the generating mail box? A copy is created in the CRM mailbox but unless the reply is checked as "Track in CRM" it does nothing with it.. Are my...

Losing Message Body when sending email with attachment
OK, this is really strange, in my 7 yrs of being an exchange admin, i've never seen this. One of my users (and only 1!), when sending an email with an attachment SOMETIMES loses her message body. You cannot see the message body in the email sitting in the sent items and the recipient doesn't see the message body text either. I've tried upgrading her outlook client to outlook 2003 and that seemed to fix it for a while but the problem is happening again :( Has anyone seen this or have any ideas what else I could try? thanks Chris What format is she sending the mail in? ( Rich...

Emailing as message #2
Hi, I have been facing this problem with publisher lately (more so with the new office version i guess). When I try sending my publisher file as a message email, the alignment is almost never correct. Please suggest what to do. It's urgent. Send the info as a .pdf attachment. -- JoAnn Paules MVP Microsoft [Publisher] Tech Editor for "Microsoft Publisher 2007 For Dummies" "Publisher, email as message" <Publisher, email as message@discussions.microsoft.com> wrote in message news:30CC3CD3-23D1-4E17-86F9-726C29CAEC73@microsoft.com... > Hi, I have been...

Send birthday emails with workflow
We want to send our customers/leads a birthday email. It seems not to be possible to set up an workflow to do that. Does anyone have a idea how to do that?? Any help is appreciate. Frank Reissmann http://www.welcome-students.com Hello Frank, Well, I certainly would like to know how to do this as well ! It seems to me the whole thing can be set up with a workflow process, but the only thing that is missing is the actual verification of the date. As far as I can see as a novice, there is no way of comparing the birthday date with "today". Is this correct or am I wrong and s...

Where is budget ID setup window
When attempting to create a dedicated PO for a Back Ordered item. (The PO is created and saved. When you go into Purchase Order Entry Window and attempt to view/ re-save the document, it gives me the message. "There is no budget ID setup for this fiscal period. Please assign a budget ID using the PO Enhancements Setup Window." We don't need to budget for this item and we haven't set up any budgeting for GP. We don't manfacture it and we are basically a resaler of the item. We just need it to go into inventory, fullfill the order, and go back out through COGS. I'...

Do I need Exchange Server to send and receive invitations?
I sent an invitation from my office Outlook 2000 to my home pc with Outlook 2003 and the invitation/meeting did not go into my home Outlook. 1 - Are the versions compatible? 2 - Any idea why it's not going into my home PC? Thanks "pkerr" <pkerr@discussions.microsoft.com> wrote in message news:5CB2F5E7-A53C-42C2-8268-BCE1959FFCA2@microsoft.com... >I sent an invitation from my office Outlook 2000 to my home pc with Outlook > 2003 and the invitation/meeting did not go into my home Outlook. > > 1 - Are the versions compatible? > 2 - Any ide...

Help Windows Vista Home Basic
For nearly 2 months now my computer has been trying to do a Windows Update of the 5 security up dates for MS software packages. Security Update for MS Office 2007 (KB951550) Security Update for 2007 MS Office System (KB951944) The 2007 MS Office Suite Service Pack 2 (SP2) Update for MS Office Outlook 2007 Junk Email Filter (KB2202131) Update for 2007 MS Office System (KB967642) I have tried updating them individually, tried letting down the firewall, tried turning off my McAfee Virus Scan and the firewall and updating, it won't work. It says error 646, it downloads then...

Access 2007 Special Effect Text Box Won't show Sunken with Window XP
Hi All I am just getting to grips with Access 2007 and one of the quirks I have found is that when I design using Windows in XP Windows-Classic colors and set the text boxes on forms' special effect property to "sunken" They appear as sunken in the correct manner. However, when I change to the Windows XP color scheme the forms text boxes appear flat even though the special effect property has not changed. Any ideas or is it a new quirk we have to live with. I haven't tried it with Vista yet. That should be interesting Thanks Bob "bobdydd" <reallyuseful2004...

Display Control Characters in Excel 2007
Hi, This is a little esoteric but I would like to import and edit text files that contain control characters such as <TAB> and <LF> in Excel 2007. I have always been able to do this in Excel 97 and, at work I can do it in Excel 2007 Enterprise running on XP Pro. I recently installed Office Enterprise 2007 at home on XP Home and Windows 7 Home Premium from downloads under the Home Use Program. I can't view or edit control characters in Excel. They are there and I can process them using string functions but I can't see them and, if I try to edit cells that ...

HDI send e-mail to many without them see who else i have sent it too
How Do I send e-mail to many people with the same attachment and message, but without everyone else seeing who else I have sent it to I usually use "Bcc:" Blind Carbon Copy. However, when the recipients get their messages the recipient will see the following: From: (your email address) To: (undisclosed recipients@ or empty) They will never know to whom the emails were sent to, nor how many. Hope this helps! This posting is provided "AS IS" with no warranties, and confers no rights. "andrew" <a_espinasse@hotmail.com> wrote in message news:06dd01c3d...

Derived control
Hello. I'm designing a form to be used for both editing existing records and adding new ones. A textbox will contain a string derived from three other (bound & in same table) controls. (It will be a catalog id; I don't want to construct it on the fly. I want it in the table.) After a new record is entered, I don't want the string to be altered by subsequent edits of the fields from which it is derived. Is there a preferred way to do this? My current plan is to trigger the string construction in a routine called from each of the (progenitor) control afteru...

OUTLOOK 2003 "Signature for new messages"
I have one (default) signature assigned in Outlook. Periodically (maybe once every couple of weeks or so) the "Signature for new messages" value gets reset to "<none>". I must go back in and change the value back to "Default". Has anyone else experienced this problem? Thanks. ...

Outlook 2003 Errors sending emails
I am getting error message when sending emails. This happans since I have installed the new outlook 2003. I am getting the following error message: The following recipient(s) could not be reached: 'pdegeus@mns.com' on 22-Dec-03 9:44 PM 553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1) Any idea what this is Maybe check spelling MSN instead of MNS? "pdegeus@msn.com" <anonymous@discussions.microsoft.com> wrote in message news:<056901c3c8ff$d83455b0$a101280a@phx.gbl>... > I am getting error message when sending emai...

Compacted messages now gone
I apologize if this has been asked before, but I wasn't sure where t turn. I was prompted to compact my e-mail folders and save waste space (which I have done before), but this time, it seems to hav gotten rid of all of my e-mails in my mail folders. Is there any wa to get to those messages again or are they gone (stored) forever -- auntof ----------------------------------------------------------------------- auntof3's Profile: http://www.officehelp.in/member.php?userid=552 View this thread: http://www.officehelp.in/showthread.php?t=130652 Posted from - http://www.officehelp.i ...

error message after install office 2008 mac
After install is complete get this message " There is a problem with the office data base. Office might not be able to access the database or data base file might be damaged.....To rebuild the data base open MS Office 2008/office and then open MS database utility. For more info open the data base utility application and on help menu click database utility help". MY PROBLEMS ARE I do not know where or how to find MS OFFICE?OFFICE or MS DATABASE UTILITY etc. And after you tell me WHERE to find them, what do I do next? THANK YOU July 8 4:40 PM EST ...

how to delet all messages in exch2k3
in exch2k I can delete all messages in queues now how can I delete all message in the queue in exchange server 2003. thanks for your help. To delete several messages that are next to each other, click the first message, hold down SHIFT and click the last message, right-click one of the selected messages, and then click either "Delete (no NDR)" or "Delete (with NDR)". To delete several messages that are not next to each other, click the first message, hold down CTRL and click additional messages, right-click one of the selected messages, and then click either "D...

multiple images in list control
Hi, I need to insert individual images for individual columns in a list control. How to go about this ? Thank you. ...

send button #9
I can't find a send button. I have tried the add accounts, put the imap and smtp (aol) still nothing. It can't even be found in the tools sections -- xps the account is not fully configured. The send button will not appear until it is configured. "joe" wrote: > I can't find a send button. I have tried the add accounts, put the imap and > smtp (aol) still nothing. It can't even be found in the tools sections > -- > xps ...

How does Outlook determine if a POP3 message is downloaded or not?
Hi, I use Outlook2007 with POP3 and I use the option "Leave a copy of message on the server." Why outlook? Calendaring support. No other tool comes close (or I am not aware) Why POP3? mail server is not exchange Why "Leave a copy of message on Server"? 1. Server's backed up, 2. Can read mails while on the move However, there's one problem. When I move machines and open the PST on the new machine, outlook fetches the entire inbox creating a duplicate of the message within the PST. My problem is not this behaviour because I understand that Outlook does not have the ...

Find differences between Excel worksheets / Version Control/ Excel Diff software
DiffEngineX is a utility that finds the differences between the formulae and constants contained in either two whole Excel workbooks or selected worksheets. It generates a cell-by-cell difference report in a new workbook and color highlights different cells in automatically made copies of your workbooks. As Excel spreadsheets get modified over time new rows and columns can be inserted between existing ones. DiffEngineX can align both similar rows and columns in the sheets being compared. It has many powerful features such as the ability to hide matching rows, group like changes to adjacent ce...

non editable record
how can I make a record non editable if it is "older" than last Thursday -- Message posted via http://www.accessmonster.com Given that someone with a way to fiddle in the tables can change anything, any time, to be absolutely certain, you'd need to either use Access security or have your data in a more secure back-end (e.g., SQL Server). If you're asking how to prevent changes to a record displayed in a form if that record is older than (?!5 days ago; ?! Thursday, March 11; ???), you can do that. We need a bit more specific description to offer more spe...