Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » Look and Chameleon Technology » Questions about themeing plz
icon9.gif  Questions about themeing plz [message #20849] Tue, 14 April 2009 12:31 Go to next message
TeCNoYoTTa is currently offline  TeCNoYoTTa
Messages: 138
Registered: July 2008
Location: Egypt
Experienced Member

hello All

i want to ask about

1- If i can put an image for the Window Background and make it stretchable
2- If i can remove the title bar from a window

Re: Questions about themeing plz [message #20852 is a reply to message #20849] Tue, 14 April 2009 14:10 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
1-
class ImageWindow : public TopWindow {
   Image img;
   Image cache;

   void SetCache() { if (IsNull(cache) || cache.GetSize() != GetSize()) cache = Rescale(GetSize(), GetSize()); }
public:
   virtual void Paint(Draw &w) { SetCache(); w.DrawImage(0, 0, cache); }
   void SetImage(const Image &i) { img = i; cache.Clear(); }
};

Untested, but should work. If you use a transparent image you'll need to draw a background. This may be quite slow though.

2- SetWindowLongPtr with GWL_STYLE and the correct setting, possibly WS_DLGFRAME. Don't know for X11.


Re: Questions about themeing plz [message #20853 is a reply to message #20849] Tue, 14 April 2009 14:18 Go to previous message
sergeynikitin is currently offline  sergeynikitin
Messages: 748
Registered: January 2008
Location: Moscow, Russia
Contributor

TeCNoYoTTa wrote on Tue, 14 April 2009 14:31

1- If i can put an image for the Window Background and make it stretchable
2- If i can remove the title bar from a window


1 - yes (look for Paint method, see in examples)
2 - yes (any popup window - without titleBar)


SergeyNikitin<U++>( linux, wine )
{
    under( Ubuntu || Debian || Raspbian );
}
Previous Topic: A question of C++
Next Topic: Compiz fix
Goto Forum:
  


Current Time: Fri Dec 13 22:37:22 CET 2024

Total time taken to generate the page: 0.04545 seconds