I created a Carbon window using CreateNewWindo开发者_如何学Pythonw() which will return me a WindowRef. I create a HIViewRef and now I want to add it to the newly created WindowRef.
Can anyone please help me with this issue? How can I add HIViewRef to a WindowRef which does not have any subviews?
Thanks,
Dheeraj.
HIViewRef and ControlRef are the same, so to add HIViewRef to WindowRef you could use something like:
HIViewRef root_control;
GetRootControl (winref, &root_control);
HIViewAddSubview(root_control, hiview);
精彩评论