|
But How Can I get the class and Caption programmatically Trioum
|
|
|
|
|
For each iterated window
you could use the GetClassName(..) and GetWindowText(..) functions virtual void BeHappy() = 0;
|
|
|
|
|
Have you tried EnumWindows() ?"One man's wage rise is another man's price increase." - Harold Wilson
"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
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
loop for FindWindowEx, there is very good example of same in MSDN! "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hi all,
i have a DLL that is created by VB,
now i want to use this in my VC++ dialog based mfc application.
please tell me how can i do this.
thanks in advance.
|
|
|
|
|
|
Le@rner wrote: i have a DLL that is created by VB,
now i want to use this in my VC++ dialog based mfc application.
if the DLL is created in VB6, then it must be exposing COM Classes, which can be easily included and programmed in VC++.
use #import compiler directive to import the dll in your program, Wizard it self generates classes based on exposed classes by VB com dll. "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
first verify your dll is COM component or simple DLL. You can verify by dependency viewer.
|
|
|
|
|
Hi all,
I am working on visual studio 2008 (VC++). i am making a dialog based application.
My problem is i have a vb dll and its lib file...
how can i use its function in my program...
Can anybody please help me in this.
thanks in advance
|
|
|
|
|
If you are working VC++ Native code then you need regular dll.
otherwise you can not load DLL in VC++ which was make another program like
|
|
|
|
|
download Dependency Walker tool and use it to determine what dll's your app is looking for.
|
|
|
|
|
Hi im trying to return char with the function but it gives error, anhy help
struct random_class {
char *crypto_buf;
void __thiscall classfunction (void *pParam);
};
random_class* pParam;
void (__thiscall* classfunction)(void *pParam );
void __thiscall myclassfunction(void *pParam )
{
classfunction(pParam->crypto_buf);
}
error C2227: left of '->crypto_buf' must point to class/struct/union/generic type
1> type is 'void *'
|
|
|
|
|
nah1337 wrote: void __thiscall myclassfunction(void *pParam )
Why did you make pParam a pointer to a void ?txtspeak is the realm of 9 year old children, not developers. Christian Graus
|
|
|
|
|
Why do you need to use explicitely __thiscall ?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]
|
|
|
|
|
because the function that i dissasembled does have void * pointer and it is also __thiscall
Here is how the dissasembled func looks like:
void *__thiscall sub_402355(void *this)
{
void *v1;
signed int v2;
void *v3;
v3 = this;
*(_BYTE *)this = 0;
v2 = 0;
v1 = this;
do
{
sub_401462(*((_BYTE *)v3 + v2++ + 188), v1);
v1 = (char *)v1 + 2;
}
while ( v2 < 16 );
return v3;
}
|
|
|
|
|
What are you doing? Do you intend to reproduce the function behaviour in C ?
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]
|
|
|
|
|
No i want to hook the function and return the crypto char in the class.
|
|
|
|
|
Take a look at your manuals, you cannot access anything from a void* , you must cast it so that it points to some type, otherwise the compiler does not know how to access the data.txtspeak is the realm of 9 year old children, not developers. Christian Graus
|
|
|
|
|
nah1337 wrote: classfunction(pParam->crypto_buf);
Have you tried:
classfunction(((random_class *) pParam)->crypto_buf); "One man's wage rise is another man's price increase." - Harold Wilson
"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
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
wow now i can compile it thnx for your help, i hadnt tryed it and this shows my knowledge of c++ is still weak much to learn.
|
|
|
|
|
How to check if flash Active x is already installed in my xp and win7 machine?
I want c/cpp/mfc code to check it.
Is it possible to check it in non-admin account ?
Thanks,
Rahul
|
|
|
|
|
In MFC application . right click of dialog insert activex Control then all list of activex control will show.
|
|
|
|
|
I want to check it through some code
If it is not there then I will register it.
|
|
|
|
|
Hi I give some code it return all list of installed Active X control. You can put condition what u want to check ActiveX control.
CoInitialize (NULL);
ICatInformation *pCatInfo=NULL;
HRESULT hr=CoCreateInstance (CLSID_StdComponentCategoriesMgr ,
NULL,
CLSCTX_INPROC_SERVER,
IID_ICatInformation ,
(void **)&pCatInfo);
pCatInfo->AddRef ();
IEnumGUID *pEnumGUID=NULL;
CATID pcatidImpl[1];
CATID pcatidReqd[1];
pcatidImpl[0]=CATID_Control;
pCatInfo->EnumClassesOfCategories (1,
pcatidImpl,
0,
pcatidReqd ,
&pEnumGUID);
CLSID clsid;
while( (hr= pEnumGUID->Next( 1, &clsid, NULL ))==S_OK )
{
BSTR bstrClassName;
OleRegGetUserType (clsid,USERCLASSTYPE_FULL,&bstrClassName);
CString strControlName(bstrClassName);
m_list1.AddString (strControlName);
}
pCatInfo->Release ();
CoUninitialize ();
|
|
|
|
|
Thanks That will help me in future work.
|
|
|
|