|
Please elaborate question what exactly you want?
I think This Link[^] may give you some guideline.
The secret of life is not enjoyment
but education through experience.
- Swami Vivekananda.
|
|
|
|
|
i want to implement text search..it can be of all document or from current page only..up or down the document..like find dialog in standard applications.
|
|
|
|
|
ali kanju wrote: i want to implement text search..it can be of all document or from current page only..up or down the document..like find dialog in standard applications.
You still didn't provide any useful information. You are talking about pages and document, what are you talking about exactly ? How is your data stored ? Is this a big string, a list of strings, ... ?
You also have to separate the problem in two distinct jobs: your program should first search for the matches (without showing that to the user), and then the information has to be displayed to the user.
Both aspects really depends on which datatype you are working with, how you display the information to the user, ...
So, if you want some useful help, you will need to provide a lot more of useful information.
|
|
|
|
|
can you please elaborate your requirement?
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
|
There's a surplus of vagueness here. Unfortunately, all I can offer is the shotgun approach. See strstr() , strchr() , CString::Find() , and string::find() .
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hi all,
i m creating my application with any other name,now i want to change my exe name.
Please tell me how can i change it and after changing the name whenever i build the solution its build with new name not from old name.
please tell me how can i do this.
thanks in advance.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
Hi,
You can change it from project properties.
please see Project Properties -> Linker -> outputfile
Change value for 'outputfile'. You will get desired outputfilename exe.
Hope this will help you.
The secret of life is not enjoyment
but education through experience.
- Swami Vivekananda.
|
|
|
|
|
Thanks.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
Hi,
Can anybody please help me to read a video stream from an IP address assigned to Avtech 4 channel MPEG4 DVR.
The DVR is connected with 4 webcams.
DVR stores video stream in a raw format on connected Hard Disk Drive.
DVR is also connected to a ethernet switch and it throws video streams on assigned IP address on 80 port.
i want to read that video stream from DVR IP address and port 80 using C, C++, or MFC.
Thanks & Regards,
Kunal.
|
|
|
|
|
I am using Edit control to enter text . now at run time I stretch the edit control width and height .
but problem is that font size do not increase with respect to edit control . how can I do that
Trioum
|
|
|
|
|
You have to create a new font with appropriate size and set it.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
You will need to change the font of the edit control.
You could start here - CWnd::SetFont[^]
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Hi Folks:
I've done Google searches, looked for books on Amazon, looked up this topic here at this website and have more questions than answers.
Quite simply, I will have a webcam (Logitech 9000) installed on my Windows 2003 business server platform.
All I want to do is to be able to "receive" the live video stream from my camnera from a client browser over the net. I think I need some client HTML as well as some server code to do this?
Any help appreciated.
Steve
steve morris
|
|
|
|
|
The AMCap program in the DirectX samples of platform SDK is a good starting reference.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
1.return String("abc");
2.String temp("abc");
return temp;
Thanks.
modified on Sunday, June 14, 2009 12:06 PM
|
|
|
|
|
In terms of overall semantics, no difference. With a decent, modern, optimising C++ compiler, they should result in the same object code - the 'named return value optimisation[^]' would make sure of that.
Without that optimisation, there will be extra string constructor and destructor calls.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
There is no difference. Both return the address of a temporary variable on the stack.
Best Wishes,
-David Delaune
|
|
|
|
|
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
|
|
|
|
|
japcrword wrote: The question is how to get hdc in the second call so that it is equivalent to the first one?
Have you checked to see this is compatiable?
CreateDC(_T("DISPLAY"), NULL, NULL, NULL);
CreateDC Function[^]
Best Wishes,
-David Delaune
|
|
|
|
|
Well, I don't think this is what I need. First of all, I don't need to create any new device contexts. And second, as far as I know, the device context created by CreateDC(_T("DISPLAY"),NULL,NULL,NULL) is associated with the whole screen.
My problem is the following. I have an (intercepted) call
CreateCompatibleDC(NULL);
According to MSDN Library it creates a memory DC compatible with the application's current screen.
Application's current screen is the window owned by this application, or am I getting something wrong? I need the handle of that window. I want to find HDC simply in order to find window associated with it (calling WindowFromDC).
|
|
|
|
|
japcrword wrote: I need the handle of that window
Well, this is a completely different question. Unfortunately I am still unable to help you because you are not giving enough details.
japcrword wrote: I have an (intercepted) call
You need to define what you mean here. Have you used an API hook to intercept CreateCompatibleDC?
Best Wishes,
-David Delaune
|
|
|
|
|
Thank you for quick answer. I indeed use API hooks to intercept CreateCompatibleDC. The created by CreateCompatibleDC memory DC is used for drawing some text. I need to know what window this memory DC is applied to in the end.
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 bby 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> ).
I'm beginning to think that it isn't so simple as I initially supposed.
modified on Sunday, June 14, 2009 1:53 PM
|
|
|
|
|
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
|
|
|
|
|
Thank you very much. The links you provided are highly valuable to me (I have had a brief look at them, but I will explore them in more detail). The last question. Do you think it makes sense to intercept BitBlt (or may be some other API) in order to get window that displays intercepted text output by calling WindowFromDC( <destination hdc taken from intercepted BitBlt> )? Thanks.
|
|
|
|