|
Hello,
I get compiler error error C2327: 'CMyGridEdit::OnChar' .symbol' : is not a type name, static, or enumerator..
What's wrong at this declaration ?
I have following declaration in VC++ 6.0
<<<mygrid.cpp>>
BEGIN_MESSAGE_MAP(CMyGrid::CMyGridEdit, CEdit)
ON_WM_CHAR()
END_MESSAGE_MAP()
void CMyGrid::CMyGridEdit::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags)
{
}
<<mygrid.h>>
{
class CMyGrid : public CMSHFlexGrid
..
class CMyGridEdit : public CEdit
{
afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
DECLARE_MESSAGE_MAP()
};
};
Thanks for helps. jr
|
|
|
|
|
That pattern works fine in VS2008, so the only thing I can presume is that one of the VC6 compiler's many many deficiencies is biting you.
I'd suggest you pre-process the C++ file (with CL /P) and see if anything looks untoward in the BEGIN_MESSAGE_MAP code after pre-processing (don't look for BEGIN_MESSAGE_MAP in the .i file you get out of the pre-processor - it won't be there - look for CMyGrid::CMyGridEdit::GetMessageMap instead.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
The following is the code fragment which I used in my application,
CStringb csFilePath = _T("C:\\MyFolder\\");
if(csFilePath != "\\")
{
DWORD dwError = GetLastError();
}
And i am getting an error code of 122(The data area passed to a system call is too small) in VS2008.
But in VC6.0, there is no such problem, the error code i am getting is 0.The application is with UNICODE supported.
Please help me to find out the cause of this problem.
Thanks & Regards
VIJITH VIJAYAN
|
|
|
|
|
VIJITH VIJAYAN wrote: if(csFilePath != "\\")
this should probably be
if(csFilePath != _T("\\"))
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]
|
|
|
|
|
Thanks for the quick response .But at the compilation time this code didnt shown any errors or warnings . Do have any idea ,why it had happened like this ?
Thanks & Regards
VIJITH VIJAYAN
|
|
|
|
|
Because the CStringT == operator is overloaded to handle PCYSTR .
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]
|
|
|
|
|
VIJITH VIJAYAN wrote: And i am getting an error code of 122(The data area passed to a system call is too small) in VS2008.
Possibly because that's the last value that was set (with SetLastError() ). In other words:
SomeWindowsFunctionThatFailsWithCode122();
CString csFilePath = _T("C:\\MyFolder\\");
if (csFilePath != _T("\\"))
{
DWORD dwError = GetLastError();
} If nothing calls SetLastError(0) , then its internal value will stay 122 .
"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
|
|
|
|
|
Hi,
Have a quick question on Boost weak pointers. Hope this is the place to ask. I found the article
Smart Pointers to boost your
code[^]
and on the paragraph "cyclic references" in the code there is the line
<br />
child->myDad = dad;<br />
where does the dad come from? Can't seem to see it defined anywhere in the code.
Thanks for any information.
|
|
|
|
|
I think it's just a typo. Should be:
child->myDad = parent;
EDIT: You can download the sources just to be certain 
|
|
|
|
|
Ha ha, yes I did think it should be parent.
Thanks!
|
|
|
|
|
Actually, if it was a typo then why does the diagram underneath refer to "dad" and the dad.reset() ? Surely that can't be a typo as well?
|
|
|
|
|
As I said before - you really should download the sources first. The code will probably clear things up 
|
|
|
|
|
Why not post this message on that article rather than here?
Looking at the article, I think that's a typo - dad should be parent
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hmmm, if it was a typo to put "dad" instead of "parent", then is the diagram showing dad pointing to the CDad struct a mistake as well?
|
|
|
|
|
He probably used dad and son or boy throughout, then tried to remove the gender specificness as it could be seen as discriminatory?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hmmm, thats confusing! I'll try and email the author (if thats possible) as it is a good article and I want to get my head round it.
Thanks !
|
|
|
|
|
Hallo i have the following prbolem:
i need to modify the CFont Dialog, and by using this
code got the following Error: Debug Assertion Failed!
Hier is the code:
UpdateData(TRUE); // Debug Assertion Failed
LOGFONT lf;
CFont *pFont = GetFont();// Debug Assertion Failed
pFont->GetLogFont(&lf);
...
Any help would be appriciated thanks in advance.
|
|
|
|
|
You should go deeper with the debugger.
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]
|
|
|
|
|
I already went deeper in the Debugger, i still could not fix the problem.
|
|
|
|
|
Go deeper. Can't you see what assertion is failing?
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]
|
|
|
|
|
I see it but I can't say it to you,its secret.
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
My CPMRU 's battery pack is still charging...
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 need to change it.
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
You need to modify CFontDialog or CFont? and where do you use of this code?
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
in the Test_Doc.cpp file(SDI_Appliction), i use the following code:
void CTest_Doc::OnInputFont()
{
CTestFontDialog sfdlg; // CTestFontDialog is derived from CFontDialog
tfdlg.OnInputFontDialog();
}
and this code is in the OnInputFontDialog()
{
LOGFONT lf;
CFont *pFont = GetFont(); // Fehler
pFont->GetLogFont(&lf);
.........
}
the OnInputFontDialog() is in TestFontDialog.cpp this class is derived from CFontDialog.
How can i see what fail the assertion?
m_hWnd = 0x00000000
maybe this is why?
|
|
|
|