PDA

View Full Version : hooks, qt4 and window frames



kernel_panic
17th October 2007, 15:15
Hi all!
I know, maybe it isnt a question for a qt forum, but are the windows frames widgets/windows?
Or what class do they have, does anybody know if i can acces them with a hook?

My idea: i install a global hook. than i check callwndproc for wndcreate. than i check if the createt window is a windowframe and give the window frame an other bitmap which he should render as borders. this would be easy low level skinning and i don't need implement things like window moving and resizing.

marcel
17th October 2007, 20:09
Window title bar and frame are not Qt's job. They are they handled/painted by the window manager.

My opinion is that optimal skinning methods at the level you want can be achieved only with platform dependent methods. Qt was not meant for that. It can style only what it draws.

Look at Winamp on Win and at a great deal of other apps on Mac(just as an example, I just found today this app, which I think it has a great interface: http://www.pixelmator.com/).

And as I told you in a previous thread, you can't do common skinning for win and mac, for example. Just look how different they are, what look good on Win won't even fit in on Mac and the other way around.

I know of a few tools for Windows that can change the window themes... I know one that even makes it look like a Mac.

I suggest to forget Qt on this one and implement your own library. Write three platform depenedent modules(Linux, Win, Mac) and a common interface that communicates with the modules.

The interface will be exported by your library and you can always work at the platform dependent code, improve it, without changing the lib interface.

Regards

kernel_panic
17th October 2007, 20:22
YEAH i want to do this and i think on windows it can done with hooks.
i found out how to hook a window and make it transparent or draw a semitransparent picture on it through hooks. i just wanted to know if the windowframe or the titlebar are classes or if they only are drawn onto the screen.
if it are classes, i can hook them (under windows) and set my own drawings on it. than everything else is handled by the window manager. AND its low level, it will be very fast.