- | kControlSupportsEmbedding
-// | kControlSupportsLiveFeedback
-// | kControlHasSpecialBackground
-// | kControlSupportsCalcBestRect
-// | kControlHandlesTracking
- | kControlSupportsFocus
-// | kControlWantsActivate
-// | kControlWantsIdle
- ;
-
- ::CreateUserPaneControl( MAC_WXHWND(GetParent()->MacGetTopLevelWindowRef()) , &bounds, features , (ControlRef*) &m_macControl);
-
- MacPostControlCreate(pos,size) ;
-#if !TARGET_API_MAC_OSX
- SetControlData((ControlRef) m_macControl,kControlEntireControl,kControlUserPaneDrawProcTag,
- sizeof(gControlUserPaneDrawUPP),(Ptr) &gControlUserPaneDrawUPP);
- SetControlData((ControlRef) m_macControl,kControlEntireControl,kControlUserPaneHitTestProcTag,
- sizeof(gControlUserPaneHitTestUPP),(Ptr) &gControlUserPaneHitTestUPP);
- SetControlData((ControlRef) m_macControl,kControlEntireControl,kControlUserPaneTrackingProcTag,
- sizeof(gControlUserPaneTrackingUPP),(Ptr) &gControlUserPaneTrackingUPP);
- SetControlData((ControlRef) m_macControl,kControlEntireControl,kControlUserPaneIdleProcTag,
- sizeof(gControlUserPaneIdleUPP),(Ptr) &gControlUserPaneIdleUPP);
- SetControlData((ControlRef) m_macControl,kControlEntireControl,kControlUserPaneKeyDownProcTag,
- sizeof(gControlUserPaneKeyDownUPP),(Ptr) &gControlUserPaneKeyDownUPP);
- SetControlData((ControlRef) m_macControl,kControlEntireControl,kControlUserPaneActivateProcTag,
- sizeof(gControlUserPaneActivateUPP),(Ptr) &gControlUserPaneActivateUPP);
- SetControlData((ControlRef) m_macControl,kControlEntireControl,kControlUserPaneFocusProcTag,
- sizeof(gControlUserPaneFocusUPP),(Ptr) &gControlUserPaneFocusUPP);
- SetControlData((ControlRef) m_macControl,kControlEntireControl,kControlUserPaneBackgroundProcTag,
- sizeof(gControlUserPaneBackgroundUPP),(Ptr) &gControlUserPaneBackgroundUPP);
-#endif
+ | kControlSupportsEmbedding
+ | kControlSupportsLiveFeedback
+ | kControlGetsFocusOnClick
+// | kControlHasSpecialBackground
+// | kControlSupportsCalcBestRect
+ | kControlHandlesTracking
+ | kControlSupportsFocus
+ | kControlWantsActivate
+ | kControlWantsIdle ;
+
+ m_peer = new wxMacControl(this) ;
+ OSStatus err =::CreateUserPaneControl( MAC_WXHWND(GetParent()->MacGetTopLevelWindowRef()) , &bounds, features , m_peer->GetControlRefAddr() );
+ verify_noerr( err );
+
+ MacPostControlCreate(pos, size) ;