Click here to Skip to main content
15,916,188 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Multiple Inheritance doubt Pin
Mahesh Kulkarni14-Jun-09 20:55
Mahesh Kulkarni14-Jun-09 20:55 
AnswerRe: Multiple Inheritance doubt Pin
Cedric Moonen14-Jun-09 20:58
Cedric Moonen14-Jun-09 20:58 
GeneralRe: Multiple Inheritance doubt Pin
chirag_chauhan14-Jun-09 23:03
chirag_chauhan14-Jun-09 23:03 
Questiontext search Pin
ali kanju14-Jun-09 19:59
ali kanju14-Jun-09 19:59 
AnswerRe: text search Pin
Mahesh Kulkarni14-Jun-09 20:18
Mahesh Kulkarni14-Jun-09 20:18 
GeneralRe: text search Pin
ali kanju14-Jun-09 20:27
ali kanju14-Jun-09 20:27 
GeneralRe: text search Pin
Cedric Moonen14-Jun-09 21:08
Cedric Moonen14-Jun-09 21:08 
AnswerRe: text search Pin
_AnsHUMAN_ 14-Jun-09 20:25
_AnsHUMAN_ 14-Jun-09 20:25 
AnswerRe: text search Pin
«_Superman_»14-Jun-09 21:59
professional«_Superman_»14-Jun-09 21:59 
AnswerRe: text search Pin
David Crow15-Jun-09 2:55
David Crow15-Jun-09 2:55 
QuestionHow can change product original exe name ? Pin
Le@rner14-Jun-09 19:57
Le@rner14-Jun-09 19:57 
AnswerRe: How can change product original exe name ? Pin
Mahesh Kulkarni14-Jun-09 20:14
Mahesh Kulkarni14-Jun-09 20:14 
GeneralRe: How can change product original exe name ? Pin
Le@rner14-Jun-09 20:22
Le@rner14-Jun-09 20:22 
Questionread video stream from IP address assign to Avtech 4 channel MPEG4 DVR using C, C++, MFC Pin
kunal.tawde14-Jun-09 19:49
kunal.tawde14-Jun-09 19:49 
Questionfont problem Pin
trioum14-Jun-09 19:48
trioum14-Jun-09 19:48 
AnswerRe: font problem Pin
CPallini14-Jun-09 21:51
mveCPallini14-Jun-09 21:51 
AnswerRe: font problem Pin
«_Superman_»14-Jun-09 21:52
professional«_Superman_»14-Jun-09 21:52 
QuestionHow do I access live video stream from webcam installed on my server using C++? Pin
smorris1014-Jun-09 7:56
smorris1014-Jun-09 7:56 
AnswerRe: How do I access live video stream from webcam installed on my server using C++? Pin
«_Superman_»14-Jun-09 16:50
professional«_Superman_»14-Jun-09 16:50 
QuestionWhat are the differences between them? Pin
decodeToMe14-Jun-09 5:56
decodeToMe14-Jun-09 5:56 
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 
As far as I understand, a call to CreateCompatibleDC(NULL) is equivalent to a call to CreateCompatibleDC(hdc) for some hdc (hdc is not NULL, of course).

The question is how to get hdc in the second call so that it is equivalent to the first one?

I actually need a handle of the window which is associated with the hdc. I was going to use WindowFromDC(hdc) for that porpose. Is it possible to find hdc and then to find window handle in that way?

The point is that 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. In my case I don't use mouse position, I need to filter some text according to what window it belongs to. I thought it was possible to use DC for that purpose. The idea was to intercept DrawText, TextOut etc, get HDC from their parameter and then by call to WindowFromDC get window handle. The problem is that some application create DC in memory by CreateCompatibleDC(NULL) and do text output to the memory DC. The solution seemed to be in intercepting CreateCompatibleDC(NULL) and getting somehow the real DC by calling some (unknown to me) API-function from the intercepted CreateCompatibleDC, and finally getting window handle from WindowFromDC( <real dc=""> ).

modified on Sunday, June 14, 2009 1:53 PM

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 

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.