Movable Window in Windows CE.

Posted on 2006-04-05
Last Modified: 2012-05-05
Dear Guys.

I want to create a window in windows CE platform, but I want to handle the mouse event for this window so I want to capture the WM_* Mouse events so I can move the window from position to position, I wrote a small program but it cannot capture the mouse masseges.

so please can anyone help me in this program?

Thank you very much.
Question by:MAnkeer
    LVL 12

    Expert Comment

    If you want to capture the mouse in the window itself then WM_MOUSEMOVE message will do the job.

    But if you want to capture the mouse movement system wide then you need to install a mouse hook
    See this for details:

    If you mean something else then explain it clearly.

    Author Comment

    Yes, thank you for your helping,

    Here what I want to do, I want to create a window in windows ce, and I want to move this window and changing it's posotion using the stylus, I wrote the code using WM_MOUSEMOVE, but windows ce does't repaint the window that I created, instead the window disappered, I want to program the same as drag and drop, the stylus will be used as a mouse to drag the window and move it.

    I hope this description will help you.

    Thank you.
    LVL 12

    Accepted Solution

    Try this function when you come out of the handler
    BOOL UpdateWindow( );

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    The following diagram presents a diamond class hierarchy: As depicted, diamond inheritance denotes when two classes (e.g., CDerived1 and CDerived2), separately extending a common base class (e.g., CBase), are sub classed simultaneously by a fourt…
    In Easy String Encryption Using CryptoAPI in C++ ( I described how to encrypt text and recommended that the encrypted text be stored as a series of hexadecimal digits -- because cyphertext may…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now