Hiding chrome of the main window
Posted by: xto
Date: January 11, 2008 05:11AM

Hello,

I would like to hide the default title bar of the k-meleon's main window and replace it with a custom title bar drawn in HTML. I already did that with xulrunner and prism (ex-webrunner) which are also based on gecko.

With Xulrunner/prism I set the hidechrome attribute of the main window to false and I used a javascript in the HTML document to perform the moving stuff. Hidechrome also forbid the resize of the window which is a feature needeed too.

So I took a look to k-meleon's xul and xbl files to reproduce it. But I cannot find where to set the hidechrome attribute. I'm not even sure that this will do the job on the main window with k-meleon.

Has someone ever played with the hidechrome attribute of the main window ? Some tips about it ?

Thanks,

Christophe

NB : I also took a look to C++ code. I have not currently a VC++ Pro but I guess I could add few lines of code in the PreCreateWindow method of CBrowserFrame (found in BrowserFrm.cpp). Something like :

LONG nHideChromeStyle = GetWindowLong(hWnd, GWL_STYLE);
nHideChromeStyle&=~WS_CAPTION & ~WS_THICKFRAME &~WS_MAXIMIZEBOX &~WS_MINIMIZEBOX ;
SetWindowLong(hWnd, GWL_STYLE, nHideChromeStyle);

It already works in a plug-in based on fullscreen. cpp I'm able to built with VC++ 2008 Express Edition ... but I have a bad visual effect because the window is built before the plug-in's execution.

I'm going to search for a VC++ Pro in my neighbourhood but if I can avoid to hack the C++ code and use the hidechrome attribute instead I will be an happier for sure smiling smiley

Re: Hiding chrome of the main window
Posted by: guenter
Date: January 11, 2008 07:04AM

If You only lack build tools for K-Meleon.

Mozilla build guidelines state that You can build with free MS tools such as C++ 2003 toolkit ? chercher Free C++2003 ?. Dorian builds against the C...7.1.dlls.



Edited 1 time(s). Last edit at 01/11/2008 07:05AM by guenter.

Re: Hiding chrome of the main window
Posted by: xto
Date: January 13, 2008 01:47AM

Thanks for the links guenter but it seems I can do all I want with a simple plug-in which I can compiled with a recent VC++ express edition (I found how to avoid the bad visual effect I had) and maybe with Cygwin . I'm working on it.



Edited 1 time(s). Last edit at 01/13/2008 01:48AM by xto.

Re: Hiding chrome of the main window
Posted by: guenter
Date: February 03, 2008 08:46AM

Can YOU help ME? i Know where 2 get the files - but that is all.



Edited 1 time(s). Last edit at 02/03/2008 10:10AM by guenter.

K-Meleon forum is powered by Phorum.