Thread: OnMouseUp

  1. #1
    Registered User subdene's Avatar
    Join Date
    Jan 2002
    Posts
    367

    OnMouseUp

    Hi, i need to call a function as soon as a FormMouseUp event has finsihed. Is there anyway of way of doing this..... Thanks in advance.
    Be a leader and not a follower.

  2. #2
    mustang benny bennyandthejets's Avatar
    Join Date
    Jul 2002
    Posts
    1,401
    this doesn't sound like c++, it sounds like visual basic. by FormMouseUp, do you mean WM_LBUTTONUP, or something like that?
    [email protected]
    Microsoft Visual Studio .NET 2003 Enterprise Architect
    Windows XP Pro

    Code Tags
    Programming FAQ
    Tutorials

  3. #3
    Registered User subdene's Avatar
    Join Date
    Jan 2002
    Posts
    367
    No, i just want to call a function after the FormMouseUp has finished. I have tried calling a function within the event and requesting a retrun staright after the function call, but that doesnt work either.
    Be a leader and not a follower.

  4. #4
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    What is this?? Borland???

    Anyway.....I work in MFC, and if I wanted to add code to a mouseup event (OnLButtonUp) then I would add the handler to my derived class (representing my window)......in this function, call OnLButtonDown on my base class (CDialog...or whatever) and then add my code......so when there's an WM_LBUTTONUP message....my derived func gets called (as its virtual)...I call the function below to allow it to do what it wants.....then after that call, its onto my code

    Code:
    void CMyFunkWindow::OnLButtonDown( UINT nFlags, CPoint point )
    {
    	//Assume CMyFunkWindow derives from CDialog
    	CDialog(nFlags,point);
    	
    	//My code goes here
    }

  5. #5
    Registered User subdene's Avatar
    Join Date
    Jan 2002
    Posts
    367
    Hi fordy, i implemented that, and it still didn't help. thanks though. The main problem i am having is with a qraphic. I am drawing a graphic from within the mouseup event on the form. The only problem is when the graphic is drawn, it does not go directly on top of the canvas. ie instead of being drawn on top of an existing graphic present on the form, corners of the graphic will be visible, but the rest are still hidden by the previous graphic.
    All the graphics being used are TBitmap's. I have tried using Draw, CopyRect, even bitblt from the api. I've even tried making sure the copymode property was correct. But as soon as the mouseup event has finished, the standard draw method from the canvas works fine..... I CAN'T UNDERSTAND IT! Any ideas would be appreciated, thanks
    Be a leader and not a follower.

Popular pages Recent additions subscribe to a feed