一般消息发过来我们怎么来区分消息那些的数据那些是命令?

解决方案 »

  1.   

    数据一般放在wParam和lParam里,消息放在Msg参数里
      

  2.   

    数据放在wParam和lParam
    消息Msg结构内
      

  3.   

    问个弱弱的问题
    WParam是什么?
      

  4.   

    数据放在wParam和lParam 而消息存在Msg结构内
      

  5.   

    typedef struct _ipHeader
    {
    UCHAR VersionHLen;
    UCHAR TOS;
    USHORT Length;
    USHORT Ident;
    USHORT FlagsOffset;
    UCHAR TTL;
    UCHAR Protocol;
    USHORT CheckSum;
    UINT SrcAddr;
    UINT DesAddr;
    }IpHeader,*PIpHeader;这个是IP首部的定义,这些是必须有的
    接在这个后面就是数据
    比如传输层传下来的TCP报文
      

  6.   

        ----------------------------------------------
        | ip header | tcp header(or x header) | data | 
        ----------------------------------------------    IP header structure:
                 4        8        16                                       32 bit
        |--------|--------|----------------|--------------------------------|
        |  Ver   |  IHL   |Type of service |          Total length          | 
        |--------|--------|----------------|--------------------------------|
        | Identification  |      Flags     |         Fragment offset        |
        |--------|--------|----------------|--------------------------------|
        |  Time to live   |    Protocol    |         Header checksum        | 
        |--------|--------|----------------|--------------------------------|
        |                         Source address                            | 
        |--------|--------|----------------|--------------------------------|
        |                       Destination address                         | 
        |--------|--------|----------------|--------------------------------|
        |                        Option + Padding                           | 
        |--------|--------|----------------|--------------------------------|
        |                                Data                               |
        |--------|--------|----------------|--------------------------------|    TCP header structure:
                                        16                                32 bit
        |--------------------------------|--------------------------------|
        |          Source port           |        Destination port        | 
        |--------------------------------|--------------------------------|
        |                         Sequence number                         |
        |--------------------------------|--------------------------------|
        |                      Acknowledgement number                     | 
        |--------------------------------|--------------------------------|
        |  Offset  | Resrvd  |U|A|P|R|S|F|            Window              | 
        |--------------------------------|--------------------------------|
        |           Checksum             |        Urgent pointer          | 
        |--------------------------------|--------------------------------|
        |                         Option + Padding                        | 
        |--------------------------------|--------------------------------|
        |                              Data                               |
        |--------------------------------|--------------------------------|