Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
H

heavenode

@heavenode
About
Posts
5
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Accessing CRecordSet through dialog class
    H heavenode

    i want to create a login dialog box with username and password details stored in MS Access file. i created a new CRecordSet class : class CPasswordSet : public CRecordset { public: CPasswordSet(CDatabase* pDatabase = NULL); DECLARE_DYNAMIC(CPasswordSet) // Field/Param Data //{{AFX_FIELD(CPasswordSet, CRecordset) long m_ID; CString m_Username; CString m_Password; //}}AFX_FIELD // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CPasswordSet) public: virtual CString GetDefaultConnect(); // Default connection string virtual CString GetDefaultSQL(); // Default SQL for Recordset virtual void DoFieldExchange(CFieldExchange* pFX); // RFX support //}}AFX_VIRTUAL // Implementation #ifdef _DEBUG virtual void AssertValid() const; virtual void Dump(CDumpContext& dc) const; #endif }; and a CDialog class as below with a CPasswordSet public variable m_passwordSet: void CLoginDlg::OnBlogin() { CString str; str = m_passwordSet.m_Username; MessageBox (str); //i get nothing, empty string m_passwordSet.Edit() //get error with this line //debug assertion dbcore.cpp line 1620 } may i know what's wrong??

    C / C++ / MFC c++ database debugging help question

  • Class wizard problem
    H heavenode

    thanks, i found out the problem, it lies inside the constructor. the problem is solved after i removed the 'if section' code. does it mean i cant have an if statement inside constructor??? CTAMADlg::CTAMADlg(CWnd* pParent /*=NULL*/) : CDialog(CTAMADlg::IDD, pParent) { //{{AFX_DATA_INIT(CTAMADlg) m_hDevice = INVALID_HANDLE_VALUE; m_hClose = INVALID_HANDLE_VALUE; m_hClose = CreateEvent (NULL, TRUE, FALSE, NULL); if ( m_hClose == INVALID_HANDLE_VALUE ) { MessageBox("Thread event error!","Error",MB_OK); } //}}AFX_DATA_INIT m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); }

    C / C++ / MFC help json question

  • Class wizard problem
    H heavenode

    I have problem opening the class wizard, as it will show an error message. After clicking ok, i wont be able to add function, variable etc. from the class wizard. error msg: Parsing error: Expected "=" Input Line: "if (m_hCloas == INVALID HANDLE VALUE)" Anyone knows what has gone wrong?

    C / C++ / MFC help json question

  • Problem with serialization
    H heavenode

    Problem solved, there's nothing wrong with the code. actually i have another similar application, it's because the save-filetype (fdb) for both applications are the same, so when i save using the second application, the window uses my first application to open and resulting in 'unexpected file format'.

    C / C++ / MFC c++ database json help question

  • Problem with serialization
    H heavenode

    I'm writing a simple flat file database MFC SDI application. However after i save n close the file, i cant open it again and shows 'unexpected file format'. below is my serialize funcation for the new class, the sequence is correct. What other problem can it be? void CPerson::Serialize(CArchive &ar) { CObject::Serialize(ar); if (ar.IsStoring()) ar << m_sName << m_sRoom << m_iSex << m_iStatus; else ar >> m_sName >> m_sRoom >> m_iSex >> m_iStatus; }

    C / C++ / MFC c++ database json help question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups