Results 1 to 5 of 5

Thread: Visual C++ 6

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User dreamtouch's Avatar
    Join Date: Feb:2008
    Location: Bulgaria
    Posts: 28

    Visual C++ 6

    , -, , MFC , , , , 'textbox' input- ...
    ========================
    FILE *fp;

    if ((fp = fopen("myfile", "r")) ==NULL){
    printf("Error opening file\n");
    exit(1);
    }
    ========================
    , , , ... ,?

  2. #2
    pvn's Avatar
    Join Date: Jan:2006
    Location:
    Posts: 329
    . , , , . - .

    P.S.
    #include <AFXWIN.H>


    class CMainFrame : public CFrameWnd
    {
    public:
    CMainFrame ();

    protected:
    afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
    afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);

    DECLARE_MESSAGE_MAP()
    };

    CMainFrame::CMainFrame()
    {


    Create(NULL, "Windows Application", WS_OVERLAPPEDWINDOW,
    CRect(120, 100, 700, 480), NULL);
    }

    class CExerciseApp: public CWinApp
    {
    public:
    BOOL InitInstance();
    };

    BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
    ON_WM_CREATE()
    ON_WM_KEYDOWN()
    END_MESSAGE_MAP()

    int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
    {
    if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
    return -1;
    return 0;
    }

    void CMainFrame::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
    {
    switch(nChar)
    {
    case VK_RETURN:
    // ....
    break;
    case VK_F1:
    // F1 .....
    break;
    ....................
    default:
    // ...
    }
    }
    OnKeyUP, .
    http://msdn.microsoft.com/en-us/libr...7a(VS.71).aspx
    Last edited by pvn; 13th October 2008 at 13:00.

  3. #3
    Registered User dreamtouch's Avatar
    Join Date: Feb:2008
    Location: Bulgaria
    Posts: 28
    ... , .. .

  4. #4
    Registered User mitaka888's Avatar
    Join Date: May:2008
    Location: Sofia
    Posts: 59
    . . . execute "Build" - LINK-fatal error LNK1104. Error executing link.exe . Vista .

  5. #5
    pvn's Avatar
    Join Date: Jan:2006
    Location:
    Posts: 329
    - -. XE . ?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |