Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.2 KiB

  1. #include "RightBottomView.h"
  2. #include "resource.h"
  3. #include "ResourceString.h"
  4. IMPLEMENT_DYNCREATE( RightBottomView, CEditView )
  5. RightBottomView::RightBottomView()
  6. {
  7. }
  8. Document*
  9. RightBottomView::GetDocument()
  10. {
  11. return ( Document *) m_pDocument;
  12. }
  13. BOOL RightBottomView::PreCreateWindow( CREATESTRUCT& cs )
  14. {
  15. return CEditView::PreCreateWindow( cs );
  16. }
  17. void
  18. RightBottomView::OnInitialUpdate()
  19. {
  20. #if 1
  21. // get present style.
  22. LONG presentStyle;
  23. presentStyle = GetWindowLong( m_hWnd, GWL_STYLE );
  24. // Set the last error to zero to avoid confusion.
  25. // See sdk for SetWindowLong.
  26. SetLastError(0);
  27. // set new style.
  28. // this edit control has a caption and is readonly.
  29. SetWindowLong( m_hWnd,
  30. GWL_STYLE,
  31. // presentStyle | WS_CAPTION | ES_READONLY );
  32. presentStyle | WS_CAPTION );
  33. // change caption
  34. _bstr_t title = GETRESOURCEIDSTRING( IDS_BOTTOM_PANE_TITLE );
  35. SetWindowText( title );
  36. #endif
  37. // we will register
  38. // with the document class,
  39. // as we are the status pane
  40. // and status is reported via us.
  41. GetDocument()->registerStatusPane( this );
  42. }