|
Then i would suggest
EnumWindows
then on each window
EnumChildWindows
Then on each one GetWindowText
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
The reply thinks really thankfully.
We will try once in the method to inform.
Is the julsu makes probably an example file and there?
A num sense of honor is same being the request not to exist.
^^;
thinks
|
|
|
|
|
i understood till inform
but nothing after that
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
There's no API I'm aware of that does this job.
One difficult solution would be to use OCR.
modified 12-Sep-18 21:01pm.
|
|
|
|
|
We have the facility already at a dictionary program which I use.
This program is same the mode of OCR not being.
Does API bet really that we do not exist?
|
|
|
|
|
If the window under the mouse is an edit or richedit window you can use EM_CHARFROMPOS.
For all other windows you will have to do a 'screen scrape' or use custom code to do the appropriate HITTEST testing.
...cmk
Save the whales - collect the whole set
|
|
|
|
|
I have a Message-Window that goes with the System-Tray.
Upon a click on the tray-icon a menu is popped.
According to MSDN, I should call:
<br />
SetForegroundWindow();<br />
<br />
TrackPopupMenu();<br />
<br />
PostMessage(WM_NULL);<br />
so that the menu doesn't stay there until a selection is made on it.
In response to a certain menu-selection I show a dialog. This dialog is Modal and has no parent.
When I call SetForegroundWindow() the dialog will not show, if I don't call SetForegroundWindow() the dialog will show.
My window (the one receiving the message from the tray and performing the abovementioned logic) is a pure message-window (child of HWND_MESSAGE).
Can someone explain the situation ?
|
|
|
|
|
I've been using some memory leak detection software to solve my ever growing memory usage problem. The following has turned up, can someone help me understand why my first function call results in a leak, but the second doesn't. Or is this a bogus memory leak detection?
The function is
void Foo(BSTR sInput1, BSTR sInput2)
{
// do nothing with the inputs
}
This call results in a leak...
Foo((bstr_t)_T("Blah"), (bstr_t)_T("Blah"));
but this is OK...
Foo((BSTR)_T("Blah"), (BSTR)_T("Blah"));
If this will solve all my problems I am happy to use the second calling method, but I'm a bit sceptical... Any comments?
PS: I use Unicode and acsii builds
|
|
|
|
|
I think it's bogus.
What does it say if you explicitly contruct bstr_t's iso casting?
Foo( bstr_t(_T("Blah")), bstr_t(_T("Blah")));
if it still complains, what does it say about
{<br />
bstr_t a(_T("Blah")), b(_T("Blah"));<br />
Foo(a, b);<br />
}
This small snippet that mimics BSTR and bstr_t should convince you that there shouldnt be any leaks if bstr_t is implemented as the dox say.
#include < iostream >
using namespace std;
struct a
{
a(){
cout << "a()" << endl;
s_=0; }
a(const char*s){
cout << "a(const char*i)" << endl;
s_ =(char*) malloc(strlen(s)+1);
strcpy(s_, s); }
const a& operator= (const a& rhs){
cout << "operator =" << endl;
return *this; }
~a(){
cout << "~a()" << endl;
free(s_); }
operator char* () {return s_;}
private:
char* s_;
};
typedef char MYCHAR;
typedef MYCHAR* MYCHARPTR;
void func (MYCHARPTR n, MYCHARPTR m)
{
cout << n << " " << m << endl;
}
int main( void )
{
func( (MYCHARPTR)"Test cast", (MYCHARPTR)"from const char* to BSTR");
func( (a)"Test cast", (a)"from const char* to BSTR wrapper class");
func( a("Test constructing"), a("from const char* to BSTR wrapper class"));
return 0;
}
---
"Man will never be free until the last king is strangled with the entrails of the last priest". -- Denis Diderot
|
|
|
|
|
why RTC Sample can't sharing application, and sharing white board when login Live Communication Server.
somebody can help me?
Thanks
Nho'c Ti`
|
|
|
|
|
How can i send send or recv data to USB port
any sample
thanx
|
|
|
|
|
You don't send data to the port really, you send it to a device attached to the port via the device driver.
The tigress is here
|
|
|
|
|
'USB Complete' book by Jan Axelson, ISBN# 0-9650819-5-8.
http://computer.howstuffworks.com/usb.htm
http://www.lvr.com/usb.htm
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Hi,
Can anyone help me to get few website links for "Telnet architecture"
what all neeed to explain in this case..Pls help.
thnks in advance
Ram
|
|
|
|
|
A google search gave me a lot of links:
Try looking at the Telnet RFC Specification[^]
And other Telnet RFC's[^]
"It was when I found out I could make mistakes that I knew I was on to something."
-Ornette Coleman
"Philosophy is a study that lets us be unhappy more intelligently."
-Anon.
|
|
|
|
|
Hello All!
I Have video card with S-video output, when I try show my video player on TV in fullscreen (only) mode, I see only black square.
Please, anybody know how can I correct that problem?
Please send me letter to:
manowar@softdepia.com or
Alex_ManOwaR@newmail.ru
With best regards,
Alex ManOwaR
P.S.
Sorry for my english.
|
|
|
|
|
Hi.
I have added my program as service in Windows 2000. When i minimise the program, it is added in the tray-bar. This works great in Windows 2000. Even when i end the 'Explorer.exe' process i handle the "TaskbarCreated" message and add the icon again in the tray bar.
This does not work for Windows NT though. When explorer.exe is ended, the icon isn't added again in the tray bar. What could be the reason of this OS-depending problem?
<just edited="">
I have ran Spy.exe on the program.. when minimised and process 'Explorer.exe' killed and restarted, it does get a 'TaskbarCreated' message from a Windows 2000 computer. I have done the same on a Windows NT computer and it doesn't get the 'TaskbarCreated' message at all !!
<\Just edited>
Any questions about the problem, don't hesistate to ask them.
Thanks for the help.
Greetings,
Jens
|
|
|
|
|
To quote from MSDN:
With Microsoft® Internet Explorer 4.0 and later, the Shell notifies applications that the taskbar has been created...
I would bet that your NT machine has IE 3.x installed.
Iain.
|
|
|
|
|
Not correct. Internet Explorer 6.0 installed.
I have seen that a specific version of the system file 'shell32.dll' is needed (>= version '4.70') and i don't seem to be able to update that file to such version. I have version 4.0 of shell32.dll which in my opinion is a part of the shell and doesn't notify application when taskbar has been created.
Greetings,
Jens
|
|
|
|
|
I have developed a MFC program (MFC Dialog) which uses the USB port for getting joystick data using the Joystick messages.
Now would it be possible to use this code in a DLL, i.e. define DLL functions to hide/show the Dialog and obtain the Joystick data.
I used the Dialog to display what Joystick buttons was pressed and display the x, y and z data of the Joystick together with any errors (e.g. Joystick not detected) which was useful.
What I think I want is to have access to Joystick data via a DLL interface but have the DLL act like a MFC program when required.
What I dont want is to have to include this dialog into any applications that require Joystick data.
I have used the Joystick messages JOY1BUTTONUP, JOY1MOVE etc in the dialog.
What are the pitfalls?
|
|
|
|
|
This makes no since! You wrote a program (dialog based) that interpits joystick messages.
sweep123 wrote:
What I dont want is to have to include this dialog into any applications that require Joystick data.
Well, do not include it; the dialog application was a test! Now you can write the real application knowing that you do receive the messages and can act accordingly.
INTP
|
|
|
|
|
What I was trying to obtain, is it possible to wrap up this dialog based MFC application into a DLL so that any other programs that require Joystick input could use this DLL.
Now if any applications have problems during debugging you could call upon the facilities of the Joystick DLL to aid testing. i.e. display the dialog and view the Joystick data and status info.
Also would it be possible for a Console based application to use this DLL (which contains a dialog and message maps etc).
Yes I could use the code by inserting it into each project, but just wanted to re-use in the simplest way possible the code already generated.
Does that make more sence?
|
|
|
|
|
Ok! Break the code down! One message per function (like MFC does)! You need to seperate the code that displays the messages from the code that interprets the messages.
If you want to give (your DLL) the ability to show the last message received, then you will have to provided some storage space (i.e. variables) to hold the last message received.
The dialogbox is irrelivant, the information is what matters. Seperate the information functions (totaly) from the interface. Then the information can be retrieved, regardless of what interface is used to display it.
INTP
|
|
|
|
|
I think my real question is can I just build my MFC application as a DLL where I export several functions that provide Joystick data/status. Yes seperate the code that displays from the code that manages the data.
But when I load this DLL, will the dialog be displayed? I was thinking of having a hide/show function exported via the DLL.
What confuses me is that fact that as I dont want to use DirectX for Joystick control, just want to use the Joystick messages, but does that mean I need to have a dialog etc to run this scheme?
Or can I still use the Joystick messages in the DLL without creating an MFC type program with dialogs etc.
|
|
|
|
|
The dialog should be just another function that you call. In order for it to display the infomation it has to call the same functions that an external program would have to call. If the data source is seperated from the code that displays the data, then anybody can access the data. For example document->view; the document is the data the view is the display. You could have one view show the data as a line graph and another as a bar graph, they all are getting the data from the same source.
As to whether you can bypass DirectX for Joystick control messages, I do not know. I suspect you cann't.
sweep123 wrote:
But when I load this DLL, will the dialog be displayed?
No!
sweep123 wrote:
can I still use the Joystick messages in the DLL without creating an MFC type program with dialogs etc.
Yes!
MFC is just a frame work provided by Microsoft. It is not the key to writing Windows programs, the key is the Windows SDK which was written in C. MFC just make it easier to write programs for Windows. Try to write your code as MFC independent as possible, use MFC mainly for the interface.
INTP
|
|
|
|