dbview.cpp 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658
  1. // This is a part of the Microsoft Foundation Classes C++ library.
  2. // Copyright (C) 1992-1998 Microsoft Corporation
  3. // All rights reserved.
  4. //
  5. // This source code is only intended as a supplement to the
  6. // Microsoft Foundation Classes Reference and related
  7. // electronic documentation provided with the library.
  8. // See these sources for detailed information regarding the
  9. // Microsoft Foundation Classes product.
  10. #include "stdafx.h"
  11. #ifdef AFX_DB_SEG
  12. #pragma code_seg(AFX_DB_SEG)
  13. #endif
  14. #ifdef _DEBUG
  15. #undef THIS_FILE
  16. static char THIS_FILE[] = __FILE__;
  17. #endif
  18. #define new DEBUG_NEW
  19. /////////////////////////////////////////////////////////////////////////////
  20. BEGIN_MESSAGE_MAP(CRecordView, CFormView)
  21. //{{AFX_MSG_MAP(CRecordView)
  22. // NOTE - the ClassWizard will add and remove mapping macros here.
  23. //}}AFX_MSG_MAP
  24. ON_COMMAND_EX(ID_RECORD_FIRST, _CallOnMove) // __BORLANDC__ MS-BUG
  25. ON_UPDATE_COMMAND_UI(ID_RECORD_FIRST, OnUpdateRecordFirst)
  26. ON_COMMAND_EX(ID_RECORD_PREV, _CallOnMove) // __BORLANDC__ MS-BUG
  27. ON_UPDATE_COMMAND_UI(ID_RECORD_PREV, OnUpdateRecordPrev)
  28. ON_COMMAND_EX(ID_RECORD_NEXT, _CallOnMove) // __BORLANDC__ MS-BUG
  29. ON_UPDATE_COMMAND_UI(ID_RECORD_NEXT, OnUpdateRecordNext)
  30. ON_COMMAND_EX(ID_RECORD_LAST, _CallOnMove) // __BORLANDC__ MS-BUG
  31. ON_UPDATE_COMMAND_UI(ID_RECORD_LAST, OnUpdateRecordLast)
  32. END_MESSAGE_MAP()
  33. CRecordView::CRecordView(LPCTSTR lpszTemplateName)
  34. : CFormView(lpszTemplateName)
  35. {
  36. }
  37. CRecordView::CRecordView(UINT nIDTemplate)
  38. : CFormView(nIDTemplate)
  39. {
  40. }
  41. CRecordView::~CRecordView()
  42. {
  43. }
  44. void CRecordView::OnInitialUpdate()
  45. {
  46. CRecordset* pRecordset = OnGetRecordset();
  47. // recordset must be allocated already
  48. ASSERT(pRecordset != NULL);
  49. if (!pRecordset->IsOpen())
  50. {
  51. CWaitCursor wait;
  52. pRecordset->Open();
  53. }
  54. CFormView::OnInitialUpdate();
  55. }
  56. BOOL CRecordView::IsOnFirstRecord()
  57. {
  58. ASSERT_VALID(this);
  59. CRecordsetStatus status;
  60. OnGetRecordset()->GetStatus(status);
  61. return status.m_lCurrentRecord == 0;
  62. }
  63. BOOL CRecordView::IsOnLastRecord()
  64. {
  65. ASSERT_VALID(this);
  66. CRecordset* pRecordset = OnGetRecordset();
  67. CRecordsetStatus status;
  68. pRecordset->GetStatus(status);
  69. if (!status.m_bRecordCountFinal)
  70. return FALSE;
  71. return ((status.m_lCurrentRecord+1 == pRecordset->GetRecordCount()));
  72. }
  73. BOOL CRecordView::OnMove(UINT nIDMoveCommand)
  74. {
  75. CRecordset* pSet = OnGetRecordset();
  76. if (pSet->CanUpdate() && !pSet->IsDeleted())
  77. {
  78. pSet->Edit();
  79. if (!UpdateData())
  80. return TRUE;
  81. pSet->Update();
  82. }
  83. switch (nIDMoveCommand)
  84. {
  85. case ID_RECORD_PREV:
  86. pSet->MovePrev();
  87. if (!pSet->IsBOF())
  88. break;
  89. case ID_RECORD_FIRST:
  90. pSet->MoveFirst();
  91. break;
  92. case ID_RECORD_NEXT:
  93. pSet->MoveNext();
  94. if (!pSet->IsEOF())
  95. break;
  96. if (!pSet->CanScroll())
  97. {
  98. // clear out screen since we're sitting on EOF
  99. pSet->SetFieldNull(NULL);
  100. break;
  101. }
  102. case ID_RECORD_LAST:
  103. pSet->MoveLast();
  104. break;
  105. default:
  106. // Unexpected case value
  107. ASSERT(FALSE);
  108. }
  109. // Show results of move operation
  110. UpdateData(FALSE);
  111. return TRUE;
  112. }
  113. void CRecordView::OnUpdateRecordFirst(CCmdUI* pCmdUI)
  114. {
  115. CRecordset* prs = OnGetRecordset();
  116. // enable if opened, can scroll backwards,
  117. pCmdUI->Enable(prs->IsOpen() && prs->CanScroll() &&
  118. // >= 1 records present and not already on first record
  119. !(prs->IsEOF() && prs->IsBOF()) && !IsOnFirstRecord());
  120. }
  121. void CRecordView::OnUpdateRecordPrev(CCmdUI* pCmdUI)
  122. {
  123. CRecordView::OnUpdateRecordFirst(pCmdUI);
  124. }
  125. void CRecordView::OnUpdateRecordNext(CCmdUI* pCmdUI)
  126. {
  127. CRecordset* prs = OnGetRecordset();
  128. // enable if opened and >= 1 records present
  129. pCmdUI->Enable(prs->IsOpen() && !(prs->IsEOF() && prs->IsBOF())
  130. // and not already on last record
  131. && !IsOnLastRecord());
  132. }
  133. void CRecordView::OnUpdateRecordLast(CCmdUI* pCmdUI)
  134. {
  135. CRecordset* prs = OnGetRecordset();
  136. // enable if opened, can scroll,
  137. pCmdUI->Enable(prs->IsOpen() && prs->CanScroll() &&
  138. // >= 1 records present and not already on last record
  139. !(prs->IsEOF() && prs->IsBOF()) && !IsOnLastRecord());
  140. }
  141. /////////////////////////////////////////////////////////////////////////////
  142. // DDX Cover functions for use with fields of a recordset
  143. /////////////////////////////////////////////////////////////////////////////
  144. // Simple field formatting to text item
  145. BOOL AFXAPI AfxFieldText(CDataExchange* pDX, int nIDC, void* pv,
  146. CRecordset* pRecordset)
  147. {
  148. ASSERT_VALID(pRecordset);
  149. HWND hWndCtrl = pDX->PrepareEditCtrl(nIDC);
  150. TCHAR szT[2];
  151. if (pDX->m_bSaveAndValidate)
  152. {
  153. ::GetWindowText(hWndCtrl, szT, _countof(szT));
  154. if (szT[0] == '\0')
  155. {
  156. if (pRecordset->IsFieldNullable(pv))
  157. {
  158. pRecordset->SetFieldNull(pv);
  159. return TRUE;
  160. }
  161. }
  162. else
  163. pRecordset->SetFieldNull(pv, FALSE);
  164. }
  165. else
  166. {
  167. if (!pRecordset->IsOpen() || pRecordset->IsFieldNull(pv))
  168. {
  169. szT[0] = '\0';
  170. AfxSetWindowText(hWndCtrl, szT);
  171. return TRUE;
  172. }
  173. else if (pRecordset->IsDeleted())
  174. {
  175. CString strDeleted(MAKEINTRESOURCE(AFX_IDS_DELETED));
  176. AfxSetWindowText(hWndCtrl, strDeleted);
  177. return TRUE;
  178. }
  179. }
  180. return FALSE;
  181. }
  182. void AFXAPI DDX_FieldText(CDataExchange* pDX, int nIDC, int& value,
  183. CRecordset* pRecordset)
  184. {
  185. if (!AfxFieldText(pDX, nIDC, &value, pRecordset))
  186. DDX_Text(pDX, nIDC, value);
  187. }
  188. void AFXAPI DDX_FieldText(CDataExchange* pDX, int nIDC, BYTE& value,
  189. CRecordset* pRecordset)
  190. {
  191. if (!AfxFieldText(pDX, nIDC, &value, pRecordset))
  192. DDX_Text(pDX, nIDC, value);
  193. }
  194. void AFXAPI DDX_FieldText(CDataExchange* pDX, int nIDC, UINT& value,
  195. CRecordset* pRecordset)
  196. {
  197. if (!AfxFieldText(pDX, nIDC, &value, pRecordset))
  198. DDX_Text(pDX, nIDC, value);
  199. }
  200. void AFXAPI DDX_FieldText(CDataExchange* pDX, int nIDC, long& value,
  201. CRecordset* pRecordset)
  202. {
  203. if (!AfxFieldText(pDX, nIDC, &value, pRecordset))
  204. DDX_Text(pDX, nIDC, value);
  205. }
  206. void AFXAPI DDX_FieldText(CDataExchange* pDX, int nIDC, DWORD& value,
  207. CRecordset* pRecordset)
  208. {
  209. if (!AfxFieldText(pDX, nIDC, &value, pRecordset))
  210. DDX_Text(pDX, nIDC, value);
  211. }
  212. void AFXAPI DDX_FieldText(CDataExchange* pDX, int nIDC, CString& value,
  213. CRecordset* pRecordset)
  214. {
  215. ASSERT_VALID(pRecordset);
  216. HWND hWndCtrl = pDX->PrepareEditCtrl(nIDC);
  217. if (pDX->m_bSaveAndValidate)
  218. {
  219. // check if length is too long (this is complicated by Windows NT/J)
  220. int nLen = ::GetWindowTextLength(hWndCtrl);
  221. if (nLen > value.GetAllocLength())
  222. {
  223. if (!_afxDBCS)
  224. AfxFailMaxChars(pDX, value.GetAllocLength());
  225. CString strTemp;
  226. ::GetWindowText(hWndCtrl, strTemp.GetBuffer(nLen), nLen+1);
  227. strTemp.ReleaseBuffer();
  228. nLen = strTemp.GetLength();
  229. if (nLen > value.GetAllocLength())
  230. AfxFailMaxChars(pDX, value.GetAllocLength());
  231. }
  232. // get known length
  233. ::GetWindowText(hWndCtrl, value.GetBuffer(0), nLen+1);
  234. value.ReleaseBuffer();
  235. if (nLen == 0)
  236. {
  237. if (pRecordset->IsFieldNullable(&value))
  238. pRecordset->SetFieldNull(&value, TRUE);
  239. }
  240. else
  241. {
  242. pRecordset->SetFieldNull(&value, FALSE);
  243. }
  244. }
  245. else if (pRecordset->IsDeleted())
  246. {
  247. CString strDeleted(MAKEINTRESOURCE(AFX_IDS_DELETED));
  248. AfxSetWindowText(hWndCtrl, strDeleted);
  249. }
  250. else
  251. {
  252. AfxSetWindowText(hWndCtrl, value);
  253. }
  254. }
  255. void AFXAPI DDX_FieldText(CDataExchange* pDX, int nIDC, LPTSTR pstrValue,
  256. int nMaxLength, CRecordset* pRecordset)
  257. {
  258. ASSERT_VALID(pRecordset);
  259. HWND hWndCtrl = pDX->PrepareEditCtrl(nIDC);
  260. if (pDX->m_bSaveAndValidate)
  261. {
  262. int nLen = ::GetWindowText(hWndCtrl, pstrValue, nMaxLength);
  263. if (nLen == 0)
  264. {
  265. if (pRecordset->IsFieldNullable(pstrValue))
  266. pRecordset->SetFieldNull(pstrValue, TRUE);
  267. }
  268. else
  269. pRecordset->SetFieldNull(pstrValue, FALSE);
  270. }
  271. else if (pRecordset->IsDeleted())
  272. {
  273. CString strDeleted(MAKEINTRESOURCE(AFX_IDS_DELETED));
  274. AfxSetWindowText(hWndCtrl, strDeleted);
  275. }
  276. else
  277. AfxSetWindowText(hWndCtrl, pstrValue);
  278. }
  279. void AFXAPI DDX_FieldLBString(CDataExchange* pDX, int nIDC, CString& value,
  280. CRecordset* pRecordset)
  281. {
  282. ASSERT_VALID(pRecordset);
  283. HWND hWndCtrl = pDX->PrepareCtrl(nIDC);
  284. if (pDX->m_bSaveAndValidate)
  285. {
  286. int nIndex = (int)::SendMessage(hWndCtrl, LB_GETCURSEL, 0, 0L);
  287. if (nIndex != -1)
  288. {
  289. int nLen = (int)::SendMessage(hWndCtrl, LB_GETTEXTLEN, nIndex, 0L);
  290. if (nLen > value.GetAllocLength())
  291. AfxFailMaxChars(pDX, value.GetAllocLength());
  292. ::SendMessage(hWndCtrl, LB_GETTEXT, nIndex,
  293. (LPARAM)(LPSTR)value.GetBuffer(0));
  294. if (nLen == 0)
  295. {
  296. if (pRecordset->IsFieldNullable(&value))
  297. pRecordset->SetFieldNull(&value, TRUE);
  298. }
  299. else
  300. {
  301. pRecordset->SetFieldNull(&value, FALSE);
  302. }
  303. value.ReleaseBuffer();
  304. }
  305. else
  306. {
  307. // no selection
  308. value.GetBufferSetLength(0);
  309. if (pRecordset->IsFieldNullable(&value))
  310. pRecordset->SetFieldNull(&value);
  311. }
  312. }
  313. else
  314. {
  315. if (!pRecordset->IsOpen() || pRecordset->IsFieldNull(&value))
  316. {
  317. SendMessage(hWndCtrl, LB_SETCURSEL, (WPARAM)-1, 0L);
  318. }
  319. else
  320. {
  321. // set current selection based on data string
  322. if (::SendMessage(hWndCtrl, LB_SELECTSTRING, (WPARAM)-1,
  323. (LPARAM)(LPCTSTR)value) == LB_ERR)
  324. {
  325. // no selection match
  326. TRACE0("Warning: no listbox item selected.\n");
  327. }
  328. }
  329. }
  330. }
  331. void AFXAPI DDX_FieldLBStringExact(CDataExchange* pDX, int nIDC, CString& value,
  332. CRecordset* pRecordset)
  333. {
  334. ASSERT_VALID(pRecordset);
  335. HWND hWndCtrl = pDX->PrepareCtrl(nIDC);
  336. if (pDX->m_bSaveAndValidate)
  337. {
  338. DDX_FieldLBString(pDX, nIDC, value, pRecordset);
  339. }
  340. else
  341. {
  342. if (!pRecordset->IsOpen() || pRecordset->IsFieldNull(&value))
  343. {
  344. SendMessage(hWndCtrl, LB_SETCURSEL, (WPARAM)-1, 0L);
  345. }
  346. else
  347. {
  348. // set current selection based on data string
  349. int i = (int)::SendMessage(hWndCtrl, LB_FINDSTRINGEXACT, (WPARAM)-1,
  350. (LPARAM)(LPCTSTR)value);
  351. if (i < 0)
  352. {
  353. // no selection match
  354. TRACE0("Warning: no listbox item selected.\n");
  355. }
  356. else
  357. {
  358. // select it
  359. SendMessage(hWndCtrl, LB_SETCURSEL, i, 0L);
  360. }
  361. }
  362. }
  363. }
  364. void AFXAPI DDX_FieldLBIndex(CDataExchange* pDX, int nIDC, int& index,
  365. CRecordset* pRecordset)
  366. {
  367. ASSERT_VALID(pRecordset);
  368. if (!pDX->m_bSaveAndValidate &&
  369. (!pRecordset->IsOpen() || pRecordset->IsFieldNull(&index)))
  370. {
  371. int nIndex = 0;
  372. DDX_LBIndex(pDX, nIDC, nIndex);
  373. }
  374. else
  375. DDX_LBIndex(pDX, nIDC, index);
  376. }
  377. void AFXAPI DDX_FieldCBString(CDataExchange* pDX, int nIDC, CString& value,
  378. CRecordset* pRecordset)
  379. {
  380. ASSERT_VALID(pRecordset);
  381. HWND hWndCtrl = pDX->PrepareCtrl(nIDC);
  382. if (pDX->m_bSaveAndValidate)
  383. {
  384. // just get current edit item text (or drop list static)
  385. int nLen = ::GetWindowTextLength(hWndCtrl);
  386. if (nLen != -1)
  387. {
  388. CString strTemp;
  389. ::GetWindowText(hWndCtrl, strTemp.GetBuffer(nLen), nLen+1);
  390. strTemp.ReleaseBuffer();
  391. nLen = strTemp.GetLength();
  392. if (nLen > value.GetAllocLength())
  393. AfxFailMaxChars(pDX, value.GetAllocLength());
  394. // get known length
  395. ::GetWindowText(hWndCtrl, value.GetBuffer(0), nLen+1);
  396. }
  397. else
  398. {
  399. // for drop lists GetWindowTextLength does not work - assume
  400. // preallocated length
  401. ::GetWindowText(hWndCtrl, value.GetBuffer(0), value.GetAllocLength()+1);
  402. }
  403. value.ReleaseBuffer();
  404. if (value.GetLength() == 0)
  405. {
  406. if (pRecordset->IsFieldNullable(&value))
  407. pRecordset->SetFieldNull(&value, TRUE);
  408. }
  409. else
  410. {
  411. pRecordset->SetFieldNull(&value, FALSE);
  412. }
  413. }
  414. else
  415. {
  416. if (!pRecordset->IsOpen() || pRecordset->IsFieldNull(&value))
  417. {
  418. SendMessage(hWndCtrl, CB_SETCURSEL, (WPARAM)-1, 0L);
  419. }
  420. else
  421. {
  422. // set current selection based on model string
  423. if (::SendMessage(hWndCtrl, CB_SELECTSTRING, (WPARAM)-1,
  424. (LPARAM)(LPCTSTR)value) == CB_ERR)
  425. {
  426. // just set the edit text (will be ignored if DROPDOWNLIST)
  427. AfxSetWindowText(hWndCtrl, value);
  428. }
  429. }
  430. }
  431. }
  432. void AFXAPI DDX_FieldCBStringExact(CDataExchange* pDX, int nIDC, CString& value,
  433. CRecordset* pRecordset)
  434. {
  435. ASSERT_VALID(pRecordset);
  436. HWND hWndCtrl = pDX->PrepareCtrl(nIDC);
  437. if (pDX->m_bSaveAndValidate)
  438. {
  439. DDX_FieldCBString(pDX, nIDC, value, pRecordset);
  440. }
  441. else
  442. {
  443. if (!pRecordset->IsOpen() || pRecordset->IsFieldNull(&value))
  444. {
  445. SendMessage(hWndCtrl, CB_SETCURSEL, (WPARAM)-1, 0L);
  446. }
  447. else
  448. {
  449. // set current selection based on data string
  450. int i = (int)::SendMessage(hWndCtrl, CB_FINDSTRINGEXACT, (WPARAM)-1,
  451. (LPARAM)(LPCTSTR)value);
  452. if (i < 0)
  453. {
  454. // no selection match
  455. TRACE0("Warning: no combobox item selected.\n");
  456. }
  457. else
  458. {
  459. // select it
  460. SendMessage(hWndCtrl, CB_SETCURSEL, i, 0L);
  461. }
  462. }
  463. }
  464. }
  465. void AFXAPI DDX_FieldCBIndex(CDataExchange* pDX, int nIDC, int& index,
  466. CRecordset* pRecordset)
  467. {
  468. ASSERT_VALID(pRecordset);
  469. if (!pDX->m_bSaveAndValidate &&
  470. (!pRecordset->IsOpen() || pRecordset->IsFieldNull(&index)))
  471. {
  472. int nIndex = 0;
  473. DDX_CBIndex(pDX, nIDC, nIndex);
  474. }
  475. else
  476. DDX_CBIndex(pDX, nIDC, index);
  477. }
  478. void AFXAPI DDX_FieldScroll(CDataExchange* pDX, int nIDC, int& value,
  479. CRecordset* pRecordset)
  480. {
  481. ASSERT_VALID(pRecordset);
  482. if (!pDX->m_bSaveAndValidate &&
  483. (!pRecordset->IsOpen() || pRecordset->IsFieldNull(&value)))
  484. {
  485. int nValue = 0;
  486. DDX_Scroll(pDX, nIDC, nValue);
  487. }
  488. else
  489. DDX_Scroll(pDX, nIDC, value);
  490. }
  491. /////////////////////////////////////////////////////////////////////////////
  492. // Data exchange for special controls
  493. void AFXAPI DDX_FieldCheck(CDataExchange* pDX, int nIDC, int& value, CRecordset* pRecordset)
  494. {
  495. ASSERT_VALID(pRecordset);
  496. HWND hWndCtrl = pDX->PrepareCtrl(nIDC);
  497. if (pDX->m_bSaveAndValidate)
  498. {
  499. value = (int)::SendMessage(hWndCtrl, BM_GETCHECK, 0, 0L);
  500. ASSERT(value >= 0 && value <= 2);
  501. if (value == 2)
  502. {
  503. if (pRecordset->IsFieldNullable(&value))
  504. pRecordset->SetFieldNull(&value);
  505. else
  506. {
  507. TRACE0("Warning: checkbox value indeterminate and field can't be NULL.\n");
  508. // Default to unchecked
  509. value = 0;
  510. }
  511. }
  512. }
  513. else
  514. {
  515. if (!pRecordset->IsOpen() || pRecordset->IsFieldNull(&value))
  516. {
  517. int style = ((int)::GetWindowLong(hWndCtrl, GWL_STYLE) & 0xf);
  518. if ((style == BS_3STATE || style == BS_AUTO3STATE))
  519. value = 2;
  520. else
  521. {
  522. TRACE0("Warning: field NULL and checkbox can't be indeterminate.\n");
  523. // Default to unchecked
  524. value = 0;
  525. }
  526. }
  527. if (value < 0 || value > 2)
  528. {
  529. value = 0; // default to off
  530. TRACE1("Warning: dialog data checkbox value (%d) out of range.\n",
  531. value);
  532. }
  533. ::SendMessage(hWndCtrl, BM_SETCHECK, (WPARAM)value, 0L);
  534. }
  535. }
  536. void AFXAPI DDX_FieldRadio(CDataExchange* pDX, int nIDC, int& value,
  537. CRecordset* pRecordset)
  538. {
  539. ASSERT_VALID(pRecordset);
  540. if (!pDX->m_bSaveAndValidate &&
  541. (!pRecordset->IsOpen() || pRecordset->IsFieldNull(&value)))
  542. value = -1;
  543. DDX_Radio(pDX, nIDC, value);
  544. if (pDX->m_bSaveAndValidate)
  545. {
  546. if (value == -1 && !pRecordset->IsFieldNullable(&value))
  547. {
  548. AfxFailRadio(pDX);
  549. }
  550. else
  551. {
  552. pRecordset->SetFieldNull(&value, (value == -1));
  553. }
  554. }
  555. }
  556. /////////////////////////////////////////////////////////////////////////////
  557. #ifdef _DEBUG
  558. void CRecordView::AssertValid() const
  559. {
  560. CFormView::AssertValid();
  561. }
  562. void CRecordView::Dump(CDumpContext& dc) const
  563. {
  564. CFormView::Dump(dc);
  565. dc << "m_bOnFirstRecord = " << m_bOnFirstRecord;
  566. dc << "\nm_bOnLastRecord = " << m_bOnLastRecord;
  567. dc << "\n";
  568. }
  569. #endif
  570. //////////////////////////////////////////////////////////////////////////////
  571. // Inline function declarations expanded out-of-line
  572. #ifndef _AFX_ENABLE_INLINES
  573. static char _szAfxDbInl[] = "afxdb.inl";
  574. #undef THIS_FILE
  575. #define THIS_FILE _szAfxDbInl
  576. #define _AFXDBVIEW_INLINE
  577. #include "afxdb.inl"
  578. #endif
  579. #ifdef AFX_INIT_SEG
  580. #pragma code_seg(AFX_INIT_SEG)
  581. #endif
  582. IMPLEMENT_DYNAMIC(CRecordView, CFormView)
  583. /////////////////////////////////////////////////////////////////////////////