mvp_tips/CPUID/CPUID/LogicalAddressLines.cpp
void CLogicalAddressLines::OnPaint()
    {
     CPUregs regs;
     CurrentProcessor.GetCPUID(0x80000000, &regs);
     if(regs.EAX < 0x80000008)
        { /* unknown */
         SetWindowText(_T("32"));
         SetToolTipText(IDS_UNKNOWN_LOGICAL);
        } /* unknown */
     else
        { /* has it */
         CurrentProcessor.GetCPUID(0x80000008, &regs);
         EAX8x EAX;
         EAX.w = regs.EAX;
         CString s;
         s.Format(_T("%d"), EAX.bits.VirtualAddressBits);
         SetToolTipText(IDS_80000008_EAX_VAB);
         SetWindowText(s);
        } /* has it */
     CArrow::OnPaint();
    }
/****************************************************************************
*                        CLogicalAddressLines::OnPaint
* Result: void
*       
* Effect: 
*       Computes the correct number for the logical address lines and
*       calls the superclass OnPaint handler
****************************************************************************/


Computes the correct number for the logical address lines and
calls the superclass OnPaint handler
Computes the correct number for the logical address lines and calls the superclass OnPaint handler
void CLogicalAddressLines::OnPaint()
    {
     CPUregs regs;
     CurrentProcessor.GetCPUID(0x80000000, &regs);
     if(regs.EAX < 0x80000008)
        { 
         SetWindowText(_T("32"));
         SetToolTipText(IDS_UNKNOWN_LOGICAL);
        } 
     else
        { 
         CurrentProcessor.GetCPUID(0x80000008, &regs);
         EAX8x EAX;
         EAX.w = regs.EAX;
         CString s;
         s.Format(_T("%d"), EAX.bits.VirtualAddressBits);
         SetToolTipText(IDS_80000008_EAX_VAB);
         SetWindowText(s);
        } 
     CArrow::OnPaint();
    }
void CLogicalAddressLines :: OnPaint ( ) { CPUregs regs ; CurrentProcessor . GetCPUID ( 0x80000000 , & regs ) ; if ( regs . EAX < 0x80000008 ) { SetWindowText ( _T ( " " ) ) ; SetToolTipText ( IDS_UNKNOWN_LOGICAL ) ; } else { CurrentProcessor . GetCPUID ( 0x80000008 , & regs ) ; EAX8x EAX ; EAX . w = regs . EAX ; CString s ; s . Format ( _T ( " " ) , EAX . bits . VirtualAddressBits ) ; SetToolTipText ( IDS_80000008_EAX_VAB ) ; SetWindowText ( s ) ; } CArrow :: OnPaint ( ) ; }
CLogicalAddressLines::OnPaint
Result: void
CLogicalAddressLines :: OnPaint Result : void
/* unknown */ /* unknown */ /* has it */ /* has it */