netframework 界面重绘的处理
最近在看   .netframework   的源代码. 
 当看到winform   的   ListBox   控件时,知道它是用   DrawItem   事件来绘制子项目的 
 但我在它的代码中看到它是这样调用的. 
 private   void   WmReflectDrawItem(ref   Message   m) 
 { 
       ...具体函数实现略过 
             //此处调用   OnDrawIten 
             this.OnDrawItem(new   DrawItemEventArgs(graphics,   this.Font,   rect,   lParam.itemID,   (DrawItemState)   lParam.itemState,   this.ForeColor,   this.BackColor)); 
 }   
 那么   WmReflectDrawItem   又是在哪调用的呢,我再查,发现是在   WndProc,   也就是控件的主消息循环中 
 protected   override   void   WndProc(ref   Message   m) 
 { 
             int   msg   =   m.Msg; 
             switch   (msg) 
             { 
                         case   0x202b: 
                                     this.WmReflectDrawItem(ref   m); 
                                     return;   
                         case   0x202c: 
                                     this.WmReflectMeasureItem(ref   m); 
                                     return;   
                         case   0x317: 
                                     this.WmPrint(ref   m); 
                                     return;   
                         default: 
                                     if   (msg   !=   0x2111) 
                                     { 
                                                 goto   Label_029F; 
                                     } 
                                     this.WmReflectCommand(ref   m); 
                                     return; 
             } 
 } 
 函数调用是明白了,问题也就来了,以上这几个消息ID(0x202B,0x2111等)我从没见过,在   winuser.h   中也查不到,且值都大于   WM_USER   (0x0400), 而且我发现很多控件中都有   WmReflectCommand,   WmReflectDrawItem   等函数,其对应的消息ID都一样,   难道是   windows的隐藏消息. 
 望高人解答.
------解决方案--------------------因该是.net的新消息吧
------解决方案--------------------顺便问下lz看到移动窗体时候的消息是什么了么? 
 记得以前处理移动的时候有个消息和sizechange有关
------解决方案--------------------不好意思,我问一下,你看的是哪里的源代码?   
------解决方案--------------------应该是新消息。
------解决方案--------------------我感觉像是项目自定义的消息,所以才会使用WM_USER大的值。
------解决方案--------------------http://msdn2.microsoft.com/zh-tw/library/system.windows.forms.listbox.wmreflectcommand(VS.80).aspx