Click here to Skip to main content
15,911,360 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Adding library modules for the linker from _code_ Pin
Iain Clarke, Warrior Programmer7-Jan-09 0:54
Iain Clarke, Warrior Programmer7-Jan-09 0:54 
GeneralRe: Adding library modules for the linker from _code_ Pin
sashoalm7-Jan-09 1:01
sashoalm7-Jan-09 1:01 
GeneralImplementation help Pin
Marimuthu.r7-Jan-09 0:06
Marimuthu.r7-Jan-09 0:06 
QuestionCMFCToolBar with CView Pin
N B sowmi7-Jan-09 0:02
N B sowmi7-Jan-09 0:02 
AnswerRegister an OCX programatically Pin
Mustapha Rédouane6-Jan-09 23:28
Mustapha Rédouane6-Jan-09 23:28 
GeneralRe: Register an OCX programatically Pin
CPallini6-Jan-09 23:46
mveCPallini6-Jan-09 23:46 
GeneralRe: Register an OCX programatically Pin
Randor 6-Jan-09 23:57
professional Randor 6-Jan-09 23:57 
QuestionCOleDataObject error Pin
NewVC++6-Jan-09 21:08
NewVC++6-Jan-09 21:08 
Hi All

I am geting error when i am useing COleDataObject.I got some example code from net.It's very help full for me but when i am use the code then i am geting error.
COleDataObject odj1;
	if( odj1.AttachClipboard() )
	{
		if( odj1.IsDataAvailable( CF_HDROP ) )
		{
			STGMEDIUM StgMed;
			FORMATETC fmte = { CF_HDROP,
        				(DVTARGETDEVICE FAR *)NULL,
        				DVASPECT_CONTENT,
        				-1,
        				TYMED_HGLOBAL };
			if( odj1.GetData( CF_HDROP, &StgMed, &fmte ) )
			{
				HDROP hDrop = (HDROP)StgMed.hGlobal;
								UINT cFiles = ::DragQueryFile(hDrop, (UINT)-1, NULL, 0);				
	CString szText;
		char szFile[MAX_PATH];
	szText="";
	for( UINT count = 0; count < cFiles; count++ )
	{
		::DragQueryFile(hDrop, count, szFile, sizeof(szFile));
		szText += szFile;
		szText += "\r\n";
	}
	m_pRich->ReplaceSel(szText);
				if (StgMed.pUnkForRelease)
				{
					StgMed.pUnkForRelease->Release();
				}
				else
				{
					::GlobalFree(StgMed.hGlobal);
				}
				return;
			}
		}
	}


error geting
error C2079: 'odj1' uses undefined class 'COleDataObject'
error C2228: left of '.AttachClipboard' must have class/struct/union
error C2228: left of '.IsDataAvailable' must have class/struct/union
error C2228: left of '.GetData' must have class/struct/union

Plz help me
AnswerRe: COleDataObject error Pin
Cedric Moonen6-Jan-09 21:12
Cedric Moonen6-Jan-09 21:12 
Questionload image Pin
 Programmer.6-Jan-09 20:29
 Programmer.6-Jan-09 20:29 
AnswerRe: load image Pin
«_Superman_»6-Jan-09 21:04
professional«_Superman_»6-Jan-09 21:04 
AnswerRe: load image Pin
David Crow7-Jan-09 3:12
David Crow7-Jan-09 3:12 
QuestionHow to call a Dll Pin
tasumisra6-Jan-09 18:53
tasumisra6-Jan-09 18:53 
AnswerRe: How to call a Dll Pin
Cedric Moonen6-Jan-09 20:14
Cedric Moonen6-Jan-09 20:14 
AnswerRe: How to call a Dll Pin
Hamid_RT6-Jan-09 20:19
Hamid_RT6-Jan-09 20:19 
AnswerRe: How to call a Dll Pin
CPallini6-Jan-09 21:57
mveCPallini6-Jan-09 21:57 
AnswerRe: How to call a Dll Pin
nyeboy7-Jan-09 21:16
nyeboy7-Jan-09 21:16 
Questionstruct definition with : Pin
KASR16-Jan-09 18:20
KASR16-Jan-09 18:20 
AnswerRe: struct definition with : Pin
«_Superman_»6-Jan-09 18:48
professional«_Superman_»6-Jan-09 18:48 
GeneralRe: struct definition with : Pin
KASR16-Jan-09 19:09
KASR16-Jan-09 19:09 
AnswerRe: struct definition with : [modified] Pin
«_Superman_»6-Jan-09 19:15
professional«_Superman_»6-Jan-09 19:15 
GeneralRe: struct definition with : Pin
Stuart Dootson7-Jan-09 1:42
professionalStuart Dootson7-Jan-09 1:42 
AnswerRe: struct definition with : Pin
Randor 6-Jan-09 19:26
professional Randor 6-Jan-09 19:26 
AnswerRe: struct definition with : Pin
John R. Shaw7-Jan-09 6:32
John R. Shaw7-Jan-09 6:32 
QuestionHow to read unicode text files Pin
PS@Codeproj6-Jan-09 17:39
PS@Codeproj6-Jan-09 17:39 

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.