|
namy31 wrote: I want ask u all a very basic question ie. how to call an already created dll in ur code.
They are dll's or a 'kind of dll' ? If these files are not dll, then you cannot use them as if they were dll. It is either black or white, not 'a kind of'. You have to be sure of that before going any further.
namy31 wrote: I want ask u all a very basic question ie. how to call an already created dll in ur code.
That's not a basic question. Playing with dll is kind of tricky if you don't have a lot of experience (and 1 month programing in C++ is very very small). There are a bunch of articles here[^] that you can have a look at. Just to have a litle bit more knowledge about what is a dll.
A question now: what do you have exactly ? A dll file, but is there a .lib file and header file supplied with it ?
Or you just have the dll alone ? In that case you will need to know exactly the names of the function names and their prototypes (that is, the number and the types of the arguments of your function)
|
|
|
|
|
See Here[^] and Here[^] maybe it is some helpful to you
|
|
|
|
|
I m the beginer in the world of VC++. I m like a 1 month old baby in this world of VC++.
I want ask u all a very basic question ie. how to call an already created dll in ur code.
I m actually developing an interface between AutoCad n SAP.
AutoCad provides runtime extensions called ARX.
Object-ARX is an API and they r a kind of dll's which r to be used to programm ur Autocad Appllication.
So to start with this project of mine I very first need to understand how to use dll's in ur code.
Plssssssssss somebody on forum who knows the answer reply me
waiting for a reply
namy
|
|
|
|
|
|
IMHO ,
#include "stdafx.h" at the top would fix the problem
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Is it possible to write your error?
|
|
|
|
|
Please read my next message
SnaidiS(Semion)
|
|
|
|
|
I tried another registry class (because I found it easier to use) but I have another problem there:
I'm writing this:
<br />
CRegistry Reg();<br />
CString string = "Software\\MyApp\\key";<br />
Reg.SetRootKey(HKEY_LOCAL_MACHINE);<br />
Reg.SetKey(string,TRUE);<br />
and it gives me the error:
error C2228: left of '.SetKey' must have class/struct/union type
article:
http://www.codeproject.com/system/registry.asp[^]
What is the problem?
-- modified at 9:28 Thursday 27th July, 2006
|
|
|
|
|
What problem with this code
<br />
CRegistry Reg;<br />
CString string2 = "Software\\MyApp\\key";<br />
Reg.SetRootKey(HKEY_LOCAL_MACHINE);<br />
Reg.SetKey(string2,TRUE);<br />
<br />
|
|
|
|
|
If I remove the ( ) it gives me a lot of errors:
MyReg error LNK2019: unresolved external symbol "public: __thiscall CRegistry::~CRegistry(void)" (??1CRegistry@@QAE@XZ) referenced in function "protected: virtual int __thiscall CMyRegDlg::OnInitDialog(void)" (?OnInitDialog@CMyRegDlg@@MAEHXZ)
MyReg error LNK2019: unresolved external symbol "public: __thiscall CRegistry::CRegistry(void)" (??0CRegistry@@QAE@XZ) referenced in function "protected: virtual int __thiscall CMyRegDlg::OnInitDialog(void)" (?OnInitDialog@CMyRegDlg@@MAEHXZ)
MyReg error LNK2019: unresolved external symbol "public: int __thiscall CRegistry::SetKey(class ATL::CStringT<char,class strtraitmfc_dll<char,class="" atl::chtraitscrt<char=""> > >,int)" (?SetKey@CRegistry@@QAEHV?$CStringT@DV?$StrTraitMFC_DLL@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@H@Z) referenced in function "protected: virtual int __thiscall CMyRegDlg::OnInitDialog(void)" (?OnInitDialog@CMyRegDlg@@MAEHXZ)
MyReg error LNK2019: unresolved external symbol "public: int __thiscall CRegistry::SetRootKey(struct HKEY__ *)" (?SetRootKey@CRegistry@@QAEHPAUHKEY__@@@Z) referenced in function "protected: virtual int __thiscall CMyRegDlg::OnInitDialog(void)" (?OnInitDialog@CMyRegDlg@@MAEHXZ)
MyReg fatal error LNK1120: 4 unresolved externals
SnaidiS(Semion)
|
|
|
|
|
please help me
SnaidiS(Semion)
|
|
|
|
|
I see this article and when you run these functions you have a reg key in registry (MyApp) but i dont know how do you use this article that you have these errors can you explain how do you use from this article,please
|
|
|
|
|
how to get the input data (text) from text box in mfc dialog based application in v c++ 6
|
|
|
|
|
GetWindowText (CString& rString) const
Dream bigger... Do bigger...Expect smaller
aji
|
|
|
|
|
i want it as long not string?????????????
|
|
|
|
|
Take it as string convert it to long
char * str=new char[100];
GetDlgItemText (IDC_EDIT1,str,100);
long l;
l=atol (str);
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
_AnShUmAn_ wrote: GetDlgItemText (IDC_EDIT1,str,100);
Hey this will cause error
u need to modify this to
GetDlgItemText (IDC_EDIT1,(LPTSTR)str,100);
Dream bigger... Do bigger...Expect smaller
aji
|
|
|
|
|
see me wrote:
Hey this will cause error
And Why so:
LPTSTR-An LPWSTR if UNICODE is defined, an LPSTR otherwise.
Did you try using the code that I gave.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
|
see me wrote:
GetWindowText (CString& rString) const
Thanks for your comment.
But just have a look at your post . Shouldn't it be:
CString str;
m_editBox.GetWindowText(str);
No personnel issues but just to.......
say that we don't post the code here that is always optimized.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Map it to some variable (ex: m_edit)
While mapping it select long as its type.
In the code use the following lines
long val;
UpdateData();
val=m_edit
|
|
|
|
|
CString csText;
GetDlgItemText( IDC_EDIT1, csText );// here IDC_EDIT1 is the id of the edit control
nave
|
|
|
|
|
identity_85 wrote: how to get the input data (text) from text box in mfc dialog based application in v c++ 6
GetDlgItemText
|
|
|
|
|
I have a pointer to a CStatic object but i need a handle to it cos i need to reposition it on the screen with the help of SetWindowPos function. How can i obtain a handle to the object if I have pointer and is there any other way to move/reposition the CStatic object. Plzz Help !!!
Anshul
|
|
|
|
|
if StaticCtrl is an object of CStatic, then StaticCtrl.m_hWnd points to the handle to that static control.
nave
|
|
|
|