Click here to Skip to main content
15,887,585 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: keyboard constants Pin
PJ Arends2-Aug-03 18:28
professionalPJ Arends2-Aug-03 18:28 
Generalvectors. Pin
WREY2-Aug-03 10:46
WREY2-Aug-03 10:46 
GeneralRe: vectors. Pin
Christian Graus2-Aug-03 11:14
protectorChristian Graus2-Aug-03 11:14 
GeneralRe: vectors. Pin
WREY2-Aug-03 13:00
WREY2-Aug-03 13:00 
GeneralProcess Start time Pin
kurnaziso2-Aug-03 10:12
kurnaziso2-Aug-03 10:12 
GeneralRe: Process Start time Pin
Chris Richardson2-Aug-03 12:03
Chris Richardson2-Aug-03 12:03 
Generalmodem speed Pin
locoone2-Aug-03 9:41
locoone2-Aug-03 9:41 
QuestionClose MDI Child Window Fail ??? Pin
_skidrow_vn_2-Aug-03 8:45
_skidrow_vn_2-Aug-03 8:45 
in my MDI app.......I inserted a CRecordView-base Class named CLogin
when I input my ID and my Password .... I want this form disappear but when
app run to this line
GetDocument()->OnCloseDocument();
Login Form is hide and a Error MessageBox show
Unhandled exception in QLBH.exe (MFCD42D.DLL): 0xC0000005: Access Violation.
and cursor point to this line in DBCORE.CPP like following:

BOOL CRecordset::IsOpen() const
	// Note: assumes base class CRecordset::Close called
{
	if (m_hstmt == NULL)     // Error in this line //
		return FALSE;
.....
}

I tried use:
SendMessage(WM_CLOSE) or SC_CLOSE
or GetParentFrame()->SendMessage(WM_CLOSE);
but no result
help me
thank




<code>
void CLogin::OnOk() 
{
	// TODO: Add your control notification handler code here
	CString	strID,strPass;

	m_editID.GetWindowText(strID);
	m_editPass.GetWindowText(strPass);

	m_pSet->MoveFirst ();
	while(!m_pSet->IsEOF())
	{
		if(!strID.Compare(m_pSet->m_ID))
		{
			if (!strPass.Compare(m_pSet->m_Pass))
				AfxMessageBox("ok");
			else
				AfxMessageBox("wrong");

			GetDocument()->OnCloseDocument(); //Error//:eek:
			//GetParentFrame()->SendMessage(WM_CLOSE); // error //:eek:
		}
		
		m_pSet->MoveNext();
	}
	
}</code> 

Questionwhat files to distribute with my MFC app? Pin
mcguile2572-Aug-03 8:16
mcguile2572-Aug-03 8:16 
AnswerRe: what files to distribute with my MFC app? Pin
Michael Dunn2-Aug-03 9:19
sitebuilderMichael Dunn2-Aug-03 9:19 
Generalstill doesn't work Pin
mcguile2572-Aug-03 11:23
mcguile2572-Aug-03 11:23 
GeneralRe: still doesn't work Pin
Christian Graus2-Aug-03 13:03
protectorChristian Graus2-Aug-03 13:03 
GeneralRe: still doesn't work Pin
mcguile2572-Aug-03 14:49
mcguile2572-Aug-03 14:49 
GeneralRe: still doesn't work Pin
Anders Molin3-Aug-03 7:31
professionalAnders Molin3-Aug-03 7:31 
GeneralRe: still doesn't work Pin
Christian Graus3-Aug-03 11:55
protectorChristian Graus3-Aug-03 11:55 
GeneralRe: still doesn't work Pin
Anders Molin3-Aug-03 12:43
professionalAnders Molin3-Aug-03 12:43 
GeneralRe: still doesn't work Pin
Christian Graus3-Aug-03 13:00
protectorChristian Graus3-Aug-03 13:00 
GeneralRe: still doesn't work Pin
Anders Molin3-Aug-03 13:06
professionalAnders Molin3-Aug-03 13:06 
GeneralRe: still doesn't work Pin
Christian Graus3-Aug-03 13:11
protectorChristian Graus3-Aug-03 13:11 
GeneralRe: still doesn't work Pin
Anders Molin3-Aug-03 13:16
professionalAnders Molin3-Aug-03 13:16 
GeneralRe: still doesn't work Pin
Christian Graus3-Aug-03 13:22
protectorChristian Graus3-Aug-03 13:22 
GeneralRe: still doesn't work Pin
Anders Molin3-Aug-03 13:29
professionalAnders Molin3-Aug-03 13:29 
GeneralRe: still doesn't work Pin
Marc Clifton3-Aug-03 14:12
mvaMarc Clifton3-Aug-03 14:12 
AnswerRe: what files to distribute with my MFC app? Pin
vcplusplus3-Aug-03 5:31
vcplusplus3-Aug-03 5:31 
AnswerRe: what files to distribute with my MFC app? Pin
Marc Clifton3-Aug-03 14:13
mvaMarc Clifton3-Aug-03 14:13 

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.