It has been a long time since I started to worry about generalizing the screen tools I have to make my interfaces. A big system usually has hundreds of windows. It's not a good idea create one by one using raw pieces of code. When it makes sense, I want to create windows by reading configuration values dynamically. When it's impossible cause I need a custom behavior, there will be powerful screen classes to make the hard job.
But there is no perfection. I use windows specific resources to make my interface classes. In another OS, I can reuse several ideas and logics, but I'm sure there will be a lot of redevelopment. Mainly talking about softwares that need advanced interfaces to draw, drag, select, etc, can be hard to mimic a behavior in several graphical environments using the same source.
I didn’t want to use GTK+, Qt, or anything like that. You know how I like dependencies for this project. This libraries don't have everything I want ... If I had chosen one of them, I would need to extend it. I know I lose portability, but I prefer this way.
At least, the core will not have this kind of problem. In another environment (like X11 for example), the hard job will be only remake the interface layer.