|
Hi to All?
Could Any one help me? How to get word capture from another GUI application using hooks concept in VC++?
Thanks & Regards,
Ramana AV.
|
|
|
|
|
What do you mean by word capture?
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
It seems that whenever I distribute an application, it never works on my first beta testers computer, even though they are running the same O/S (Windows XP), with the latest DirectX (April 2007).
Anyone else run into this problem? What do you do to solve it?
Patrick
|
|
|
|
|
maybe MFC dll's are not instaled on his computer?
rrrado
|
|
|
|
|
|
Stick^ wrote: it never works
Can you provide some detail?
/ravi
|
|
|
|
|
I will try, but not likely to be helpful to you.
I make add-on aircraft and avionics gauges for MS Flight Simulator.
The "gauges" are made with an SDK supplied by MS, and compile into .dll's. However, they are not tru .dll's from what I understand. In any case, the "gauges" (multiple in one file) appear fine in my aircraft on MSFS, and he just gets a blank panel.
I made a version in which I turned off the protection code to see if perhaps the call to get verify the license key is maybe the issue as he is on XP Pro, and someone else suggested that I compile with "multi-threaded" vs. multithreaded dll as some new runtimes in an update from MS on the game has new runtimes in it. So, I will try that and see what happens too.
I am just ready to pull out my hair. But, this is my own fault for not actually going to school for this and learning the proper way, haha.
My problem is I barely understand what I'm doing sometimes. C++ is no problem, but Windows is way over my head. =)
Patrick
|
|
|
|
|
Can you more explain and some detail of your program?
|
|
|
|
|
Hi,
Yes, but I think the problem may be solved now.
http://i91.photobucket.com/albums/k282/Benchmark_Avionics/Properties.png[^]
Someone informed me that a recent change in the game program included some libraries that require now that we statically link the program. So, I have recompiled and will not test this in the morning.
Thanks guys for your ideas. I'll let you know if this was the problem for everyone's future reference.
As I am using MS DirectInput and DirectSound in this project, I was worred it had to do with DirectX, but seems it has to do with the recent game update.
|
|
|
|
|
Glad you found the answer.
|
|
|
|
|
Sorry for my poor English.
Is it the issue of debug version and release version ?
|
|
|
|
|
No, we tested that, but it may be solved now. (See above).
|
|
|
|
|
Hi,
How to restrict the number of objects created for a class??
Thanks
Today is a gift, that's why it is called the present.
|
|
|
|
|
It is hard to know with such a general description - do you have more details?
Basically I guess you have to count them, you could have a static int member of the class, initialised to zero, that you increment in all constructors, and when you reach a limit you do something like throwing an exception.
Peter
"Until the invention of the computer, the machine gun was the device that enabled humans to make the most mistakes in the smallest amount of time."
|
|
|
|
|
cp9876 wrote: you do something like throwing an exception.
Only if there is no other solution which would almost never be the case.
led mike
|
|
|
|
|
That's why I like code project - I learn things! Putting this sort of functionality in some sort of factory is a much better idea.
Peter
"Until the invention of the computer, the machine gun was the device that enabled humans to make the most mistakes in the smallest amount of time."
|
|
|
|
|
Do some research on reference counting and factory patterns
led mike
|
|
|
|
|
narayanagvs wrote: How to restrict the number of objects created for a class??
- Make the constructor private.
- Add a static factory method (eg:
CreateInstance() ) to the class. The method should count the number of instances served up and use this value to control the behavior of the CreateInstance() method.
- In the object's destructor, decrement the instance count (held as a static member).
/ravi
|
|
|
|
|
THis issue is addressed by the singleton design pattern (yes, despite of the name, the singleton can also allow more than one instance of the related object). You can find a complete reference of the signleton in the following book: Design Patterns: Elements of Reusable Object-Oriented Software [^].
BTW you can also find some singleton related stuff on google.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
hi.
I have a MDI program done in CFormView which have a scrollbar control. when I minimize the child window and use the scrollbar of the child window, the scrollbar control in the CFormView follows the scrollbar of the child window.
How can I the make the scrollbar control independent of the scrollbar of the child window?
Thank you.
|
|
|
|
|
Hi,
are you setting the parent of the second control bar to the child window?
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
|
|
|
|
|
hi.
control bar refers to toolbars, status bars, dialog bars and rebars?
Im don't use any of them. I only have menu.
|
|
|
|
|
Hello,
Can someone please tell me how to convert from CString to const* char?
I used the following from msdn website:
<br />
const size_t newsize = 100;<br />
char nstring[newsize];<br />
strcpy_s(nstring, orig);<br />
strcat_s(nstring, " (char *)");<br />
cout << nstring << endl;
But it requires that I compile with clr. When I do that, my classx.cpp (all my class function) are considered errors.
When I don't modify the property of my solution to clr, I still get two errors:
fatal error C1190: managed targeted code requires a '/clr' option
Is there any other way to convert without using clr?
Thank you.
--Star
|
|
|
|
|
This is not clr code, I can't imagine how it gives you this error.
The CString class has a GetBuffer method that returns a char *. Not sure if it is char or TCHAR, but so long as you're not building Unicode, they are the same.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi,
Why dont you use the "strcpy" and "strcat" respectivily instead of using "strcpy_s" and "strcat_s". Since the later 2 functions have more securuty enchancements you problem could be related with that.
Manoj
Never Give up
|
|
|
|