开发者

How to add HIViewRef as subview/view to a new Carbon Window?

开发者 https://www.devze.com 2023-03-07 19:13 出处:网络
I created a Carbon window using CreateNewWindo开发者_如何学Pythonw() which will return me a WindowRef.

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);
0

精彩评论

暂无评论...
验证码 换一张
取 消