|
Hi Pallini,
I already put the _pctype defined in the Additional Dependencies line of the Linker Input Option.
All error gone. But it create another error.
LINK : fatal error LNK1181: cannot open input file '_pctype.obj'
Do you have any idea?
Thanks
|
|
|
|
|
You shouldn't do that, you should add the library containing _pctype definition.
You cannot add a type as input file for the linker!
Hint for the library name: usually it has the same name the include file has (for instance, if you include, say mylibrary.h , then there are odds the library file name is mylibrary.lib ).
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]
|
|
|
|
|
Check whether you have included the right "ctype.h" file in all these modules reported by your linker.
cheers
Varghese Paul
|
|
|
|
|
Erm, I dont have ctype.h in the compiler
|
|
|
|
|
hi,
i'm amble to compile.
i just change the Code generation-Run Time Library - /MTD
its work now.
thanks guys..
|
|
|
|
|
I am working on an mfc application and I am trying to load bitmap images into CRichEditCtrl Control for my chat application.
The problem with my code is that if i select only one bitmap(smiley) to send along with text it works fine but when the message contains more than one bitmap(smiley) the code gives error at LoadBitmap function call at some Attach function.
Please tell me how to resolve it.
Thanks In Advance.
|
|
|
|
|
No code => no help.
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 am sending you the code
void CChatDlg::InternalAppendTextinRichEdit(LPCTSTR szText)
{
int len;
ASSERT(szText);
ASSERT(AfxIsValidString(szText));
CWnd * pWnd = (CWnd*) GetDlgItem(IDC_TRANSCRIPT);
CString strToInsert = szText;
strToInsert.MakeLower();
CString strTemp = g_ChatManager.GetCurrentCSR();
strTemp.MakeLower();
COLORREF color;
if(0 == strToInsert.Find(strTemp))
{
color = RGB(185,0,0);
}
else if(-1 != strToInsert.Find(_T(":")))
{
int n = strToInsert.Find(_T("notice"));
if(0 == n)
{
color = RGB(0,128,0);
CString str1 = _T("notice:now user has join the chat");
if(0==strToInsert.Find(str1))
{
CheckVisitorNameandMail();
}
}
else
{
color = RGB(0,0,255);
SetDlgItemText(IDC_STATIC_STATUS,_T(""));
}
}
else
{
color = RGB(0,128,0);
}
CString strText = szText;
CString strtemp = szText;
CString strFinal;
int first=0,start,end,last,length;
if((strToInsert.Find('[',0)>=0))
{
m_cfDefault.crTextColor = color;
m_richEdit.SetSelectionCharFormat(m_cfDefault);
int option = 0 ;
CWnd *focusWnd = GetFocus();
int iTotalTextLength = m_richEdit.GetWindowTextLength();
while(strText.GetLength()>0)
{
CBitmap m_bitmap;
first = 0;
length = strText.GetLength();
if(strText.Find(_T("[:)]"),first)>=0)
{
option = 1;
start = strText.Find(_T("[:)]"),first);
}
else if(strText.Find(_T("[:D]"),first)>=0)
{
option = 2;
start = strText.Find(_T("[:D]"),first);
}
if(option == 1)
{
end = start + 3;
CString f = strText.Mid(first,start);
if(f!=_T(""))
m_richEdit.ReplaceSel(f);
CString e = strtemp.Mid(end+1,length);
m_bitmap.LoadBitmap(MAKEINTRESOURCE(IDB_HAPPY));
InsertPlotBitmap((HBITMAP)m_bitmap);
delete(m_bitmap);
strFinal = e ;
strText = strFinal;
strtemp = strFinal;
}
else if(option == 2)
{
end = start + 3;
CString f = strText.Mid(first,start);
if(f!=_T(""))
m_richEdit.ReplaceSel(f);
CString e = strtemp.Mid(end+1,length);
m_bitmap.LoadBitmap(MAKEINTRESOURCE(IDB_BIGGRIN));
InsertPlotBitmap((HBITMAP)m_bitmap);
delete(m_bitmap);
strFinal = e ;
strText = strFinal;
strtemp = strFinal;
}
else
{
m_richEdit.ReplaceSel(strText);
strText = _T("");
}
}
}
Thanks
|
|
|
|
|
Dhiraj kumar Saini wrote: delete(m_bitmap);
What is the rationale behind the above? You're deleting a variable that isn't even a pointer.
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]
|
|
|
|
|
My problem got solved. I had to use DeleteObject function.
Thanx for the help.
|
|
|
|
|
Hi all,
Does anyone of you know how I can change the cursor type of the text editor in Visual Studio 2005?
This tiny cursor drives me crazy
Thank you.
modified 7-Mar-17 12:13pm.
|
|
|
|
|
Hi all,
I want to store some data in a map as a pair. Just see what I have done in the following code, then you can have a clear idea.
<br />
string user_key[5] = {"cocacola", "pepsi", "cocacola", "mango", "pepsi"};<br />
int comm_val[5] = {23, 45, 24, 67, 98};<br />
<br />
map<const string, int> comm_map;
map<const string, int>::const_iterator iter;<br />
<br />
for(int i = 0; i < 5; i++)<br />
{<br />
iter = comm_map.find(user_key[i]);<br />
<br />
if(iter == comm_map.end())<br />
{<br />
comm_map.insert(pair<const string, int>(user_key[i], comm_val[i]));<br />
}<br />
else<br />
{<br />
(*iter).second = comm_val[i];
} <br />
}<br />
<br />
for(iter = comm_map.begin(); iter != comm_map.end(); iter++)<br />
{<br />
string rec = iter->first;<br />
int val = iter->second;<br />
<br />
cout << rec << "\t" << val << endl;<br />
}<br />
<br />
<br />
My result should be as commented at last of the code. Can you help me to fix it.
Thanks
I appreciate your help all the time...
CodingLover
|
|
|
|
|
I've workout with the index, as follows.
comm_map[user_key[i]] = comm_val[i];
Is that right?
I appreciate your help all the time...
CodingLover
|
|
|
|
|
Hi, in MFC 2003, Is that possible to create two executable files (.exe) one for GUI and one for command line, so I can choose to run the application via GUI or via command line
Thanks
Arif
|
|
|
|
|
One way to do it would be to separate your 'core' from your UI. If you develop a dll (or a lib file) which contains all the core functionalities, that will be easier to develop the two other applications. But of course, you will still need to develop them and the way you will do it really depends of what you need to do.
|
|
|
|
|
Thanks for the quick reply,
I 've put all of my core functionalities in different classes, and the problem is I don't know how to creating command line executable files, because when the first time, I create MFC Dialog Based Not Command Line Application, Any suggestion?
Thanks
Arif
|
|
|
|
|
Do it as I suggested: create three projects in your solution. One for the dll (or lib), one for the dialog based app and one for the command line app.
|
|
|
|
|
HI, Sorry for the late reply,
I decided to create class that inherits from commandlineinfo
and until now, I dont have any issues
Anyway, Thanks for your help
Regards,
Arif Liminto
|
|
|
|
|
|
Hi, I have a application which opens MS-Office documents (Word,Excel,PPT). While opening Word file OLE creates ~WRO0001.doc" file. When user right click on this file, it opens this file in WinWord with options available (e.g. New,Open,Edit).
I want to disable this right click menu (Context menu). Please let me know is there any way to block this context menu for Office applications (e.g. .doc files) i.e I dont want this file to open outside of my application.
Thanks
SNI
jhghjghj
|
|
|
|
|
Trying to block the WM_RBUTTONxxx, WM_CONTEXTMENU, etc. in the PreTranslateMsg of the main window may help you. You have to replace these messages with WM_NULL and allow the message processing.
Please note that I didn't try it for Word or Excel, but tried for some others and the result was success...
|
|
|
|
|
Hi!
how do i create a wincows mobile program with VC++ 2003 or VC++ 6.0 ?
Zo.Naderi-Iran
|
|
|
|
|
Hi!
what diffrence is between IT and IAT?
i want an document for this topic
Zo.Naderi-Iran
|
|
|
|
|
Hi all,
How to create a csv file in a dialog based MFC application?
Thank You,
SeshaSridhar
|
|
|
|
|
u can create the csv file this way
FILE *fp;
fp = fopen("output.csv","w");
Hope it helps u
|
|
|
|