- Upvotes Received
- 3
- Posts with Upvotes
- 3
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
Re:
With regard to C++ books, I'll just echo the advice here .The following books are recommended; read them in mostly the order listed." Accelerated C++ " Andrew Koenig & Barbara Moo " The C++ Standard Library " Nicolai Josuttis --- a "must have" " Effective C++ ", " More Effective … |
|
|
|
about VC+MySQL problem:) i install mysql odbc V5.0 driver i need to ADO Connect MYSQL DB; code: _ConnectionPtr m_CMConnect; ::CoInitialize(NULL); m_CMConnect.CreateInstance(__uuidof(Connection)); m_CMConnect->Open("Provider=MySQL;server=localhost;DataBase=test;port=3306;uid=root;pwd=","","",-1); but Program run error..... how to Ado Connect MYSQL DB; thank:) |
|
dll problem,help me:) i create dll project ,the dll is Use MFC in a Static Library i hope exe call ListCtrl class from dll ==================DLL==================== <<<<<<<<<<ListCtrl.h>>>>>>>>>>>>>>> [code=c] #pragma once class AFX_EXT_CLASS ListCtrl :public CListCtrl { public: __declspec(dllexport) ListCtrl(); __declspec(dllexport) ~ListCtrl(); public: DECLARE_MESSAGE_MAP(); public: afx_msg void OnNMClick(NMHDR *pNMHDR, LRESULT *pResult); }; … |
|
problem about font i write CMFont class,it inheritance CFont e.g: [code] class CMFont:public CFont {..........}; ======================== CMFont font; font.CreateFont(...); GetDlgItem(IDC_FONTID)->SetFont(&font);[/code] [code] error error C2664: 'CWnd::SetFont' : cannot convert parameter 1 from 'CMFont **__w64 ' to 'CFont *'[/code] how to CMFont convert CFont thank:) |
|
about ComboBox problem <<<<<<<Dialog.h>>>>>>>> public: CComboBox Cbx; struct Data { LPCTSTR lpszName; LPCTSTR lpszValue; int ID; }; <<<<<<<Dialog.Cpp>>>>>>> Data d; d.lpszName=_T("Name"); d.lpszValue=_T("Value"); d.ID=1; Cbx.InsertString(0,d.lpszName); Cbx.SetItemDataPtr(0,(void *)d); how to struct data append to ComboBox Control,thank:) |
|
CString Convert to LPCTSTR i write DLL file,it is static dll i want CString type Convert to LPCTSTR but error Code: <<<<<<<<<<<Dll File>>>>>>>>> <<<<<<<A.H>>>>>>> class AFX_NOVTABLE dll { public: __declspec(dllexport) LPCTSTR Fun(); }; <<<<<<<A.Cpp>>>>>> LPCTSTR dll::Fun() { CString Rxg=_T("rxg"); LPCTSTR lpszStr=Rxg.GetBuffer(); return lpszStr; } <<<<<<<<Exe>>>>>>>>> #pragma comment(lib,"dll.lib") #include "A.h" .................. … |
|
About CView problem,thank:) <<<<<<<<<Preview.H>>>>>>> class Preview : public CView { public: virtual void OnDraw(CDC* pDC); virtual BOOL OnPreparePrinting(CPrintInfo *pInfo); void OnPrint(CDC *pDC, CPrintInfo* pInfo); }; <<<<<<Preview.CPP>>>>>>>>> void Preview::OnDraw(CDC* /*pDC*/) { } BOOL Preview::OnPreparePrinting(CPrintInfo* pInfo) { return DoPreparePrinting(pInfo); } void Preview::OnPrint(CDC *pDC, CPrintInfo* pInfo) { CString str=_T("rrr"); pDC->TextOut(0,30,str); } <<<<<<<<<<<Dialog.Cpp>>>>>>>> Preview … |
|
Ask Function problem?thanks <<<<<<<<<<Class.h>>>>>>>>>> [code] #pragma once class Class { public: int get_return(int a,int b,int (*compare)()); int Rxgmoral(int a,int b); void Fun(); };[/code] <<<<<<<<<Class.Cpp>>>>>>>> [code] #include "Stdafx.h" #include "Class.h" int Class::get_return(int a,int b,int(* compare)()) { return (compare(a,b)); } int Class::Rxgmoral(int a, int b) { return a+b; } void Class::Fun() { … |
|
Ask a problem,About CEdit control i write code..... <<<<<<<<<Static Dll>>>>>>>> ****************CmEdit.h********** [code] class AFX_NOVTABLE CmEdit : public CEdit { public: __declspec(dllexport) CString CmGetDlgItem(int nID); };[/code] ***************CmEdit.Cpp********** [code] CString CmEdit::CmGetDlgItem(int nID) { CString Str; GetDlgItem(nID)->GetWindowTextW(Str); return Str; }[/code] <<<<<<<<<<<<Static Exe>>>>>>>>>>>>> [code] #pragma comment(lib,"Dll.lib") #include "CmEdit.h" void SocialSecurityData::OnBnClickedOk() { CmEdit d; CString … |
|
Ask a problem,about template:) i write template class <<<<<<<<<class.h>>>>>>>> #pragma once template <class T> class Tem { public: T rxg(T a); }; <<<<<<<<<class.Cpp>>>>>>>> #include "stdafx.h" #include "class.h" template<class T>T Tem<T>::rxg(T a) { return a; } <<<<<<<<<<<Dialog.Cpp>>>>>>>>> #include "Class.h" ................................ Tem<int> moral; int a=moral.rxg(10); Error: Test.obj : error LNK2019: unresolved external … |
|
Ask a problem,about inheritance :) [CODE] ****************static DLL***************** <<<<<<<<<CmView.H>>>>>>>>>>> #pragma once class AFX_NOVTABLE CmView : public CView { public: __declspec(dllexport) CmView(); }; <<<<<<<<<CmView.CPP>>>>>>>> #include "stdafx.h" #include "CmView.h" CmView::CmView() { } ******************static EXE****************** <<<<<<<<EXEView.h>>>>>>>>> #pragma once #include "CmView.h" #pragma comment(lib,"dll.lib") class EXEView : public CmView { ........... }; <<<<<<<<<EXEView.Cpp>>>>>>>>> #include "stdafx.h" … |