|
Thank you for the response. Here's what I did.
in the MyprojectDlg.h file I put the following:
class CMyProjectDlg : public CDialog
{
int CMyProjectDlg::MyFunction(int num1, int num2);
}
Alas, same error message:
error C3861: 'UpDateData': identifier not found, even with argument-dependent lookup
(this error occurs on the line using UpdateData() within MyFunction() but not when I use it outside of MyFunction)
Is this not the correct way to make MyFunction() a member of the MyProjectDlg class or is there some other problem, perhaps with the function definition? I would greatly appreciate any further help.
ss
|
|
|
|
|
SeanSheehan wrote:
error C3861: 'UpDateData': identifier not found, even with argument-dependent lookup
it is CWnd::UpdateData()
Not UpDateData()
Jetli
conclusion means Coming to wrong Decision with confidence
|
|
|
|
|
As per the suggestion I changed MyFunction() definition to:
int MyFunction(int a, int b)<br />
{ <br />
CWnd::UpDateData(TRUE);<br />
return a+b;<br />
}
However I now get two error messages:
error C2039: 'UpDateData' : is not a member of 'CWnd'
error C3861: 'UpDateData': identifier not found, even with argument-dependent lookup
|
|
|
|
|
SeanSheehan wrote:
class CMyProjectDlg : public CDialog
{
int CMyProjectDlg::MyFunction(int num1, int num2);
}
Change as follows:
class CMyProjectDlg : public CDialog
{
int MyFunction(int num1, int num2);
}
And in ur cpp file the definition should look like this:
int CMyProjectDlg::MyFunction(int num1, int num2)
{
..
..
..
}
suhredayan There is no spoon.
|
|
|
|
|
Made the suggested changes to both the delclaration and definition. The declaration is now:
class CMyProjectDlg : public CDialog<br />
{<br />
int MyFunction(int num1, int num2);<br />
}
in MyProjectDlg.h, and the definition is now:
int CMyProjectDlg::MyFunction(int a, int b)<br />
{ <br />
UpDateData(TRUE);<br />
return a+b;<br />
}
in MyProjectDlg.cpp, yet the same error message persists:
error C3861: 'UpDateData': identifier not found, even with argument-dependent lookup
Maybe this is not such a simple problem.
ss
|
|
|
|
|
SeanSheehan wrote:
UpDateData(TRUE);
Change to UpdateData(TRUE);
suhredayan There is no spoon.
|
|
|
|
|
Thats what i have told earlier with but he doesn't get the Simplest thing.
Jetli
Constant Thing In World Is Change.
|
|
|
|
|
Jetli Jerry wrote:
he doesn't get the Simplest thing.
I still remember those days of
suhredayan There is no spoon.
|
|
|
|
|
He's probably not observing the change in case.
Artificial intelligence is no match for natural
stupidity.
|
|
|
|
|
I'm sorry about the stupid question,but it's UpdateData() and
not UpDateData(),isn't it??????????
Eli
|
|
|
|
|
It is possible to add document/view architecture support to an ActiveX controls?
I have to develop an ActiveX control similar to drawcli sample stand alone application included in MSDN 2000.
if anyone has idea about this, please reply.
|
|
|
|
|
Hello all,
I'm having issues right now trying to start a new project. It involves connecting to remote mySQL databases and I'm running into compile issues with mysql.h and libmysql.dll.
The issue is that I'm not sure if I need ALL of mySQL installed onto this test machine or if there's a way to just get what I need to do the programming.
Thanks.
Lost in documentation.
--
David Coley
http://www.codecipher.com
|
|
|
|
|
i can not find regsvr32.exe on the win XP, where is it?
is there no regsvr32.exe on XP? how to register COM?
includeh10
|
|
|
|
|
It's in the C:\WINDOWS\system32
Igor.
|
|
|
|
|
did you see it there?
i can't find it, why?
includeh10
|
|
|
|
|
includeh10 wrote:
did you see it there?
Yes, on XP Home.
includeh10 wrote:
i can't find it, why?
Has somebody deleted it?
Igor.
|
|
|
|
|
Use this little piece of code for manually regiter the COM
Actually working of RegSvr32 is like this
it load the Dll using LoadLibrary api and
them call DLLRegisterServer to register the server.
you can do that programatically like this
<code>typedef HRESULT (WINAPI *DLLREG)();</code>
HMODULE hLib;
hLib=<code>LoadLibrary</code>(YOU_COM_DLL_NAME);
if(!hLib)
{
MessageBox(NULL,"The File you Refering not found","Error",MB_OK);
return;
}
DLLREG fnDllReg;
fnDllReg=(DLLREG)GetProcAddress("<code>DllRegisterServer</code>");
if(!fnDllReg)
{
MessageBox(NULL,"The Dll is Loaded Correctly but DllRegisterServer function
not found","ERROR",MB_OK);
return;
}
if(SUCCEEDED(<code>fnDllReg</code>))
MessageBox(NULL,"The Com DLL register Successfully","CONGRETS",MB_OK);
else
MessageBox(NULL,"The Com DLL registerering fail","ERROR",MB_OK);
}
"I Think this Will Help"
[Vote One Here,.....]
<h5
alok gupta="" <br=""> visit me at http://www.thisisalok.tk
|
|
|
|
|
Running the following command will also do it
rundll32 urCom.dll,DllRegisterServer
suhredayan There is no spoon.
|
|
|
|
|
I will try that..............
one min trying.................
...................
.......................
.........................
Oh it's Really work, thanks
"I Think this Will Help"
[Vote One Here,.....]
<h5
alok gupta="" <br=""> visit me at http://www.thisisalok.tk
|
|
|
|
|
If the DLL you are trying to register contains COM and you did not initialze COM, then this will not work. You should probably add a call to CoInitializeEx.
|
|
|
|
|
I have to check that before commenting.
i will let you know about my test cases. thank for pointing me about that.
Thanks Once again
"I Think this Will Help"
[Vote One Here,.....]
<h5
alok gupta="" <br=""> visit me at http://www.thisisalok.tk
|
|
|
|
|
I would like to draw into a dialog box a pattern that depends on the current status of my application.
How can I do that ?
Is there a OnPaint function for a Dialog Box ?
How can I get its Drawing Context ?
|
|
|
|
|
It is probably simpler to put a picture control (or an icon control) in the dialog and use the OnPaint() or LoadIcon() function for that control.
Steve
|
|
|
|
|
you shuold use CDC to get the device context:
CDC *dc = m_YourDialog.getDC();
// use dc's function to draw what you need(look for CDC in MSDN)
// don't forget to release thwe device context in the end
ReleaseDC(dc);
Regards,
Eli
|
|
|
|
|
Each dialog created by wizard (MFC) has OnPaint – WM_PAINT message handler.
If you create API dialog WM_PAINT handler is the place.
You can also draw (paint) in WM_ERASEBKGND message handler.
JohnCz
|
|
|
|