Click here to Skip to main content
15,896,606 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: problem with multiple defined symbols Pin
John R. Shaw28-Jul-05 8:39
John R. Shaw28-Jul-05 8:39 
GeneralRe: problem with multiple defined symbols Pin
sunit527-Jul-05 21:01
sunit527-Jul-05 21:01 
GeneralRe: problem with multiple defined symbols Pin
Qvicksilver28-Jul-05 6:46
Qvicksilver28-Jul-05 6:46 
GeneralSearch for a word in a file from code Pin
bugDanny27-Jul-05 7:45
bugDanny27-Jul-05 7:45 
GeneralRe: Search for a word in a file from code Pin
David Crow27-Jul-05 8:01
David Crow27-Jul-05 8:01 
GeneralRe: Search for a word in a file from code Pin
bugDanny27-Jul-05 8:34
bugDanny27-Jul-05 8:34 
GeneralRe: Search for a word in a file from code Pin
David Crow27-Jul-05 8:36
David Crow27-Jul-05 8:36 
GeneralRich Edit please check this code... Pin
Aqueel27-Jul-05 6:51
Aqueel27-Jul-05 6:51 
I am using rich edit control in dialog based application. I have copied this piece of code from a book but it is giving me an error. Please check what is this.


DWORD CALLBACK WriteEditData(DWORD dwCookie, LPBYTE pbBuff, LONG cb, LONG FAR *pcb)
{
CFile *pFile = reinterpret_cast<cfile*>(dwCookie);
try
{
pFile->Write(pbBuff,cb);
}

catch(CFileException *pEx)
{
pEx->Delete();
*pcb = 0;
return 0;
}
*pcb = cb;
return 1;
}


void CRE4View::OnBStr()
{
CFile fWrite("C:\\file.rtf", CFile::modeReadWrite);
EDITSTREAM strm;
strm.dwCookie = reinterpret_cast<dword> (fWrite); //error
strm.pfnCallback = WriteEditData;
m_Info.StreamOut(SF_RTF, strm);

}



Error message is,

error C2440: 'reinterpret_cast' : cannot convert from 'class CFile' to 'unsigned long'

Please reply.

Aqueel A. Mirza

We Believe in Excellence
GeneralRe: Rich Edit please check this code... Pin
David Crow27-Jul-05 7:13
David Crow27-Jul-05 7:13 
GeneralRe: Rich Edit please check this code... Pin
Aqueel27-Jul-05 7:24
Aqueel27-Jul-05 7:24 
Generalfind out which windows-design is selected Pin
gabriel.fischer27-Jul-05 5:58
gabriel.fischer27-Jul-05 5:58 
GeneralRe: find out which windows-design is selected Pin
David Crow27-Jul-05 7:10
David Crow27-Jul-05 7:10 
Generalicon to bitmap conversion Pin
rgchezhian27-Jul-05 5:45
rgchezhian27-Jul-05 5:45 
GeneralRe: icon to bitmap conversion Pin
David Crow27-Jul-05 5:48
David Crow27-Jul-05 5:48 
GeneralRe: icon to bitmap conversion Pin
rgchezhian27-Jul-05 7:53
rgchezhian27-Jul-05 7:53 
GeneralRe: icon to bitmap conversion Pin
David Crow27-Jul-05 7:58
David Crow27-Jul-05 7:58 
Generalre: interface of TSP using GA Pin
partas27-Jul-05 5:03
partas27-Jul-05 5:03 
GeneralRe: re: interface of TSP using GA Pin
Blake Miller27-Jul-05 9:13
Blake Miller27-Jul-05 9:13 
GeneralRe: re: interface of TSP using GA Pin
partas28-Jul-05 21:04
partas28-Jul-05 21:04 
GeneralRe: re: interface of TSP using GA Pin
Blake Miller29-Jul-05 4:10
Blake Miller29-Jul-05 4:10 
Generallaunch an html file Pin
Halawlaws27-Jul-05 4:49
Halawlaws27-Jul-05 4:49 
GeneralRe: launch an html file Pin
David Crow27-Jul-05 4:51
David Crow27-Jul-05 4:51 
GeneralRe: launch an html file Pin
Halawlaws27-Jul-05 4:53
Halawlaws27-Jul-05 4:53 
GeneralRe: launch an html file Pin
David Crow27-Jul-05 5:00
David Crow27-Jul-05 5:00 
GeneralRe: launch an html file Pin
Halawlaws27-Jul-05 5:02
Halawlaws27-Jul-05 5:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.