【正文】
adStandardCursor ( IDC_ARROW ) 。 return 0 。}void myedit::OnLButtonDown ( UINT flags, CPoint pt ){}void myedit::OnMouseMove ( UINT flags, CPoint pt ){ SetCursor ( m_cur ) 。} class myedit : public CEdit { private : HCURSOR m_cur 。 public : int OnCreate ( LPCREATESTRUCT l ) 。 void OnLButtonDown ( UINT flags, CPoint pt ) 。 void OnMouseMove ( UINT flags, CPoint pt ) 。 DECLARE_MESSAGE_MAP( )} 。include include include include include include BEGIN_MESSAGE_MAP ( myframe, CFrameWnd ) ON_WM_CREATE( ) ON_COMMAND ( 1001, myabout ) ON_COMMAND_RANGE ( 1, 10, numbers0to9 ) ON_COMMAND ( 101, back ) ON_COMMAND ( 102, ce ) ON_COMMAND ( 103, c ) ON_COMMAND ( 106, memorycancel ) ON_COMMAND ( 107, divide ) ON_COMMAND ( 108, squareroot ) ON_COMMAND ( 109, memoryrecall ) ON_COMMAND ( 110, multiply ) ON_COMMAND ( 111, percentage ) ON_COMMAND ( 112, memorystore ) ON_COMMAND ( 113, minus ) ON_COMMAND ( 114, onebyx ) ON_COMMAND ( 115, memoryplus ) ON_COMMAND ( 117, plusminus ) ON_COMMAND ( 118, point ) ON_COMMAND ( 119, plus ) ON_COMMAND ( 120, equalto ) ON_WM_PARENTNOTIFY( ) ON_WM_KEYDOWN( )END_MESSAGE_MAP()CString myframe::m_helpstrings[] = { No help topic is associated with this item., Delete the last digit of the displayed number., Clears the displayed number., Clears the current calculation., , , Clears any number stored in memory., Puts this number in the calculator display., Puts this number in the calculator display., Puts this number in the calculator display., Divdes., Calculates the square root of the displayed number., Recalls the number stored in memory. The number remains in the memory., Puts this number in the calculator display., Puts this number in the calculator display., Puts this number in the calculator display., Multiplies., Displays the result of the multiplication as percentage., Stores the displayed number in the memory., Puts this number in the calculator display., Puts this number in the calculator display., Puts this number in the calculator display., Subracts., Calculates the reciprocal of the displayed number., Adds the displayed number to any number already in memory., Puts this number in the calculator display., Changes the sign of the displayed number., Inserts a decimal point., Adds., Performs any operation on the previous two numbers. To repeat he last operation click again. } 。 myframe::myframe( ){ CString mywindowclass 。 CBrush mybrush 。 ( LTGRAY_BRUSH ) 。 mywindowclass = AfxRegisterWndClass ( CS_HREDRAW | CS_VREDRAW, AfxGetApp( ) LoadStandardCursor ( IDC_ARROW ), mybrush, AfxGetApp( ) LoadIcon ( IDI_ICON1 ) ) 。 Create ( mywindowclass, Calculator, WS_SYSMENU | WS_MINIMIZEBOX, CRect ( 100, 100, 400, 400 ), 0, MAKEINTRESOURCE ( IDR_MENU1 ) ) 。}BOOL myframe::PreCreateWindow ( CREATESTRUCTamp。 cs ) { CFrameWnd::PreCreateWindow ( cs ) 。 amp。= ~WS_EX_CLIENTEDGE 。 return TRUE 。}int myframe::OnCreate ( LPCREATESTRUCT l ){ CFrameWnd::OnCreate ( l ) 。 struct buttoninfo { char m_str[5] 。 int id 。 } 。 buttoninfo m[30] = { , 100, Back, 101, CE, 102, C, 103, , 104,