The general solution to this is non-trivial (do a google on "screen readers" for more info). The reason is that the 3 major browsers all have different object models, so getting text from a browser window, or form, is quite difficult. Getting text from a "standard" windows app is not that difficult, but then you also have to consider .Net apps, whose on-screen elements are not based on standard HWNDs.
So for standard apps:
1. find the window, using something like WindowFromPoint()
2. determine type of window, using GetClassName()
3. use (2) and GetWindowText() to try to get the selected text
In an SDI APP i am using a modeless dlg. I am creating the dlg in view class.
In view class im using a LinkList .
Now the Problem is i need to access the LinkList from the dlg . while Accessing the LinkList fn(append, del,...) I got an run time access violation
and then the application terminates.
How to resolve this problem.
any body knows...
Try passing a pointer of your application to the dialog.
In the dialog you can create a pointer of your parent class and access the variables/member functions of the parent class with the help of that pointer.
You can do this:
in the dialog declare a pointer of view in the header file
Now when you are creating the dialog
CMydialog* pMyDlg=new CMyDialog();
pMyDlg->DoModal(); // Or in whatever manner you are creating the dialog.
In the dialog you can then access the member variables of the view like
pView->myLinkedList.///////Somecode or function here
Somethings seem HARD to do, until we know how to do them. _AnShUmAn_
The concept is called tokenization[^]. Take a look at the strtok function. It is easy to write one, at least to cope with the simple case described here.
The idea is search the source string for the first occurance of the separator. Your first part is the substring from the start until the character before the first separator. The "new start position" is now the character after the separator. Repeat the search from the new start position for the next separator.
My signature is not black, just a very, very dark blue
But I hve some questions to be answered about this project. Those are
1) What are the steps involved in Registry Cleaning ?
2) What all can be cleaned ?
3) What all should not be done ?
4) How do we clean a particular Key ?
5) What are the different operations involved ?
6) Do we have the technology to implement all the operations ?
7) Can we automate all the operation if you have a database of
things to be cleaned?
8) Where do we get the list of database of things to be cleaned ?
Please Help me.
Thanks in Advance
George K Jolly <firstname.lastname@example.org>
I have a small problem in VC++.i want to get the index value for the tree item of a tree control.i have used the class CTreeCtrl class but i couldn't find any method which returns the index value.
so quickly help me with a solution
A tree control item doesn't have an index, since the tree doesn't represent a simple linear list. Each item in the tree has a handle. Using that handle, there are methods provided by the CTreeCtrl that you can use to change the item itself, get the child items, and so on.
This is not really a problem, just wondering if anybody else has encountered the same problem and how they deal with it. I use VC6 to code multilingual programs (English and Chinese simplified). I usually use the built in resource editor to create the dialogs/menus along with their text.
Here is where I usually encouter problems. The editor allows for the input of Chinese characters, though after compilation the exe incorrectly displays them. My way of rectifying the problem is to open the *.rc file in a text editor (UltraEdit) convert to unicode and save (though now VC6 reports it as being damaged), build clean, and no problem.
Is there a simpler way of doing this? Maybe I should also point out that I create a MBCS build and that the final build must be win98 compatible.
Open the .rc file as text, and in all your dialog resources, do this:
Change DIALOG to DIALOGEX
Change the FONT to "MS Shell Dlg"
Add the DS_SHELLFONT style
The VC6 resource editor predates these features, so you will have to re-do them after editing a dialog in the editor. Usually only the DIALOGEX part will be undone, so a simple search and replace of "DIALOG " with "DIALOGEX " (note trailing spaces) will fix it right up.