|
VuNic wrote:
hmm... thanks thanks.. so this works different from the GetWindowText??
Would you like to read that your Self in the MSDN or you like to explaination by Me!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Nope, I'm in the middle of some process here, so I just put the question further there , If it worries you, leave it. I'll look about it in MSDN later. No problem!
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[V]--
[My Current Status]
|
|
|
|
|
VuNic wrote: I'm in the middle of some process here,
Process HUMM...................
VuNic wrote: so I just put the question further there
Then let me Explain, i am kiddin... By Design GetWindowText only Bring Caption of Window , remember by design. but GetWindowText use WM_GETTEXT internally!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
VuNic wrote: I'm in the middle of some process here, so I just put the question further there ,
Humm Process
VuNic wrote: o I just put the question further there
Actually By Design GetWindowText Brings the Caption of the Remote Window, remember by Design.though interally it make call to the WM_GETTEXT!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
VuNic wrote:
I'm in the middle of some process here, so I just put the question further there ,
Humm Process
VuNic wrote:
o I just put the question further there
Actually By Design GetWindowText Brings the Caption of the Remote Window, remember by Design.though interally it make call to the WM_GETTEXT!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Re
|
|
|
|
|
Yup Alok, that's what I knew, it would internally use GETTEXT, but why does this get supressed when its called by GetWindowText? I tried to take the text off a notepad, but I failed there. Actually I got the handle of notepad's client window from spy ++ and tried GetWindowText, but didn't work. so you mean, here sending GETTEXT would work??
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[V]--
[My Current Status]
|
|
|
|
|
VuNic wrote: but didn't work. so you mean, here sending GETTEXT would work??
By Design GwtWindowText bring the Caption of Window
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Re
|
|
|
|
|
Do the following
1. if u dont have the window(messsagebox) get it using FindWindow or some other API
2. GetNextWindow (pass GW_CHILD) as the flag to find the window.
I donno in which order the windows has placed in teh message box. so iterate till end.
3. Use GetWindowText by passing the find result.
this is applicable if the message box is created using normal MessageBox API.
SaRath
|
|
|
|
|
SaRath C wrote: 1. if u dont have the window(messsagebox) get it using FindWindow or some other API
Sorry if Sound Rude, how will determine that is messagebox window as it Normal Dialog Box!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Javagal Srinath wrote: want to retreive all the arguments send to Message box. The Message box is owned by a different application.
Hook MessageBox api !
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
I feel it is very difficult to solve this problem. But I believe there is a solution for all problems. So here is a spark:
We can manually copy the entire text and caption form a message box using Ctrl+C (am not sure, will it work for all the message boxes).
Check the link :
http://secretgeek.net/msgbox_copy.asp
http://weblogs.asp.net/chuckop/archive/2004/04/08/110153.aspx
So my idea is:
What about simulating the Ctrl + C and take the text from clipboard?
It is only a spark
|
|
|
|
|
Anybody please send me a code of How to concatenate 2 .wav files with different frequencies in c++ or qt 3.3.2 please please
malya
-- modified at 5:29 Monday 29th May, 2006
|
|
|
|
|
I don't know if it is possible to save a wave file with different frequency (Fc), so I think that there is only a solution: convert the files to have got a single Fc.
To do this choose the highest Fc, and create more samples in the other file using an interpolator (ex. linear interpolation).
Then you can append the files.
Do not choose the lower Fc to do this, because the file with the highest Fc it is not simple to be undersampled: see aliasing problem!
hope that helps
Cheers,
Russell
|
|
|
|
|
hi again
I saw in some code such thing :
(it was a mathematical formula parser)
try
{
...
}
catch(CException1 pError)
{
...
}
catch(CException2 pError)
{
...
}
catch(CException3 pError)
{
...
}catch(CException4 pError)
{
...
}
catch(CException5 pError)
{
...
}
catch(CException6 pError)
{
...
}
I have question : Is not it uncomfortable to write so many catches ? when all theses exceptions are some what related, could not we unite them under some CMainException class and catch only one exception ?
this code is from this article :
http://www.codeproject.com/cpp/VisualCalc.asp
From the Using the Code section
But the article is verry coool
-- modified at 4:15 Monday 29th May, 2006
|
|
|
|
|
Catch(...)
and then
GetLastError()
|
|
|
|
|
GetLastError will not help u in all cases.
it applicable if only if the library set the relevant errors
u may have to design ur own class if the exception is not provded by windows or the library u are using. if it is a generic one, then the code will be very less.
there are centralized and decentralized error handling strategy. select one which suits for u. if u r trying to reduce code, go for centralized one. but the common routine or class will be bulky because of this
SaRath
|
|
|
|
|
Aljechin wrote: GetLastError()
you can't get any error code or string using GetLastError if the Exception throwed is Custom!, GetLastError is Window specific api!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
In general catch(...) is bad form. There are exceptions such as when you do a catch all, perform some clean up and then re-throw, for example. A general rule of thumb with exception handling is that you should only catch what you expect to be thrown; a catch all violates this principle.
Steve
|
|
|
|
|
VisualCalc provides its own exception classes, so you will never get any accurate error message.
moreover, be careful of the case sensitivity of the language. Catch is not a valid keyword
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
big_denny_200 wrote: this code is from this article :
http://www.codeproject.com/cpp/VisualCalc.asp
It would be better if you ask the author of article directly, by posting your query at bottom of article only! anyways you can make a Base class CMainException <span style="color: Black;">and derived rest of class (i.e. CException1 ...) from them! and you can catch the any Exception in Base class Object</span>
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
ThatsAlok wrote: you can make a Base class CMainException and derived rest of class from them
like CVCalcParserException base class for example ?
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
toxcct wrote: ike CVCalcParserException base class for example ?
Thats why i asked him to post your problem in respective article Forum!,
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
It is better to catch exceptions by reference rather then by value as is in your sample code. i.e.
try
{
..
}
catch(const CException1 & Error)
{
...
}
First it's more efficient as no copying occurs. More importantly it avoids slicing and thus allows you to make a catch class with virtual functions. This is one way to avoid catching so many different exceptions types: instead you catch a base class with virtual functions by reference and make use of polymorphism.
Steve
|
|
|
|
|
Stephen Hewitt wrote: It is better to catch exceptions by reference rather then by value as is in your sample code
VisualCalc actually catches its exceptions by reference. the OP typed it wrong.
Stephen Hewitt wrote: it [...] allows you to make a catch class with virtual functions
exactly what it does...
Stephen Hewitt wrote: This is one way to avoid catching so many different exceptions types
it is also. actually, VisualCalc Parser provides a base class for all its exception classes, but i still catch each exception category one by one to provide a visual feedback to the calculator user... like this, he finally know if he did a syntax, mathematic of whatever kind of error in his expression...
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
hi denny,
why didn't you ask this at the bottom of the VisualCalc[^] article ? i would have asked immediately...
for your question, note that i don't catch the exceptions like you do (by copy : catch(CException1 pError) ) but by reference (catch(CException1& pError) ) which is trully different for the memory management.
about the many catch blocs, there's no problem with that. you can have as many catch as you like without altering the performances...
you can however reduce the number of catches (design matter) as i provide a base class for all the Parser exceptions (CVCAlcParserException class), but by doing this, you wouldn't be able to tell the user if he gets a syntax, a mathematic, or whatever kind of error...
that's all i think.
if you have any other questions, don't hesitate to ask on the article's message board
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|