- | kControlSupportsEmbedding
-// | kControlSupportsLiveFeedback
-// | kControlHasSpecialBackground
-// | kControlSupportsCalcBestRect
-// | kControlHandlesTracking
- | kControlSupportsFocus
-// | kControlWantsActivate
-// | kControlWantsIdle
- ;
-
- m_peer = new wxMacControl() ;
- ::CreateUserPaneControl( MAC_WXHWND(GetParent()->MacGetTopLevelWindowRef()) , &bounds, features , *m_peer);
-
-
- MacPostControlCreate(pos,size) ;
-#if !TARGET_API_MAC_OSX
- SetControlData(*m_peer,kControlEntireControl,kControlUserPaneDrawProcTag,
- sizeof(gControlUserPaneDrawUPP),(Ptr) &gControlUserPaneDrawUPP);
- SetControlData(*m_peer,kControlEntireControl,kControlUserPaneHitTestProcTag,
- sizeof(gControlUserPaneHitTestUPP),(Ptr) &gControlUserPaneHitTestUPP);
- SetControlData(*m_peer,kControlEntireControl,kControlUserPaneTrackingProcTag,
- sizeof(gControlUserPaneTrackingUPP),(Ptr) &gControlUserPaneTrackingUPP);
- SetControlData(*m_peer,kControlEntireControl,kControlUserPaneIdleProcTag,
- sizeof(gControlUserPaneIdleUPP),(Ptr) &gControlUserPaneIdleUPP);
- SetControlData(*m_peer,kControlEntireControl,kControlUserPaneKeyDownProcTag,
- sizeof(gControlUserPaneKeyDownUPP),(Ptr) &gControlUserPaneKeyDownUPP);
- SetControlData(*m_peer,kControlEntireControl,kControlUserPaneActivateProcTag,
- sizeof(gControlUserPaneActivateUPP),(Ptr) &gControlUserPaneActivateUPP);
- SetControlData(*m_peer,kControlEntireControl,kControlUserPaneFocusProcTag,
- sizeof(gControlUserPaneFocusUPP),(Ptr) &gControlUserPaneFocusUPP);
- SetControlData(*m_peer,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) ;