|
I don't need a code obfuscator: I'm writing a template library wrapping COM.
--The ATL's author, former Klingon developer.
I don't need to learn it, I just need to use it.
--The VB6 developer
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
You mean, I can add ATL templates, macros and an ATL IDispatch implementation, eveen if my project is not an ATL Project? Would be good enough for me.
Regards, Joerg
|
|
|
|
|
I suppose (note: suppose) it would be simpler transforming you project in a ATL one.
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
A message in Italian in the .NET Framework forum; can you help with it?
|
|
|
|
|
There's something wrong in the post: it looks like a direct request to another Italian woman (i.e an e-mail (un)intentionally posted on the forum). The same poster was able to write a request in good English here http://www.codeproject.com/Messages/3272888/Re-Problem.aspx[^].
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi every one,
I develpoing a MFC application which uses a Win32 dll. This Win32 dll contains a DIALOG Box resource. I wanted to show this dialog by calling an exported function from this dll. But when calling this dialog through
DialogboxParam API it returns with error 1812( RESOURCE NOT FOUND). I am solved this problem in MFC by calling AFX_MANAGE_STATE(AfxGetStaticModuleState( )). How to do this in Win32 way.
thanks
Nitheesh
Jose Jo Martin
http://www.simpletools.co.in
|
|
|
|
|
For pure Win32...
The DialogBox function has a first parameter of
hInstance , which is the HINSTANCE of the DLL where you get the resource from.
If you loaded the DLL using LoadLibrary, then you already have that parameter. If not, then when the DllMain function of the DLL is called at load time, then the HINSTANCE is passed then. Just remember it!
(ie, in a extern variable that all the CPP files in the DLL have access to.
That's how I did it in the old days!
Iain.
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need contract work done, give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
Hi Iain,
I am loading the dll using LoadLibrary from a MFC application. And i am using a global HINSTANCE value from DllMain.But still this cause problem. Is this cause the resource handle of the dll be changed?
thanks
Nitheesh
Jose Jo Martin
http://www.simpletools.co.in
|
|
|
|
|
Erm, your first email said you were succeeding with MFC.
I told you how to do things in pure Win32.
Now you say you still have problems.
These facts do not fit each other.
Please expand on what you are doing, so I can help better,
Iain.
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need contract work done, give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
Hi,
Try passing AfxGetResourceHandle[^] as the first parameter to the DialogBoxParam Function[^].
P.S.
Your signature says your name is: Jose Jo Martin and your username says your name is Nitheesh George. Are you suffering from an identity crisis?
Best Wishes,
-Randor (King of Eternia) and (David Delaune)
|
|
|
|
|
Hi:
I have started working with the library VTK and I want to use Windows Forms as GUI. I supposed that I have to create an OpenGL view on a Windows Form, and then connect in some way with VTK classes.
HOW I can do that? I'm trying to represent an VTK object in a Windows Forms. Anyone have any simple example?
I'm new in that and any kind of help would be welcome.
Regards,
María
|
|
|
|
|
Hi
I need to collect information about applications that running on the computer while my application's working. Information like the size of the form, how many buttons are on the application's form etc.
I'm using c++, how can I do that? Whee is this information been saved?
Can I have an access to it?
Thanks a lot
Itay
|
|
|
|
|
You can use the EnumWindows()[^] function and then go through all the children for each top level window you find.
|
|
|
|
|
thanks for the quick answer.
how can I find top level window? what kind of information can I get with this function?
|
|
|
|
|
itay10 wrote: how can I find top level window?
By calling EnumWindows() .
itay10 wrote: what kind of information can I get with this function?
Did you reads the docs?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
yes, i didn't rely understood how it works.
thanks any way, I'll look for tutorials.
|
|
|
|
|
itay10 wrote: i didn't rely understood how it works.
I agree that some of these functions are not very easy, but that is a fact of programming life. In essence the EnumWindows() call will provide you with some details of each top level Window that is currently open. This information is provided to your callback function, and you need to capture what you need in that function for possible use later in your program. Once you have the top level windows you can call EnumChildWindows() for each one, and that will give you all the views, buttons etc. It is up to you to decide what information you need from all these calls and what you are trying to do with it. If you Google either of these function names you should be able to find any samples or tutorials on the subject.
|
|
|
|
|
thanks a lot. I'm rely appreciate your help.
now it's more understandable.
|
|
|
|
|
itay10 wrote: thanks a lot. I'm rely appreciate your help.
Happy to help, good luck in your endeavours.
|
|
|
|
|
Hello sir !!
#include "stdafx.h"
#include "iostream"
void MyFunc(int argc,char**argv);
void MyFunc(int argc,char** argv)
{
std::cout<<argv[1] << "\n" <<argv[2] <<std::endl;
}
int main(int argc, char** argv)
{
argv = (char**) malloc(3*sizeof(char));
argv[1] = (char*)malloc(sizeof(char)*20);
argv[1] = "Hello ";
argv[2] = (char*)malloc(sizeof(char)*20);
argv[2] = "Cpp!";
MyFunc(argc,argv);
return 0;
}
This is one generate one exe
i have problem with how to generate dll of this exe and how to test that dlls ..please replay me !!
i have faced lots of problem this command line arguments ..please respond me !!
Thanks!
Raju !!!
|
|
|
|
|
raju_Code wrote: have problem with how to generate dll of this exe and how to test that dlls ..please replay me !!
I think you would be better spending some time learning the basics of C++ before worrying about dll. The code you posted suggests you misunderstand the following:
- the function of the argc and argv parameters on the
main() function - the use of
malloc() and pointers in general
|
|
|
|
|
Thanks for your replay sir..
yes i agree with your points ....i have little bit confusion generating dll's from command line arguments ...i try most of the ways ..but i cant do anything ..sir ...
Raju !!!
|
|
|
|
|
Actually, I think you have a lot of confusion. As I said before, you need to spend more time learning the basics of the language before you worry about creating DLLs. Do you fully understand the difference between DLL (and LIB) and EXE?
|
|
|
|
|
Well, I think you're starting with a basic misunderstanding of what a DLL is.
Ask yourself why you're creating a DLL?
And read up about them. This is a decent place to start:
Regular DLL Tutor For Beginners[^]
and
http://www.codeproject.com/KB/DLL/[^]
Good luck,
Iain.
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need contract work done, give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
raju_Code wrote: i have problem with how to generate dll of this exe
Visual Studio 's Application Wizard can create the DLL skeleton for you: Just choose Win32 Application and then (in the newli appeared window) Application Settings , finally choose DLL .
raju_Code wrote: and how to test that dll
Build an application that consumes it.
raju_Code wrote: i have faced lots of problem this command line arguments
What problems?
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|