用6.0 ATL写的,是一个CompositeControl
1、请问怎么样才能指定该空间的背景颜色,我不想用灰色的,我想用白色的
2、为什么不响应WM_MOUSEWHEEL事件,需要怎么做
3、初始化工作应该放在那个消息里做,我发现WM_CREATE不响应, CComCompositeControlWM_INITDIALOG用来做其他事情了,那我自己的初始化子控件的工作应该在那里做呢

解决方案 »

  1.   

    1:重载 OnDraw 里面画
    2: 不太懂
    3: WM_INITDIALOG 做了其他事情也可以再做你的事呀
      

  2.   

    靠,竟然两个帖子.http://www.bezier.com.cn/temp/vr这个页面使用了我写的控件,如果你能使用,
    就到http://www.bezier.com.cn上找我的联系方式吧
      

  3.   

    WM_MOUSEWHEEL   Notification   
        
      -------------------------------------------------------------------------------- 
        
      The   WM_MOUSEWHEEL   message   is   sent   to   the   focus   window   when   the   mouse   wheel   is   rotated.   The   DefWindowProc   function   propagates   the   message   to   the   window's   parent.   There   should   be   no   internal   forwarding   of   the   message,   since   DefWindowProc   propagates   it   up   the   parent   chain   until   it   finds   a   window   that   processes   it.   
        
      A   window   receives   this   message   through   its   WindowProc   function.     
      
    该类必须具有   WS_VSCROLL   |   WS_HSCROLL风格。 方法是给类WS_TABSTOP风格,并且具有当前焦点就行了。   
     用鼠标单击类对象,并不会给对象设置为焦点,只要在单击
      

  4.   

    没做过.
    只会使用ATL做一些基本的东西.
      

  5.   

    WM_MOUSEWHEEL ? MSH_MOUSEWHEEL?Use the following code to get the information in the wParam parameter: fwKeys = GET_KEYSTATE_WPARAM(wParam);
    zDelta = GET_WHEEL_DELTA_WPARAM(wParam);Use the following code to obtain the horizontal and vertical position:xPos = GET_X_LPARAM(lParam); 
    yPos = GET_Y_LPARAM(lParam); You can also use the MAKEPOINTS macro to convert the lParam parameter to a POINTS structure. The wheel rotation will be a multiple of WHEEL_DELTA, which is set at 120. This is the threshold for action to be taken, and one such action (for example, scrolling one increment) should occur for each delta.The delta was set to 120 to allow Microsoft or other vendors to build finer-resolution wheels in the future, including perhaps a freely-rotating wheel with no notches. The expectation is that such a device would send more messages per rotation, but with a smaller value in each message. To support this possibility, you should either add the incoming delta values until WHEEL_DELTA is reached (so for a delta-rotation you get the same response), or scroll partial lines in response to the more frequent messages. You could also choose your scroll granularity and accumulate deltas until it is reached.Windows 95, Windows NT 3.51: Support for the mouse wheel is provided through a separately-running module, MSWheel, that generates a MSH_MOUSEWHEEL message. The MSWheel module, which consists of MSWheel.exe and MSWheel.dll, is installed with the IntelliPoint software that is shipped with the IntelliMouse pointing device. In addition, MSH_MOUSEWHEEL is defined in the header file (ZMouse.h) that an application must use to implement support for the wheel via the MSWheel module. MSH_MOUSEWHEEL
    zDelta = (int) wParam; // wheel rotation 
    xPos = LOWORD(lParam); // horizontal position of pointer 
    yPos = HIWORD(lParam); // vertical position of pointer Note, there is no fwKeys for MSH_MOUSEWHEEL. Otherwise, the parameters are exactly the same as for WM_MOUSEWHEEL.It is up to the application to forward MSH_MOUSEWHEEL to any embedded objects or controls. The application is required to send the message to an active embedded OLE application. It is optional that the application sends it to a wheel-enabled control with focus. If the application does send the message to a control, it can check the return value to see if the message was processed. Controls are required to return a value of TRUE if they process the message.