Help - Search - Members - Calendar
Full Version: How to create titlebar-less windows
Hydrogenaudio Forums > Hosted Forums > foobar2000 > Development - (fb2k)
kalmark
Hello!

I'm writing a visualisation for f2k, and I was asked for a feature: to change my window to titlebar-less on doubleclick. It causes me no problems to catch the doubleclick message, but I don't know which window style to set, I can only create toolbar-styled and normal styled windows, but not one without titlebar. sad.gif

BTW, I'm not sure if I'm doing the window style changing the right way, now I'm destroying the window and create a new one a the same place & size but with different properties, everytime e.g. "stay on top" is changed in the config.
It would be easier to use CWnd->ModifyStyle, I think, why does the SDK use HWND instead?

Thanks for help! smile.gif
ssamadhi97
(just to answer your question about CWnd vs hwnd/Windows API: CWnd == MFC == DEATH.)
kalmark
QUOTE(ssamadhi97 @ Dec 23 2003, 03:20 PM)
(just to answer your question about CWnd vs hwnd/Windows API: CWnd == MFC == DEATH.)

I thought it would be sg like that...

And, any ideas about the other part of my question? Anyone? unsure.gif
kalmark
OK, I answered my own question : WS_POPUP style gives a titlebar-less window. And, in addition, I found a way top set the styles easily:

DWORD dwNewStyle = (dwStyle & ~dwRemove) | dwAdd;

This is from an MFC file, from the definiton of ModifyStyle. Of course you have to fill up dwStyle on your own. cool.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.