3 ms·
From what I understood Google used WTL as an abstraction layer for the GUI. Meaning in order to create a button they used the WTL CButton (which is a wrapper fo
by shimi 18y ago
From what I understood Google used WTL as an abstraction layer for the GUI. Meaning in order to create a button they used the WTL CButton (which is a wrapper for a Windows button control).
So to create a Mac control button they'll add a pre processor directive that will call a different code that will generate a Mac button.
Nothing wrong with that...
- greyman 18y agoYes, indeed. I have a suspicion that the author doesn't know exactly what he is writing about. If you want to render under Windows, you need to call windows code at the end, don't you?...You can directly call Win32 API, or go through .NET, or use MFC or WTL wrappers. In my opinion WTL was one of the best choices, because the library has good design (derived from C++'s STL) and leads to very efficient code.
- dzorz 18y agoThe only question remaining then is how difficult is it to make a new mapping from CButton -> new Cocoa button. I know that Carbon was more suited to Windows-style GUIs, but Cocoa seems to be slightly more difficult to use in that way... Did anyone of you try to port a Win32/MFC/WTL app to Cocoa by adding preprocessor directives? (I didn't, it's a genuine question :-)