我想在一个程序中得到RegisterWindowMessage注册的系统消息对应的字符串,但不知怎么实现,望各位大侠指教。

解决方案 »

  1.   

    如下:#define WIN32_LEAN_AND_MEAN
    #include <stdio.h>
    #include <windows.h>int main (void)
        {
            char name [0x100];
            UINT msg = ::RegisterWindowMessage ("test-msg1");
            printf ("message (test-msg1) registered: %08x\n", msg);
            ::GetClipboardFormatName (msg, name, 0x100);
            printf ("the name of message (%08x) is %s\n", msg, name);
        };运行结果
    message (test-msg1) registered: 0000c197
    the name of message (0000c197) is test-msg1
    Press any key to continue
      

  2.   

    www.pcvc.net
    www.vckbase.com
    www.vchelp.net