#define WM_USER_DECLINED (WM_USER + 100)
请问这句话什么意思?

解决方案 »

  1.   

    WM_USER_DECLINED的值是在WM_USER加100
      

  2.   

    自定义用户消息
    用户定义了消息ID为WM_USER_DECLINED
    程序中可以用SendMessage触发该自定义消息
      

  3.   

    那WM_USER是什么消息?请详细指教。谢谢
      

  4.   

    一个整数,WINDOWS定义的,用户消息ID值的起点
      

  5.   


    因为WINDOWS自已也有很多消息,为了区别自定消息,开发环境中有WM_USER消息,表示从这个值起的消息可以由用户自行分配, WM_USER + 100 就是这个意思,如果你还想定义其它的自定义消息 可以用 WM_USER + 101  等,反正不同就是了
      

  6.   

    是一个整数。
    同意楼上的意见,这句是给自定义消息一个值,值的大小就是WM_USER+100
      

  7.   

    WM_USER
    The WM_USER constant is used by applications to help define private messages for use by private window classes, usually of the form WM_USER+X, where X is an integer value. #define WM_USER       0x0400
    Res
    The following are the ranges of message numbers. Range Meaning 
    0 through WM_USER – 1 Messages reserved for use by the system. 
    WM_USER through 0x7FFF Integer messages for use by private window classes. 
    WM_APP through 0xBFFF Messages available for use by applications. 
    0xC000 through 0xFFFF String messages for use by applications. 
    Greater than 0xFFFF Reserved by the system for future use. 
    Message numbers in the first range (0 through WM_USER – 1) are defined by the system. Values in this range that are not explicitly defined are reserved for future use by the system. Message numbers in the second range (WM_USER through 0x7FFF) can be defined and used by an application to send messages within a private window class. These values cannot be used to define messages that are meaningful throughout an application, because some predefined window classes already define values in this range. For example, predefined control classes such as BUTTON, EDIT, LISTBOX, and COMBOBOX may use these values. Messages in this range should not be sent to other applications unless the applications have been designed to exchange messages and to attach the same meaning to the message numbers. Message numbers in the third range (0x8000 through 0xBFFF) are available for application to use as private messages. Message in this range do not conflict with system messages. Message numbers in the fourth range (0xC000 through 0xFFFF) are defined at run time when an application calls the RegisterWindowMessage function to retrieve a message number for a string. All applications that register the same string can use the associated message number for exchanging messages. The actual message number, however, is not a constant and cannot be assumed to be the same between different sessions. Message numbers in the fifth range (greater than 0xFFFF) are reserved for future use by the system. Requirements 
      Windows NT/2000/XP: Included in Windows NT 3.1 and later.
      Windows 95/98/Me: Included in Windows 95 and later.
      Header: Declared in Winuser.h; include Windows.h.