Click here to Skip to main content
15,895,667 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm developing MFC application that has rich edit control in it. My problem is that, I want to hide text in rich edit control from another process (e.g., StarDict). So, I add a message handler for WM_GETTEXT to my CRichEditCtrl derived class. My handler is
C++
LRESULT MyRichEditCtrl::OnGetText(WPARAM wParam, LPARAM lParam)
{
     CString str = _T("");
     tlstrcpyn((LPWSTR)lParam, str, (INT)wParam);
     return (LRESULT)str.GetLength();
}

But StarDict still can scan text in my rich edit control. I think StarDict might not retrieve text via WM_GETTEXT, it might retrieve via EM_STREAMOUT. Thus, I'd like to know how StarDict Scan function work. Could anybody help me please?
Posted

1 solution

The obvious answer would be to download the program and decompile it, to see for yourself. Fortunately, StarDict is open-source, GPL'd code.

Why don't you just download the source-code and check it out for yourself?
Much easier than implementing your own custom-control that emulates the appearance of a richedit while thwarting the efforts of any program to retrieve the text for itself.

Source-forge has apparently removed the project due to copyright concerns, though it can still be found via code.google

Here's the download page: http://code.google.com/p/stardict-3/downloads/list[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900