Click here to Skip to main content
15,894,343 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: What are the differences between them? Pin
Stuart Dootson14-Jun-09 6:22
professionalStuart Dootson14-Jun-09 6:22 
AnswerRe: What are the differences between them? Pin
Randor 14-Jun-09 6:32
professional Randor 14-Jun-09 6:32 
QuestionCreateCompatibleDC(NULL) == CreateCompatibleDC(hdc) for some hdc? [modified] Pin
japcrword14-Jun-09 5:12
japcrword14-Jun-09 5:12 
QuestionRe: CreateCompatibleDC(NULL) == CreateCompatibleDC(hdc) for some hdc? Pin
Randor 14-Jun-09 5:44
professional Randor 14-Jun-09 5:44 
AnswerRe: CreateCompatibleDC(NULL) == CreateCompatibleDC(hdc) for some hdc? Pin
japcrword14-Jun-09 6:24
japcrword14-Jun-09 6:24 
GeneralRe: CreateCompatibleDC(NULL) == CreateCompatibleDC(hdc) for some hdc? Pin
Randor 14-Jun-09 6:39
professional Randor 14-Jun-09 6:39 
GeneralRe: CreateCompatibleDC(NULL) == CreateCompatibleDC(hdc) for some hdc? [modified] Pin
japcrword14-Jun-09 7:12
japcrword14-Jun-09 7:12 
GeneralRe: CreateCompatibleDC(NULL) == CreateCompatibleDC(hdc) for some hdc? Pin
Randor 14-Jun-09 8:03
professional Randor 14-Jun-09 8:03 
Sounds like an interesting project indeed.

japcrword wrote:
Some dictionaries like stardict use the technique of API hooking to translate text. They can translate a word when a mouse hovers over the text.


Ahhh now we can get somewhere. I would be willing to bet that those software packages are using the Text Object Model[^] to retrieve the text under the mouse and translate it. You could probably then create a tooltip near the mouse location containing a translation.

Using The Text Object Model[^]

How to retrieve text under the cursor (mouse pointer)[^]

Regarding your original question... if you still want to pursue that... let me know. It may require the use of some undocumented Windows internels. Since your API hook is probably executing in the same thread as the window we could narrow down the possibilities with EnumThreadWindows Function[^] and at that point we may be able to use the undocumented GdiQueryTable. There may be an easier way to accomplish it, I will need to think about it.

At any rate I think you should spend a few minutes investigating the Text Object Model.

Best Wishes,
-David Delaune
GeneralRe: CreateCompatibleDC(NULL) == CreateCompatibleDC(hdc) for some hdc? Pin
japcrword14-Jun-09 8:55
japcrword14-Jun-09 8:55 
GeneralRe: CreateCompatibleDC(NULL) == CreateCompatibleDC(hdc) for some hdc? Pin
Randor 14-Jun-09 9:34
professional Randor 14-Jun-09 9:34 
QuestionPlease solve my problem its very urgent Pin
santhosh-padamatinti14-Jun-09 1:23
santhosh-padamatinti14-Jun-09 1:23 
AnswerThe best way to make urgent question answered Pin
CPallini14-Jun-09 21:54
mveCPallini14-Jun-09 21:54 
QuestionRe: Please solve my problem its very urgent Pin
David Crow15-Jun-09 3:02
David Crow15-Jun-09 3:02 
AnswerRe: Please solve my problem its very urgent Pin
Randor 15-Jun-09 6:33
professional Randor 15-Jun-09 6:33 
Questionchar* as return type in dll Pin
_808613-Jun-09 23:05
_808613-Jun-09 23:05 
AnswerRe: char* as return type in dll Pin
Stuart Dootson14-Jun-09 2:26
professionalStuart Dootson14-Jun-09 2:26 
GeneralRe: char* as return type in dll Pin
_808614-Jun-09 4:13
_808614-Jun-09 4:13 
GeneralRe: char* as return type in dll Pin
_808614-Jun-09 4:21
_808614-Jun-09 4:21 
GeneralRe: char* as return type in dll Pin
0x3c014-Jun-09 6:44
0x3c014-Jun-09 6:44 
QuestionWhere does VC9 store its run time type info? Pin
followait13-Jun-09 16:55
followait13-Jun-09 16:55 
AnswerRe: Where does VC9 store its run time type info? Pin
harold aptroot13-Jun-09 22:44
harold aptroot13-Jun-09 22:44 
AnswerRe: Where does VC9 store its run time type info? Pin
Stuart Dootson14-Jun-09 2:26
professionalStuart Dootson14-Jun-09 2:26 
QuestionPassing CDialog results to CFormView ?? Pin
Vaclav_13-Jun-09 15:45
Vaclav_13-Jun-09 15:45 
AnswerRe: Passing CDialog results to CFormView ?? Pin
Stuart Dootson14-Jun-09 2:21
professionalStuart Dootson14-Jun-09 2:21 
AnswerRe: Passing CDialog results to CFormView ?? Pin
krmed14-Jun-09 4:23
krmed14-Jun-09 4:23 

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.