|
Use a sequence of:
1. GetCursorPos()
2. WindowFromPoint()
3. GetWindowText()
Bikram Singh
|
|
|
|
|
|
thank you very much...;P
that code is working perfect
|
|
|
|
|
Just few cents of ideas
1. Create a global mouse hook.
2. Keep track of mouse events to trigger your procedure.
3. Send double click message to the window where specific mouse trigger occured.
4. This will highlight a text, if there is.
5. Send message to capture the selected text to clipboard.
6. Let your main aplication get the text from the clipboard and process it.
|
|
|
|
|
thank you...
I will try..
|
|
|
|
|
hello,
my goal is to identify a machine on a unique way, so how can i got the id of motherborad or cpu...
thank you
|
|
|
|
|
i want to know how can i access the sound card directly and send data to be displayed on the speaker online.
this data is digital zeroes and ones not formated in a specifiec format
ex( not a wave file)
abdu
|
|
|
|
|
You can not access hardare resource from your application. You should write device driver for this purpose.
I offer you to use DirectSound.
|
|
|
|
|
does any one know a good toturial that learn how to use the direct sound
also does the direct sound can send runtime data to the speaker or it must be saved on the herd disk first?
|
|
|
|
|
Hi all,
How can we query xml data between two dates by using XPath.
For example:
I have an XML file like this
"<Employees>
<Employee>
<Name>xxxx</Name>
<DateOfJoin>'2000-04-12T10:12:30'</DateOfJoin>
</Employee>
<Employee>
<Name>yyyy</Name>
<DateOfJoin>'2001-04-12T10:12:30'</DateOfJoin>
</Employee>
<Employee>
<Name>zzzz</Name>
<DateOfJoin>'2002-04-12T10:12:30'</DateOfJoin>
</Employee>
<Employee>
<Name>aaaa</Name>
<DateOfJoin>'2003-04-12T10:12:30'</DateOfJoin>
</Employee>
<Employee>
<Name>bbbb</Name>
<DateOfJoin>'2004-04-12T10:12:30'</DateOfJoin>
</Employee>
</Employees>"
Now I want employee names between 2002 and 2003.
Thanks inadvance.
|
|
|
|
|
hi iam using the code below in my project! but when i Exit the program the Debuger goes to dbgheap.h and says Access Violation error, and if i remove this line of code : GetString(username, password, string); this error will not occure and the program will exit succesfully!
i have also Free the Library by calling FreeLibrary(hLib);
Any Suggestion how to get rid of this ?
Thanx in advance
typedef bool (WINAPI * cfunc)(const char * username,const char * Password, char * result_6);
HINSTANCE hLib=LoadLibrary("crypt_string.dll");
cfunc GetString;
GetString=(cfunc)GetProcAddress(hLib, "Get_String");
CString username = "Myuser" , password= "Mypass" , string = "";
GetString(username, password, string);
bool lo=FreeLibrary(hLib);
|
|
|
|
|
Seems like the problem is in GetYahooString(). Where's the source for that?
Bikram Singh
|
|
|
|
|
Sorry there is no GetYahooString , it is GetString !
|
|
|
|
|
Ehsan-de-Burge wrote:
Any Suggestion how to get rid of this ?
Yes, don't pass a CString to a function expecting char*.
The GetString() prototype suggests that it expects a char* for the result, i am assuming it expects the buffer to exist and does not alloc one itself.
You have initialized 'string' to "" which is at least 1 byte in size.
When you pass 'string' to GetString() it downcasts to the buffer CString is using and passes that to GetString().
If GetString() expects the buffer to exist then you haven't made it big enough, if it alloc's one ... well then what you are doing is wrong in more ways than one.
...cmk
Save the whales - collect the whole set
|
|
|
|
|
Hi guys,
I'm handling CBN_SELCHANGE message of a CComboBox object in my app. The calling function is said to be OnCbnSelchangeMycombo(). The message has been intercepted successfully whenever an item is selected. The problem I have is that if the combo box style is set as CBS_DROPDOWN, I am not able to correctly get the text of the selected item, the resulted string is an empty string. If the stype is CBS_DROPDOWNLIST, the return text is correct.
I tried to get the text using both GetWindowText() and UpdateData() , they return the same thing. Also, I notice the return string will be correct if I select an item using arrow keys. The string is only empty when I select the item by mouse click.
Does anybody know why?
Thanks alot.
|
|
|
|
|
You should use the CBS_SELENDOK message. While CB_SELCHANGE does what you want, you get this while a mouse is selecting a item from the list, so you may get multiple selectons before an actual item is selected by the user.
If you vote me down, my score will only get lower
|
|
|
|
|
Thanks Roger,
I tried to handle CBS_SELENDOK message and the return string is still an empty string. The handler function looks like below:
void CMyDlg::OnCbnSelendokMycombo()
{
UpdateData(TRUE);
CString szMyCombo;
m_MyCombo.GetWindowText(szMyCombo);
if (v_szMyCombo.IsEmpty())
return;
}
</code>
both szMyCombo and v_szMyCombo return empty strings. v_szMyCombo is the CString value variable for the combo box. Again, if I change the combo box style to "Drop List", the return string is correct.
Any other ideas?
|
|
|
|
|
Hi!!! I would like to ask you all, if you know how to Save an Image coming from the ClipBoard to a .jpg File... thanks alot!!!
|
|
|
|
|
try to serach fo cximage library in codeproject.that will solve your problem
-----------------------------
"I Think It will Work"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
thanks for the info... but, i only wanted to retrieve the image from the ClipBoard and Save it in a .jpg File...
|
|
|
|
|
|
The image data on clipboard must be uncompressed DIB format. First try to save image in *.bmp format. Then use ICImageCompress API to compress .bmp to .jpeg
|
|
|
|
|
Hi!
I am newbie to programming in VC and really need some urgent help with executing command lines using VC.
i have a commandline encoder called encoder.exe . From MS-DOS prompt, I can execute the encoder by the following command line:
encoder hello.wav
where hello.wav is an input file to the encoder.exe and is found in the same directory as encoder. 2 files, hello.ogg and hello.phn will be generated by the encoder.
my problem is now how to execute the command line in VC? real sorry for this seemingly simply qn. i m a poor web searcher and after surfing the net for 1 whole day, i can hardly understand how i can even get started.
|
|
|
|
|
I am not sure this is what you are asking but if it is... go into the Project/Settings and set the Debug/Program Arguments to:
hello.wav
Then start the debugger.
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
i guess it will work like this..
system("encoder hello.wav");
|
|
|
|