m->EnableMenuItem(count,MF_BYCOMMAND|MF_ENABLED);
和m->EnableMenuItem(count,MF_BYPOSITION|MF_ENABLED);
有么区别??因为我在很多函数中都能见到这对可选参数,但始终没弄清楚他们之间的具体区别,请高手指教!

解决方案 »

  1.   

    看MSDN
    MF_BYCOMMAND Specifies that the parameter gives the command ID of the existing menu item. This is the default if neither MF_BYCOMMAND nor MF_BYPOSITION is set. 
    MF_BYPOSITION Specifies that the parameter gives the position of the existing menu item. The first item is at position 0. 
      

  2.   

    我就是看不明白MSDN才到论坛上问的啊,有没有人跟我说清楚点啊??
      

  3.   

    BY_COMMAND是菜单条目的ID,而BY_POSITION是这项条目在整个菜单中的具体位置。