我考了一些别人的代码,只是单纯一一加入它们的.cpp和.h文件别的没做,但我不知道做什么?

解决方案 »

  1.   

    好的
    // binview.cpp : implementation file
    // #include "stdafx.h"                
    #include "sj5mem.h"
    #include "bindoc.h"                                    
    #include "binview.h"
    #include "stdlib.h" 
    #include "time.h"                          
    #include "modeless.h"#ifdef _DEBUG
    #undef THIS_FILE
    static char BASED_CODE THIS_FILE[] = __FILE__;
    #endifchar mesg[256];
    /////////////////////////////////////////////////////////////////////////////
    // CBinViewIMPLEMENT_DYNCREATE(CBinView, CScrollView)CBinView::CBinView()
    {
    LOGFONT logfont;
    memset(&logfont, 0, sizeof(logfont)); logfont.lfHeight =-5;
    logfont.lfWidth=5;
    static char BASED_CODE szFaceName[] = "MS Scans Serif";
    lstrcpy(logfont.lfFaceName, szFaceName); ASSERT(m_Font.CreateFontIndirect(&logfont));
    // m_dwStartLine = 0;
    // m_dwTotalLine = 0;     
    // m_nStartPos=0;                                
    // m_dwCurLine=0;
    // m_bsearch=FALSE;
        m_lTotalength=0;
        m_lCurPos=0;                      
        m_nPageSize=512;
        searchnum=0;       
        StopWait=FALSE;         
    }CBinView::~CBinView()
    {
    }
    BEGIN_MESSAGE_MAP(CBinView, CScrollView)
    //{{AFX_MSG_MAP(CBinView)
    ON_COMMAND(ID_FILE_PRINT, OnFilePrint)
    ON_COMMAND(ID_FILE_PRINT_PREVIEW, OnFilePrintPreview)
    ON_WM_VSCROLL()
    ON_COMMAND(ID_EDIT_SEARCH, OnEditSearch)
    ON_WM_KEYDOWN()
    ON_COMMAND(ID_EDIT_DOWN, OnEditDown)
    ON_COMMAND(ID_EDIT_UP, OnEditUp)
    ON_COMMAND(ID_VIEW_PAGE, OnViewPage)
    ON_COMMAND(ID_PAGE_DOWN, OnPageDown)
    ON_COMMAND(ID_PAGE_UP, OnPageUp)
    ON_WM_LBUTTONDOWN()
    //}}AFX_MSG_MAP
    ON_MESSAGE(ID_EXITWAIT,OnExitWait)
    END_MESSAGE_MAP()/////////////////////////////////////////////////////////////////////////////
    // CBinView drawing
                                                         
    LONG CBinView::OnExitWait(UINT wParam,LONG lParam)                                                     
    {
    StopWait=TRUE;                   
    return 0L;
    }
                                                         
    void CBinView::OnInitialUpdate()
    {
    CScrollView::OnInitialUpdate();

        m_sScrollSize=GetTotalSize();
        m_pDoc = GetDocument();
      length = m_pDoc->GetDocLength();
      pFile=(CFile*)m_pDoc->GetCFileP();
    m_sScrollSize.cy=YSCROLL;
    ASSERT(m_sScrollSize.cx >= 0 && m_sScrollSize.cy >= 0);
    //    m_dwTotalLine = length/20+1;
         m_lTotalength=length; SetScrollSizes(MM_TEXT, m_sScrollSize);
        SetScrollRange(SB_VERT,0,m_sScrollSize.cy);
    }void CBinView::OnDraw(CDC* pDC)
    {
            char text[30];
            
            pDC->SelectObject(&m_Font);
            CStatusBar *pStatus=(CStatusBar*)
                 AfxGetApp()->m_pMainWnd->GetDescendantWindow(ID_STATUS_BAR);
            if(pStatus){
               wsprintf(text,"Ò³³¤=%d",m_nPageSize);
               pStatus->SetPaneText(1,text);
               wsprintf(text,"µ±Ç°Î»Öãº%ld",m_lCurPos);
               pStatus->SetPaneText(2,text);
               wsprintf(text,"Îļþ×ܳ¤£º%ld",m_lTotalength);
               pStatus->SetPaneText(3,text);         
               }
            Drawdata();
    }void  CBinView::Drawdata()
    {
            long int       shift=0; 
            int                  num;   
            char        temp[255];        CClientDC pDC(this);
            int m_nScrollPos;            
            int Tab[10]; 
            if(m_lTotalength==0)return;
            
            Tab[0]=60;                                           
            m_nScrollPos=(int)(YSCROLL*(float)m_lCurPos/m_lTotalength);
            SetScrollPos(SB_VERT,m_nScrollPos); 
            for(int i = 0 ; i < 27; ++ i)
                      {
                     shift = m_lCurPos+i*20;
                      if( (length) > (shift + 21))
                         {
                          num = 20;
                          MyTransData(shift , num , temp);
                          pDC.TabbedTextOut(5,i*13,temp,strlen(temp),1,Tab,10);  
                          }
                        else
                         {
                          num = (int)(m_lTotalength-shift) ;
                          MyTransData(shift , num , temp);
                         pDC.TabbedTextOut(5,i*13,temp,strlen(temp),1,Tab,10);  
                          break;
                         }   
                     }                                                                                
    /*                 
               if(m_bsearch){
                      CRect m_rInvRect;
                      m_rInvRect.left=(m_nStartPos/2-1)*60+5;
                      m_rInvRect.right=(m_nStartPos/2-1)*60+43;
                      m_rInvRect.top=(int)(m_dwCurLine-m_dwStartLine)*18;
                      m_rInvRect.bottom=(int)(m_dwCurLine-m_dwStartLine+1)*18;
                      pDC.InvertRect(m_rInvRect);
                      }
    */                  
    }void  CBinView::MyTransData(long int shift,int num, LPSTR temp)
    {
     int    i;
     char   string[80];
     char   array[255];
            
            lstrcpy(temp,"");
            if(num>=num && sizeof(array)>=num)
                    {
                    pFile->Seek(shift,CFile::begin);
                    pFile->Read(array,num);
                    for(i=0;i<num/2;++i)
                     {
                     wsprintf(string,"%02X%02X\t",(unsigned char)array[2*i],
                                     (unsigned char)array[2*i+1]);
                     lstrcat(temp,string); 
                     }
                    if(num%2==1) 
                     {
                     wsprintf(string,"%02X   \t",(unsigned char)array[2*i]);
                     lstrcat(temp,string);
                     }
                    }
    }                       
    BOOL CBinView::OnPreparePrinting(CPrintInfo* pInfo)
    {               
        _strdate( dbuffer );
        _strtime( tbuffer );
        //pInfo->SetMaxPage((int)(length/600+1));
        //modified at 1996,3,17 liu                            
        pInfo->SetMaxPage((int)((length-m_lCurPos)/m_nPageSize)+1);
    return DoPreparePrinting(pInfo);
    }/////////////////////////////////////////////////////////////////////////////
    // CBinView message handlers
    void CBinView::OnFilePrint()
    {
    if(m_nPageSize>720)
    {
        ::MessageBeep(-1);
        ::MessageBox(NULL, "&Ograve;&sup3;&sup3;¤&Igrave;&laquo;&acute;ó&pound;&not;&Icirc;&THORN;·¨&acute;ò&Oacute;&iexcl;, &Ccedil;&euml;&Ouml;&Oslash;&ETH;&Acirc;&Eacute;è&Ouml;&Atilde;&Ograve;&sup3;&sup3;¤", "&Igrave;á&Ecirc;&frac34;",
                     MB_ICONINFORMATION | MB_OK);
    return;
    }
    CView::OnFilePrint();
    }void CBinView::OnFilePrintPreview()
    {                                                                      
    if(m_nPageSize>720)
    {
        ::MessageBeep(-1);
        ::MessageBox(NULL, "&Ograve;&sup3;&sup3;¤&Igrave;&laquo;&acute;ó&pound;&not;&Icirc;&THORN;·¨&Ocirc;¤&Iuml;&Ocirc;, &Ccedil;&euml;&Ouml;&Oslash;&ETH;&Acirc;&Eacute;è&Ouml;&Atilde;&Ograve;&sup3;&sup3;¤", "&Igrave;á&Ecirc;&frac34;",
                     MB_ICONINFORMATION | MB_OK);
    return;
    }
    CView::OnFilePrintPreview();
    }void CBinView::OnPrint(CDC* pDC,CPrintInfo* pInfo)
    {
                                                   
       TEXTMETRIC  textmetric;
       char        temp[255];
       long int       shift=0;
       LPSTR  lpBinHdr=0;
       int         nDrawX,nDrawY;   
       CString     ftitle;
       
       char   npage[20];   
           char tmpbuff[80];
         int    nCoody ;
       int    num = 0;              
       int    i;
                                                
         BeginWaitCursor(); 
         ftitle=m_pDoc->GetTitle();
    pDC->GetTextMetrics((LPTEXTMETRIC)&textmetric);

    nDrawX = 4 * textmetric.tmAveCharWidth;
    nDrawY = 2 * (textmetric.tmExternalLeading + textmetric.tmHeight);
     
    nCoody = nDrawY;

    shift= (pInfo->m_nCurPage-1)*m_nPageSize+m_lCurPos;

    pDC->TextOut(nDrawX,0,ftitle); 

    long int writebyte=min(length-shift,(long int)m_nPageSize);
    int shang,yushu;
    shang= (int)writebyte/20;
    yushu  = (int)writebyte%20;

            for(i=0;i<shang;i++)
            { 
                num = 20;
                MyTransData( shift , num , temp);
                shift += 20;
                nCoody += 25+(textmetric.tmExternalLeading + textmetric.tmHeight) ;
                pDC->TabbedTextOut(nDrawX,nCoody,temp,strlen(temp),0,NULL,nDrawX);  
                }              MyTransData( shift , yushu , temp);
           nCoody += 25+(textmetric.tmExternalLeading + textmetric.tmHeight) ;
           pDC->TabbedTextOut(nDrawX,nCoody,temp,strlen(temp),0,NULL,nDrawX);  
           
    nDrawY=pDC->GetDeviceCaps(VERTRES)-50;
           wsprintf(tmpbuff,"&Icirc;&Auml;&frac14;&thorn;×&Uuml;&sup3;¤&pound;&ordm;%ld                  ±&frac34;&Ograve;&sup3;&AElig;&eth;&Ecirc;&frac14;&Icirc;&raquo;&Ouml;&Atilde;&pound;&ordm;%ld",length,(pInfo->m_nCurPage-1)*m_nPageSize+m_lCurPos);
           pDC->TextOut(nDrawX,nDrawY-50,tmpbuff); wsprintf(npage,"&micro;&Uacute;%d&Ograve;&sup3;",pInfo->m_nCurPage);  
    pDC->TextOut(nDrawX,nDrawY,npage); pDC->TextOut(nDrawX+200,nDrawY,"&acute;ò&Oacute;&iexcl;&Egrave;&Otilde;&AElig;&Uacute;");
    pDC->TextOut(nDrawX+450,nDrawY,dbuffer);
    pDC->TextOut(nDrawX+700,nDrawY,"&acute;ò&Oacute;&iexcl;&Ecirc;±&frac14;&auml;");
    pDC->TextOut(nDrawX+950,nDrawY,tbuffer);
         EndWaitCursor();
    }void CBinView::OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
    {
    // TODO: Add your message handler code here and/or call default      
    switch(nSBCode) 
    {
    case SB_THUMBPOSITION:
    m_lCurPos=(long int)(((float)nPos/YSCROLL)*m_lTotalength);
    Invalidate();
    break;
    case SB_LINEDOWN:
    m_lCurPos+=20;                                     
    if (m_lCurPos>m_lTotalength)
         m_lCurPos=m_lTotalength;
    Invalidate();
    break;    
    case SB_LINEUP:
    if(m_lCurPos>20)
       m_lCurPos-=20;
    else 
       m_lCurPos=0;     
    Invalidate();
    break;                                 
    case SB_PAGEDOWN:
                m_lCurPos+=m_nPageSize;
                if(m_lCurPos>m_lTotalength)
                    m_lCurPos=m_lTotalength;
    Invalidate();
    break;
    case SB_PAGEUP:
    if(m_lCurPos>m_nPageSize)
         m_lCurPos-=m_nPageSize;                     
                else
                     m_lCurPos=0;
    Invalidate();                                  
    break;                                      
    default:
    break;
    }  
    }                                                   
     
    unsigned char  CBinView::change(unsigned char hight ,unsigned char low)
    {
    unsigned h,l;if   (hight>='0' && hight<='9')h=hight-'0';
    else if(hight>='a' && hight<='f')h=hight-'a'+10;
    else if(hight>='A' && hight<='F')h=hight-'A'+10;
    if   (low>='0' && low<='9')l=low-'0';
    else if(low>='a' && low<='f')l=low-'a'+10;
    else if(low>='A' && low<='F')l=low-'A'+10;return(h*16+l);
    }
    int  CBinView::isxdigit(unsigned char i)                   
    {
    if(i>='0' && i<='9')return 1;
    if(i>='a' && i<='f')return 1;
    if(i>='A' && i<='F')return 1;
    return 0;
    }
                        
    BOOL CBinView::changesearch()
    {   
    int i;
    int k=1;                
    if(searchnum%2==1)return FALSE;                        
    for(i=0;i<searchnum && k==1;i++)
    { k=isxdigit(searchstr[i]); }
    if(k==0) return FALSE;
    int num=searchnum/2;
    for(i=0;i<num;i++)
    find[i]=change(searchstr[i*2],searchstr[i*2+1]);
    return TRUE;
    }  void CBinView::OnEditSearch()
    {
    // TODO: Add your command handler code here
        if(SearchDlg.DoModal()==IDOK) {
              if(SearchDlg.m_nSelect==1)
               { 
        lstrcpy(searchstr,"");
             strcat(searchstr,SearchDlg.m_sSearchText);          
    searchnum=SearchDlg.m_sSearchText.GetLength();
    if(changesearch()==-FALSE)
    {
                    ::MessageBeep(-1);
                    ::MessageBox(NULL, "&Ecirc;&auml;&Egrave;&euml;×&Ouml;·&ucirc;&Oacute;&ETH;&Icirc;ó, &Icirc;&THORN;·¨&sup2;é&Otilde;&Ograve;", "&Igrave;á&Ecirc;&frac34;",
                                 MB_ICONINFORMATION | MB_OK); }
    else
    {
    if(SearchDlg.m_nDirection==1)
                 { SearchDown(); }
                 if(SearchDlg.m_nDirection==0) 
                 { SearchUp();      }
                 }
                }
              if(SearchDlg.m_nSelect==0) 
               {Location();}
              }         
    }            void CBinView::SearchDown()
    {                             
    if(searchnum==0)
    {
        ::MessageBeep(-1);
        ::MessageBox(NULL, "&Atilde;&raquo;&Oacute;&ETH;&Otilde;&Ograve;&micro;&frac12;&cedil;&Atilde;×&Ouml;·&ucirc;", "&Igrave;á&Ecirc;&frac34;",
                     MB_ICONINFORMATION | MB_OK);
    return;
    }          
    CModeless  *waitbox;                                                     
    waitbox=new CModeless(this);
    waitbox->Create("&Otilde;&yacute;&Ocirc;&Uacute;&frac12;&oslash;&ETH;&ETH;&sup2;é&Otilde;&Ograve;&pound;&not;&Ccedil;&euml;&micro;&Egrave;&acute;&yacute;"); 
    m_bsearch=FALSE;
    //BeginWaitCursor();                     
    unsigned char buf[1500];
    long int shang,yushu;
    long int i,j,k,m;
    long int lastlength=length-m_lCurPos;
    MSG Message;
    if((lastlength)<=1500)
    {shang=0;yushu=lastlength;}
    else
    {
    shang=(lastlength-500)/1000;
    yushu=(lastlength-500)%1000+500;
    }                                          
    for( i=0;i<shang&&StopWait==FALSE;i++)
        {
    if(::PeekMessage(&Message,NULL,0,0,PM_REMOVE))
    {
    ::TranslateMessage(&Message);
    ::DispatchMessage(&Message);
    }
    waitbox->SetBar((int)(i*100/shang));    
        pFile->Seek((long int)i*1000+m_lCurPos+1,CFile::begin);
        pFile->Read(buf,1500);
        for( j=0;j<1300;j++)
         if(buf[j]==find[0])
         {      
                m=0;
         for( k=0;k<searchnum/2&&StopWait==FALSE;k++)
         if(buf[j+k]==find[k])m++;
         if(m==searchnum/2)
         {
         m_lCurPos=m_lCurPos+1+(long int)i*1000+j;
    m_bsearch=TRUE;
             Invalidate();
             break;
             }
         }                                                      
        if(m_bsearch==TRUE)break;
        }    
    if(m_bsearch==TRUE)
    {                                                               
    waitbox->DestroyWindow();    
    StopWait=FALSE;
    return;    
    }
    pFile->Seek((long int)shang*1000+m_lCurPos+1,CFile::begin);
    pFile->Read(buf,(int)yushu);
    for( j=0;j<yushu-searchnum/2&&StopWait==FALSE;j++)
        if(buf[j]==find[0])
        {                                
         m=0;
        for( k=0;k<searchnum/2;k++)
        if(buf[j+k]==find[k])m++;
        if(m==searchnum/2)
        {
        m_lCurPos=m_lCurPos+1+(long int)shang*1000+j;
    m_bsearch=TRUE;
            Invalidate();
            break;
            }
        }    //EndWaitCursor();        
    waitbox->DestroyWindow();    
    StopWait=FALSE;
    if(!m_bsearch)
       {
               ::MessageBeep(-1);
               ::MessageBox(NULL, "&Atilde;&raquo;&Oacute;&ETH;&Otilde;&Ograve;&micro;&frac12;&cedil;&Atilde;×&Ouml;·&ucirc;", "&Igrave;á&Ecirc;&frac34;",
                            MB_ICONINFORMATION | MB_OK);           }     
    }void  CBinView::SearchUp()
    {                     
    unsigned char buf[1500];
    long int tmppos;
    long int shang,yushu;
    long int i,j,k,m;
    long int lastlength=m_lCurPos;
    MSG Message;
    m_bsearch=FALSE;
    if(searchnum==0)
    {
        ::MessageBeep(-1);
        ::MessageBox(NULL, "&Atilde;&raquo;&Oacute;&ETH;&Otilde;&Ograve;&micro;&frac12;&cedil;&Atilde;×&Ouml;·&ucirc;", "&Igrave;á&Ecirc;&frac34;",
                     MB_ICONINFORMATION | MB_OK);
    return;
    }  CModeless  *waitbox;                                                     
    waitbox=new CModeless(this);
    waitbox->Create("&Otilde;&yacute;&Ocirc;&Uacute;&frac12;&oslash;&ETH;&ETH;&sup2;é&Otilde;&Ograve;&pound;&not;&Ccedil;&euml;&micro;&Egrave;&acute;&yacute;"); //BeginWaitCursor();                     
    if((lastlength)<=1500)
    {shang=0;yushu=lastlength;}
    else
    {
    shang=(lastlength-500)/1000;
    yushu=(lastlength-500)%1000+500;
    }               for(i=0;i<shang && StopWait==FALSE;i++)
        { 
    if(::PeekMessage(&Message,NULL,0,0,PM_REMOVE))
    {
    ::TranslateMessage(&Message);
    ::DispatchMessage(&Message);
    }
    waitbox->SetBar((int)(i*100/shang));        pFile->Seek((long int)i*1000,CFile::begin);
        pFile->Read(buf,1500);
        for( j=0;j<1300;j++)
         if(buf[j]==find[0])
         {                                
          m=0;
         for( k=0;k<searchnum/2&&StopWait==FALSE;k++)
         if(buf[j+k]==find[k])m++;
         if(m==searchnum/2)
         {
         tmppos=(long int)i*1000+j;
    m_bsearch=TRUE;
             }
         }                                                      
        }                        if(StopWait!=FALSE)
    {
        ::MessageBeep(-1);
        ::MessageBox(NULL, "&Atilde;&raquo;&Oacute;&ETH;&Otilde;&Ograve;&micro;&frac12;&cedil;&Atilde;×&Ouml;·&ucirc;","&Igrave;á&Ecirc;&frac34;",
                   MB_ICONINFORMATION | MB_OK);
    return;
        }pFile->Seek((long int)shang*1000,CFile::begin);
    pFile->Read(buf,(int)yushu);
    for( j=0;j<yushu-searchnum/2;j++)
        if(buf[j]==find[0])
        {                                
         m=0;
        for( k=0;k<searchnum/2;k++)
        if(buf[j+k]==find[k])m++;
        if(m==searchnum/2)
        {
        tmppos=(long int)shang*1000+j;
    m_bsearch=TRUE;
            }
        }    
    //EndWaitCursor();        
    waitbox->DestroyWindow();    
    StopWait=FALSE;if(!m_bsearch)
    {
        ::MessageBeep(-1);
        ::MessageBox(NULL, "&Atilde;&raquo;&Oacute;&ETH;&Otilde;&Ograve;&micro;&frac12;&cedil;&Atilde;×&Ouml;·&ucirc;", "&Igrave;á&Ecirc;&frac34;",
                     MB_ICONINFORMATION | MB_OK);
        }
    else
    {
    m_lCurPos=tmppos;    
    Invalidate();
    }       

                  
    void CBinView::Location()
    {
        long int  pos;
        m_bsearch=TRUE;
        pos=atol(SearchDlg.m_sSearchText);
        m_lCurPos=pos;
        if(m_lCurPos>m_lTotalength)
             m_lCurPos=m_lTotalength;
        if(m_lCurPos<0)
             m_lCurPos=0;
        Invalidate();
    } //#define VK_UP        38
    //#define VK_DOWN      40
    #define VK_PAGEUP      33
    #define VK_PAGEDOWN    34
    //#define VK_HOME      36
    //#define VK_END       35void CBinView::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
    {
    // TODO: Add your message handler code here and/or call default
    switch (nChar)
            {
    case VK_PAGEUP:
                if(m_lCurPos>m_nPageSize)
                 {
                    m_lCurPos-=m_nPageSize;
                Invalidate();
                    }
                else  if(m_lCurPos==0)
                 MessageBeep(-1);
                else
                 {
                    m_lCurPos=0;
                Invalidate();
                 }
    break; case VK_PAGEDOWN:
                if(m_lCurPos<m_lTotalength-m_nPageSize)
                 {
                 m_lCurPos+=m_nPageSize;
                 Invalidate();
                 }
                else MessageBeep(-1);
    break; case VK_UP:
    if(m_lCurPos==0) 
    MessageBeep(-1);
                else 
                 {
                 if(m_lCurPos>20)
                        m_lCurPos-=20;
                 else
                      m_lCurPos=0;
                 Invalidate();
                 }
    break; case VK_DOWN:
    if(m_lCurPos==m_lTotalength)
    MessageBeep(-1);
    else
    {
    m_lCurPos+=20;
    if(m_lCurPos>m_lTotalength)
                     m_lCurPos=m_lTotalength;
                 Invalidate();
                 }
    break;
        case VK_HOME:
            if(m_lCurPos==0)MessageBeep(-1);
            else
             {
             m_lCurPos=0;
             Invalidate();
             }
            break;
        case VK_END:
                if(m_lCurPos==m_lTotalength)MessageBeep(-1);
                else
                 {
                 m_lCurPos=m_lTotalength;
                 Invalidate();
                 }
            break;                                    
        case VK_LEFT:
         if(m_lCurPos==0)MessageBeep(-1);
         else 
         {
         m_lCurPos--;
         Invalidate();
         }
            break;
        case VK_RIGHT:
                if(m_lCurPos==m_lTotalength)MessageBeep(-1);
                else 
                 {
                 m_lCurPos++;
                 Invalidate();
                 }
            break;
            
    } CScrollView::OnKeyDown(nChar, nRepCnt, nFlags);
    }void CBinView::OnEditDown()
    {
    // TODO: Add your command handler code here
    SearchDown();
    }void CBinView::OnEditUp()
    {
    // TODO: Add your command handler code here
     SearchUp();
    }void CBinView::OnViewPage()
    {
            CComboBox *pCombo=(CComboBox*)
                 AfxGetApp()->m_pMainWnd->GetDescendantWindow(IDW_COMBO);
        int index=pCombo->GetCurSel();             
        CString temp;   
        if(index==-1) 
         {
         pCombo->GetWindowText(temp);
         pCombo->InsertString(0,temp);
         pCombo->DeleteString(4); 
         }
        else  
         pCombo->GetLBText(index,temp);      m_nPageSize=atoi(temp);  

    CStatusBar *pStatus=(CStatusBar*)
                 AfxGetApp()->m_pMainWnd->GetDescendantWindow(ID_STATUS_BAR);
            if(pStatus)
               {
               char text[30];
               wsprintf(text,"&Ograve;&sup3;&sup3;¤=%d",m_nPageSize);
               pStatus->SetPaneText(1,text);
               } 

    SetFocus();           
    }/////////////////////////////////////////////////////////////////////////////void CBinView::OnPageDown()
    {
    // TODO: Add your command handler code here 
        if(m_lCurPos<m_lTotalength-m_nPageSize)
    {
     m_lCurPos+=m_nPageSize;
     Invalidate();
     }
    }void CBinView::OnPageUp()
    {
    // TODO: Add your command handler code here 
                if(m_lCurPos>m_nPageSize)
                    m_lCurPos-=m_nPageSize;
                else 
                    m_lCurPos=0;
                Invalidate();

    }void CBinView::OnLButtonDown(UINT nFlags, CPoint point)
    {
    // TODO: Add your message handler code here and/or call default

    CScrollView::OnLButtonDown(nFlags, point); 
        CRect rect;
    GetClientRect(rect);
     if(rect.PtInRect(point)) SetFocus(); }