|
Search in your computer that do you have this file
whitesky
|
|
|
|
|
Are you sure that u want to include #include Afxcmm.h"
I think its actualy #include "Afxcmn.h" that you needed
try with <>
:->
Dream bigger... Do bigger...Expect smaller
aji
-- modified at 2:28 Thursday 13th July, 2006
|
|
|
|
|
of course its #include "Afxcmn.h"
nave
|
|
|
|
|
Have you bothered to verify that the file actually exists on your machine? If it doesn't, that would be one reason for the error.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi All,
I want ot create static text on the dialog box. I wrote following code in OninitDialog function.
CStatic myStatic;
myStatic.Create(_T("my static"), WS_CHILD|WS_VISIBLE|SS_CENTER,
CRect(15,15,150,50), this);
But it doesn't work for me. Whats wrong.. can anybody help me
regards,
Aj
|
|
|
|
|
DeclareCStatic myStatic; in class not in a function
whitesky
|
|
|
|
|
Its working wen i tried with the same code.
But
Declared this as a member of class.
CStatic myStatic;
Dream bigger... Do bigger...Expect smaller
aji
|
|
|
|
|
jadhav123 wrote: Static myStatic;
myStatic.Create(_T("my static"), WS_CHILD|WS_VISIBLE|SS_CENTER,
CRect(15,15,150,50), this);
it is not created because, as soon as OnInitDialog function Exit, scope of MyStatic variable will end which inturn destory the object..
Now if you want to see Your Dynamically created Static Box you have to decalre CStatic variable as global or as classmember, so ity lifetime is that of program
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hi,
I create MFC extension DLL and wrote couple of functions adding one class i.e.CNoteMgr
in the DLL workspace.
In the class header of CNoteMgr,
there are two functions whose signature is given as below :
BOOL CNoteMgr::drawLine(HDC,HPEN,POINT,HWND);
BOOL CNoteMgr::drawCurve(HDC,POINT,HWND);
The implementation has been done in different way for line drawing and drawing curve.
But while compiling the DLL, i am getting the following errors as below :
****************************************************************************************
Compiling...
Notebook.cpp
D:\FancyViewer\Notebook\Notebook.cpp(78) : warning C4101: 'msg' : unreferenced local variable
NoteMgr.cpp
D:\FancyViewer\Notebook\NoteMgr.cpp(632) : error C2511: 'drawLine' : overloaded member function 'int (struct HDC__ *,struct HPEN__ *,struct tagPOINT [],struct HWND__ *)' not found in 'CNoteMgr'
d:\fancyviewer\notebook\notemgr.h(29) : see declaration of 'CNoteMgr'
D:\FancyViewer\Notebook\NoteMgr.cpp(665) : error C2511: 'drawCurve' : overloaded member function 'int (struct HDC__ *,struct tagPOINT [],struct HWND__ *)' not found in 'CNoteMgr'
d:\fancyviewer\notebook\notemgr.h(29) : see declaration of 'CNoteMgr'
D:\FancyViewer\Notebook\NoteMgr.cpp(838) : warning C4800: 'unsigned char' : forcing value to bool 'true' or 'false' (performance warning)
Generating Code...
Error executing cl.exe...
****************************************************************************************
PLEASE NOTE that the error id is "C2511".
I do not know where the point of overloading comes as the method names are different.
I found from MSDN regarding the error C2511 and tried all possibilities but still
the problem persists.
=========================================================================================
MSDN says that for the error C2511
'identifier' : overloaded member function not found in 'class'
No version of the function is declared with the specified parameters.
Possible causes :
(1)Wrong parameters passed to function.
(2)Parameters passed in wrong order.
(3)Incorrect spelling of parameter names.
The following sample generates C2511:
Example ->
// C2511.cpp
class C {
int c_2;
int Func(char *, char *);
};
int C::Func(char *, char *, int i) { // C2511
// try ...
// int C::Func(char *, char *) {
return 0;
}=========================================================================================
Can anyone help me out please ??
|
|
|
|
|
Changed as the folowing:
<br />
BOOL CNoteMgr::drawLine(HDC,HPEN,POINT*,HWND);<br />
BOOL CNoteMgr::drawCurve(HDC,POINT*,HWND);<br />
Because of your implementation is POINT[]
|
|
|
|
|
My app requires to update software from the internet.
I need to know the number of days from last update day to current day.
one solution is using GetSystemTime().
GetSystemTime() obtains year, month and day, but how to transfer SYSTEMTIME to absolute days, so number of days between the period can be calculated easily.
|
|
|
|
|
store the values in regisry and check while updating
"A winner is not one who never fails...but the one who never quits"
|
|
|
|
|
|
hi,
I wan't to play a movie clip in an application using Visual C++.
I think it is possible. Any body can give me an idea abt this.
Dream bigger... Do bigger...Expect smaller
aji
|
|
|
|
|
|
the easiest way is to insert a mediaplayer activex into ur project and call its funtions....
nave
|
|
|
|
|
Thats i already did.
Now i want to do it without using any Active X controls.
I know there is some way to do it.
Dream bigger... Do bigger...Expect smaller
aji
|
|
|
|
|
Insert Animation Control on dialog .
Add variable from it (m_AVICtrl);
add avi source to your project (IDR_AVI1);
call Open of variable :---> m_AVICtrl.Open(IDR_AVI1) ;
call Play function ---> m_AVICtrl.Play() ;
|
|
|
|
|
|
See mci functions
whitesky
|
|
|
|
|
Can you please tel some thing about the mci function...or any links????
Dream bigger... Do bigger...Expect smaller
aji
|
|
|
|
|
|
Hey all,
I need to do this operation
float x;
int y;
int z;
x= (float)((y-z)/60);
if(x % (int)x)!= 0)
{x = (int)x +1;
}
how do i do a mod of float and int. If x is an int then, I can use % operator. But in my case I need to find out if x = 2.1 then I need to round it to 3 ; also if x= 2.6, i need to round it to 3.
How can I do this? Can anyone help? Iam using VC++6.0
Thanks in advance.
|
|
|
|
|
<br />
x= (float)((y-z)/60);<br />
x=ceil(x);<br />
if(x % (int)x)!= 0)<br />
{<br />
x = (int)x +1;<br />
}<br />
|
|
|
|
|
hey what happens to
ceil(x);
if x =2.0, then will it be 2.0 or 3.0?
|
|
|
|