"Converting" Windows APIs to MacOS-APIs
Posted: Tue Dec 07, 2021 1:41 am
So,
I'm firm enough to use MSDN and a lot of Windows APIs (surely just a tiny bit, but that suits my additional needs). However, I'm absolutely not firm with Mac OSX. I am currently programming a Ribbon Menu (already shown in the German forum, but still under development), which uses a few Windows APIs. I would like to make it available on Mac OSX too, but I've never used it (and never will). So, what I've already learned, is that I need "CocoaMessage()" and I know a bare minimum about the syntax from the help. However, can someone please help me convert some Windows API calls into CocoaMessages?
Namely SHAppBarMessage_ (or another way to the height of the taskbar), GetModuleHandle_ (needed for Tooltips), CreateWindowEx_ (for creating ToolTips), DestroyWindow_ (for uncreating ToolTips), SendMessage_ (for a lot of messages, is this even possible?), GetWindowRect_/GetClientRect_ (maybe not really needed), SetWindowLong_/GetWindowLong_ (manipulating control parameters, maybe done in different way), SetWindowPos_ (maybe not needed), CreateRoundRectRgn_/SetWindowRgn_/DeleteObject_ (rounding window corners), SetParent_ (move a control into another window), MoveWindow_ (maybe not needed), GetCursorPos_/ScreenToClient_/ClientToScreen_ (converting coordinates, maybe doable in another way), IsWindowVisible_ (check if window is visible), GetForegroundWindow_ (determine active window (systemwide)), IsWindowEnabled_ (determine whether window is enabled oder not), IsIconic_ (determine whether window was minimized or not), GetObject_/GetIconInfo_/DestroyIcon_ (not really needed, just for shared objects maybe), GetSysColor_ (the only one I know).
I know that's a lot, but I also didn't find the right documentation to learn it myself. same goes with Linux, I'd relly like to add it to the compatibility list too (maybe even the Raspi).
I'm firm enough to use MSDN and a lot of Windows APIs (surely just a tiny bit, but that suits my additional needs). However, I'm absolutely not firm with Mac OSX. I am currently programming a Ribbon Menu (already shown in the German forum, but still under development), which uses a few Windows APIs. I would like to make it available on Mac OSX too, but I've never used it (and never will). So, what I've already learned, is that I need "CocoaMessage()" and I know a bare minimum about the syntax from the help. However, can someone please help me convert some Windows API calls into CocoaMessages?
Namely SHAppBarMessage_ (or another way to the height of the taskbar), GetModuleHandle_ (needed for Tooltips), CreateWindowEx_ (for creating ToolTips), DestroyWindow_ (for uncreating ToolTips), SendMessage_ (for a lot of messages, is this even possible?), GetWindowRect_/GetClientRect_ (maybe not really needed), SetWindowLong_/GetWindowLong_ (manipulating control parameters, maybe done in different way), SetWindowPos_ (maybe not needed), CreateRoundRectRgn_/SetWindowRgn_/DeleteObject_ (rounding window corners), SetParent_ (move a control into another window), MoveWindow_ (maybe not needed), GetCursorPos_/ScreenToClient_/ClientToScreen_ (converting coordinates, maybe doable in another way), IsWindowVisible_ (check if window is visible), GetForegroundWindow_ (determine active window (systemwide)), IsWindowEnabled_ (determine whether window is enabled oder not), IsIconic_ (determine whether window was minimized or not), GetObject_/GetIconInfo_/DestroyIcon_ (not really needed, just for shared objects maybe), GetSysColor_ (the only one I know).
I know that's a lot, but I also didn't find the right documentation to learn it myself. same goes with Linux, I'd relly like to add it to the compatibility list too (maybe even the Raspi).