|
Show some code. I suspect you need to use the CombineRgn function with RGN_OR set in fnCombineMode to make a combined region and then select that into the DC.
Steve
|
|
|
|
|
I agree with Steve I think you need to CombineRgn
|
|
|
|
|
I'd like to use AVICap to capture and record video from webcam
but I also wish to have control over contrast, brightness ...
I can call capDlgVideoSource and change it, but is there any possibility
to save these options and recall it. Something like save few most use options and recall it just by pressing some button.
Thank you
viliam
|
|
|
|
|
That dialog is provided by the VCAP driver so there's no (that I know of) common API to get the
settings.
Many/most drivers save the settings between use and many provide a "factory Default"
button/setting.
Mark
|
|
|
|
|
Hello,
I was just wondering if it is possible to add some extra options to an existing commercial software?
If the answer is YES, then what are the steps needs to be taken and what it the route for achieving this task?
Thank you for you time and have a great day.
Khoramdin
-- modified at 15:08 Wednesday 31st January, 2007
|
|
|
|
|
|
Hello Christian,
Thanx for the info. Your reply to my question was "sometimes". Maybe I ask what is the factor which create the uncertainty?
Do we know in advance what 3rd party application can be hook or we just have to try and see?
Thanx for helpping out and have a great day.
Khoramdin
|
|
|
|
|
Basically, a program with no plug in architecture, you can try to hack your way in. There's no guarentee of success, or stability in the end result. I wouldn't ever bother to try, although the article is cool.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Hello Christian,
Let me see if I understand this fully. It is possible to use hooking in order to get into 3rd party software applications but the result 100% happy ending.
I have also realized that there are TWO approaches for hooking:
1-API's hooking
2-kernel hooking
Will I be correct to say either hooking is not 100% guaranteed?
I have also noticed sometimes when I use API hooking to get into the window properties of software application; I can successfully play with the window’s properties. But I am unable to access the individual buttons which are placed in the window.
Would you be able to tell me why that is?
By the way, I am not trying to be heard-aheaded o9n this subject. I am just trying to undrestand how far I can do with this hooking business.
Thanx again for all these information
Khoramdin
|
|
|
|
|
To add the Christian's reply, the application may have been designed with extension in mind. For example, it may have a documented plug-in architecture.
Steve
|
|
|
|
|
Hello Steve,
Thank you for the info. As you mentioned in your reply it is almost a stright-forward bussiness if the application have been developed with the intension to have extra option and future improvement In past, I have done programming to create DLL files and mainly added the extra personal options to a software application.
My question was targeting rather the software application which were not designed for such. Let's say I buy a DVD Player Software (WinDVD), surly they are not designed with the intension to add extra buttons with different functionality. The question is, would it be possible to get into these software applications and add the extra personalized option?
Thank you for taking the time and helping out.
Khoramdin
|
|
|
|
|
In that case Christian's reply is best. It depends. While anything is possible more specific information would be needed before one could comment on the techniques required and the difficulty of the task.
Steve
|
|
|
|
|
Hello Steve,
I guess you and Christine are right about the hooking and its uncertainties. I guess I have learnt a lot form you guys and I better bring this hooking discussion to the end.
Do you know of any step by step tutorial sort of stuff for hooking?
Thanx so much for taking the time and share with me your knowledge.
Khoramdin
|
|
|
|
|
Hi All,
Is there any function in (standard) c++ that convert integer value to std:string object?
Such as,
...
int n = 123;
string str_n = itos(n);
...
or some efficient way?
Thanks!
Yonggoo
|
|
|
|
|
I would use
str_n.Format ("%d", n)
|
|
|
|
|
lucy wrote: I would use
str_n.Format ("%d", n)
CString needed, not string
|
|
|
|
|
lucy wrote: str_n.Format ("%d", n)
I think that std::string has not such Format method. Maybe you're writing about CString , Aren't you?
By the way, I think the OP can use a stringstream object, for instance:
std::stringstream ss;
std::string s;
ss << 5;
ss >> s;
But I don't know how efficient this way is.
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.
|
|
|
|
|
I think you use of CString
|
|
|
|
|
|
How can a 2-digit exponential notation be generated in a printf?
The following code:
sprintf(str, "%.10e ", value);
is producing different results for one of my users:
6.385698e-01
or
6.3856980000e-001
????
I'm thinking it's some kind of system difference, like Regional Settings or possibly different run-time libraries, although we distribute the MFC libs with our app. This user is in Japan.
I use VC++ 6.0 and everytime I run the program on my machine I get the 3-digit-exponential-notation (6.3856980000e-001).
|
|
|
|
|
Hi,
I'm maintaining an MFC ISAPI dll, and need to:- access the HINSTANCE of the dll to be able to:
- get the full path of the dll through GetModuleFileName, to be able to:
- register the dll to be able to add Event Log messages.
I've tried accessing theApp.m_hInstance, but it's NULL. I've also tried calling AfxGetInstanceHandle( ), which also returns NULL. I've tried adding the AFX_MANAGE_STATE( AfxGetStaticModuleState( ) ) to the top of the function which tries to locate the HINSTANCE, but to no avail. Since this is an MFC ISAPI extension, I don't have access to the DllMain function, otherwise I would probably just store it in a global variable...
Any ideas?
Regards,
Daníel
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|
|
Does GetModuleHandle() help?
|
|
|
|
|
N.B. You can pass a NULL to get information on the current module - this is how code in an EXE can get the location of the EXE. I do not know if you call that from within the DLL if you will get the path of the DLL or the hosting EXE, but it might work...
Can you store the HINSTANCE passed to DllMain(...) ? If not, you may be able to use GetModuleHandle(...) to get the DLL's instance (HINSTANCE and HMODULE for a DLL are basically the same and can be interchanged in most cases).
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
James R. Twine wrote: N.B. You can pass a NULL to get information on the current module - this is how code in an EXE can get the location of the EXE. I do not know if you call that from within the DLL if you will get the path of the DLL or the hosting EXE, but it might work...
If GetModuleHandle(NULL) is called from a DLL the HMODULE of the hosting EXE is returned.
Steve
|
|
|
|
|
Well, that answers my question about not knowing which would be returned...
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|