Need Solution!!!

This is a discussion on Need Solution!!! within the Windows Programming forums, part of the Platform Specific Boards category; hi,guys....need solution for this program.i had run it for few times. no error and no warning......but u compiler it........it shows ...

  1. #1
    Registered User
    Join Date
    Oct 2001
    Posts
    70

    Need Solution!!!

    hi,guys....need solution for this program.i had run it for few times.
    no error and no warning......but u compiler it........it shows u the a big screen...........its' written there....something like the program crashes.here is the code i post it in here. )

    the output of the program should..........i can draw in the window there with my mouse. before u run the program...u have to create a resource type called cursor and save it before u add it in
    there.
    hope someone can solve it for me.Thanks

    #include<afxwin.h>
    #include"resource.h"


    HCURSOR hCursor;
    class MyWindowublic CFrameWnd
    {
    public:
    void OnLButtonDown(UINT flags,CPoint Point1);
    void OnLButtonUp(UINT flags,CPoint Point1);
    DECLARE_MESSAGE_MAP()
    };
    BEGIN_MESSAGE_MAP(MyWindow,CFrameWnd)
    ON_WM_LBUTTONDOWN()
    ON_WM_LBUTTONUP()
    END_MESSAGE_MAP()

    void MyWindow::OnLButtonDown(UINT flags,CPoint Point1)
    {
    SetCapture();
    ::SetCursor(hCursor);
    ShowCursor(TRUE);
    };
    void MyWindow::OnLButtonUp(UINT flags,CPoint Point1)
    {
    ReleaseCapture();
    };
    class MyAppublic CWinApp
    {
    public:
    BOOL InitInstance();
    BOOL ExitInstance();
    };
    BOOL MyApp::InitInstance()
    {
    ::MessageBox(0,"Sample Window","InitInstance",MB_OK|MB_ICONASTERISK);
    MyWindow *MyWindowObject;
    MyWindowObject=new MyWindow;
    m_pMainWnd=MyWindowObject;
    MyWindowObject->ShowWindow(SW_SHOWMAXIMIZED);
    hCursor=LoadCursor(MAKEINTRESOURCE(IDC_CURSOR1));
    return TRUE;

    }
    BOOL MyApp::ExitInstance()
    {
    ::MessageBox(0,"Sample Window","ExitInstance",MB_OK|MB_ICONHAND);
    return TRUE;
    }

    MyApp ApplicationObject;

  2. #2
    Registered User The15th's Avatar
    Join Date
    Aug 2001
    Posts
    125
    Jonna;

    Maybe it's just that im tierd but i dont understand what your asking. I find it hard to follow your sentences.
    ...o....r may....be ..i.....t's.... d..ue.......... to........... th.....i...s.......
    arrh, i got nothing good to say.
    http://www.praxis1.vic.edu.au/home/dcola/

  3. #3
    Registered User ski6ski's Avatar
    Join Date
    Aug 2001
    Posts
    133
    Maybe it's just that im tierd
    No doubt me too............it all looks blurry to me
    C++ Is Powerful
    I use C++
    There fore I am Powerful

  4. #4
    Registered User
    Join Date
    Oct 2001
    Posts
    70

    NEED HELP!

    can someone tell me what is wrong with the program as i can't compile it? anyone in there can help me out? )) plss.......
    i need it so urgent.......... ))

  5. #5
    chenglim
    Guest

    Red face

    i guess you are trying to create a cursor? but may i have ur existing project file? pls mail to teochenglim@yahoo.com

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. 'Solution' and 'Project' usage in VC++
    By C+/- in forum C++ Programming
    Replies: 2
    Last Post: 01-13-2007, 09:50 AM
  2. anyone know the solution?
    By heeroyung in forum C Programming
    Replies: 15
    Last Post: 09-30-2005, 07:46 AM
  3. My Unix/Linux SECURITY SOLUTION - pls read
    By bjdea1 in forum Linux Programming
    Replies: 3
    Last Post: 04-11-2004, 10:28 PM
  4. Solution - Israel and Palestine?
    By Vber in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 03-19-2003, 08:27 AM
  5. Speed Challenge, my solution:
    By RoD in forum C++ Programming
    Replies: 11
    Last Post: 03-17-2003, 09:12 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21