![]() ![]() |
Mar 7 2008, 06:45 PM
Post
#1
|
|
|
Newbie ![]() Group: Members Posts: 1 Joined: 7-March 08 Member No.: 10560 |
Hi there. I'm trying to make an app to retrieve (at first) information from the current media playing in ZP - I'm using ZP 5.01 standard for test purposes.
I've found that your example in VB is not straightforward to work in C++ - example, using Spy++ and some trial and error I managed to find that the only window handle that works is returned by FindWindow(_T("TMainForm"), "Zoom Player"). And I found that because ZP asked me if I wanted to allow other applications to communicate, luckily that option was disabled! Altough I think I can register the window in my DLL with ZP, I don't know if I'm doing anything wrong in the other SendMessage's using the windows handle retrieved by the FindWindow method above. I'm using this but it returns nothing in the WPARAM or LPARAM: ATOM zpReturnInfo=NULL; UINT zpMsgInfo=0; bool successZP; (SendMessage(zpWndHandle, 1000, (WPARAM)&zpMsgInfo, (LPARAM)&zpReturnInfo)==S_OK) ? successZP=true : successZP=false; If i take off the & operator it gives the same results. Are there any C++/C examples I can use? |
|
|
|
Aug 14 2008, 04:08 AM
Post
#2
|
|
|
Newbie ![]() Group: Members Posts: 1 Joined: 14-August 08 Member No.: 11277 |
Reason being, probably you are calling FindWindow and SendMessage from within a method of a CWnd derived class. Note that CWnd class also has methods with the same name. So, you need to tell the compiler which one to use, the methods or the Win32 API.
-------------------- one zoom player press
|
|
|
|
Oct 21 2009, 03:18 PM
Post
#3
|
|
![]() Newbie ![]() Group: Members Posts: 4 Joined: 1-October 09 From: United States Member No.: 13124 |
Its possible that list views use edit controls internally. I should also mention that if the edit is in a list view then there is no guarantee that your program will continue to work in the future since list views are not guaranteed to use edits internally. I would highly recommend sending messages to the list view rather than the edit within the list view for this reason.
Having said that and working on the assumption that announce is the HWND of the edit that you want to write to, what is the return value of SendMessage? |
|
|
|
![]() ![]() |
| Lo-Fi Version | Time is now: 21st November 2009 - 01:46 AM |