Hook and modify Windows Messages (even under Windows CE)

Posted on 2005-04-27
Last Modified: 2012-05-05
Hi all,

At the moment I can hook windows messages under Windows CE using Compact Framework and
OpenNETCF SmartDevice Framework. I took the IMessageFilter Interface, derivied a class from it
an added an instance of this class to ApplicationEx's method AddMessageFilter.
What I want to do now, I want to change the messages's parameter and send them through. I
want to hook all key-pressed messages, change the key-parameter e.g. from <PgUp> to <Up> on
one place for my whole application. Is there any change to catch and change these parameters ?
What could the solution be under Desktop Framework 1.1 and with Compact Framework under
Windows CE ?

Thanks in advance,

Question by:eltic
    LVL 14

    Accepted Solution

    First, I'm not expert in this.
    There's a sample project given related to same here. (in fact, 3 projects),1410,30129,00.html

    This got me thinking...
    What if we catch the message from <PgUp> in a ByRef argument and change it to the message for desired key(<Up>)?

    Hope it makes sense.
    LVL 5

    Author Comment

    Unfortunately, Borland's description (nearly) equals to the OpenNetCF Solution.
    I also don't know why, but changing the ref - Argument doesn't works either.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Normally a window is moved by clicking on the caption bar and dragging. You may want your user to be able to move borderless forms or move a form by clicking anywhere in the form without the limitation to the caption bar. There are many ways to do i…
    A basic question.. “What is the Garbage Collector?” The usual answer given back: “Garbage collector is a background thread run by the CLR for freeing up the memory space used by the objects which are no longer used by the program.” I wondered …
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.

    732 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

    24 Experts available now in Live!

    Get 1:1 Help Now