|
Christian Graus wrote: Looks like you're missing a #include.
Seems that would have resulted in:
error C2065: 'assert' : undeclared identifier
instead. With VS6, __MODULE__ is not even part of the assert() macro so I'm not sure what to even suggest.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Where did you get the __MODULE__ predefined macro from?
If you right click on "assert" and choose "Go to Declaration" then what file do you end up in?
It should be assert.h ( which you should be including with #include <assert.h> ).
In the RTL code with VS2003, it only uses these macros: __FILE__ and __LINE__
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
ya exactly,
assert(0);
and printf("\nHere %s %d \n",__FILE__,__LINE__); // for both statements I am getting the same error.
I included assert.h and tried but am unable to find the __MODULE__ predefined macro..
thanks in advance,
Ashok
|
|
|
|
|
Hmm I can't reproduce this at all. It works for me in console and GUI app builds no problems.
In Google search __MODULE__ shows up related to linux and python.
It's nowhere in the CRT or Platform SDK headers though.
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
I am using coledatasource::dodragdrop function for drag and drop. when i drag and drop between applications, i get an assertion in the source side in the following code
CCmdTarget::~CCmdTarget()
{
#ifndef _AFX_NO_OLE_SUPPORT
if (m_xDispatch.m_vtbl != 0)
((COleDispatchImpl*)&m_xDispatch)->Disconnect();
ASSERT(m_dwRef <= 1);#endif
#ifdef _AFXDLL
m_pModuleState = NULL;
#endif
}
can anyone help me solve this problem?
Thanks
|
|
|
|
|
Hi! All
I want to copy Some data which is stroed in TChar Buff in to a CString Variable.
How i do this. The TChar Buff has Raw data in which there are number of zeros present between raw data
Ansh
|
|
|
|
|
aaaan wrote: TChar Buff in to a CString Variable.
C'tor of CString or assignement operator will take care of that.
e.g
CString csString(pCharArr);
or
Cstring csString = pCharArr;
aaaan wrote: The TChar Buff has Raw data in which there are number of zeros present between raw data
Can you explain this?
|
|
|
|
|
prasad_som wrote: Can you explaing this?
Meaning that you can't do something like:
CString str = "Now\0is\0the\0time\0for\0all...";
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
ya i m unable to store data like CString str = "Now\0\0\0\0\0is\0\0\0\0the\0time\0for\0all..."
|
|
|
|
|
Of course. Why would you think it was even possible?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
ya I know it is not possible directly to CString variable. Bt i able to forcefully insert the raw data in CString variable taking data in a loop up to its length but it creats problem wn the length of data is very large i.e. more tn 1000 because running loop up to this limit creats problem of hanging.I want to solve this problem. if any soln pls help me.
|
|
|
|
|
Have you tried using memcpy() ?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Can someone please make a tutorial on Rich Edit in C not "MFC"
Cause I don't kow how to do anything in Rich Edit. I Load the library
and create the control. I have no idea how to set the default font,
how do colour text, make the selected text underline or anything
-- modified at 8:00 Monday 26th March, 2007
|
|
|
|
|
|
Shin-Ra wrote: Can someone please make a tutorial on Rich Edit in C not "MFC"
I'll assume this is just bad English getting in the way of your actual intent. Otherwise, don't expect anyone to take you up on this. Creating an article is no small undertaking.
If you are simply wanting to know how to use such a control, have you Googled for:
CreateWindow("RICHEDIT_CLASS", ...); Or at least looked here?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I have read that. But it has examples of how to do that. So with my lack of knowledge I wouldn't be able to read and do it
I understand. But god i'm just tired of finding MFC and no C ones.
I feel nostaglic on C++. To go do MFC instead :\
|
|
|
|
|
Shin-Ra wrote: But god i'm just tired of finding MFC and no C ones.
So why not just look at what MFC is doing? You'll notice a lot of EM_xxx messages are actually being sent.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Shin-Ra wrote: So with my lack of knowledge I wouldn't be able to read and do it
If you don't know the basics of sending messages to windows then that's the topic of articles you
should be reading. This is the core of Windows UI programming. You'll need to know it
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
plz Help me...
when i use "EnumPrinterDataEx" function in my program, it returns 1018 value.and this function does not work exactly.can any on tell to me what is meaning of 1018 return value.
Thanks
Monica
|
|
|
|
|
mo_nica881 wrote: can any on tell to me what is meaning of 1018 return value.
Its stated as Illegal operation attempted on a registry key that has been marked for deletion. (use Tools-->Error Lookup to see description of win32 errors).
|
|
|
|
|
You can use FormatMessage to see the description of the error, as in the following code excerpt (from MSDN)
LPVOID lpMsgBuf;
FormatMessage(
FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_IGNORE_INSERTS,
NULL,
GetLastError(),
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPTSTR) &lpMsgBuf,
0,
NULL
);
MessageBox( NULL, (LPCTSTR)lpMsgBuf, "Error", MB_OK | MB_ICONINFORMATION );
LocalFree( lpMsgBuf );
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.
|
|
|
|
|
Thanks. i resolve my problem.
Monica
|
|
|
|
|
I am working on creating a drop down combo box if user clicks on a column in a list control. I have got one document in the link: http://www.codeproject.com/listctrl/CustomizedReportListCtrl.asp
But the problem is CBS_DROPDOWNLIST style has been used in that combo list. But I want to make that combo box editable. CBS_DROPDOWN is not working. Could anyone tell me how to do that?
|
|
|
|
|
Aryan S wrote: I have got one document in the link: http://www.codeproject.com/listctrl/CustomizedReportListCtrl.asp
That article message board is better place to ask this question.
Aryan S wrote: But I want to make that combo box editable. CBS_DROPDOWN is not working.
You need to be very clear instead of saying "not working", while asking there ,too.
|
|
|
|
|
Aryan S wrote: http://www.codeproject.com/listctrl/CustomizedReportListCtrl.asp
You should ask the person who wrote this article. He knows better.
|
|
|
|