News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Collors help

Started by trodon, December 09, 2006, 10:47:43 PM

Previous topic - Next topic

trodon

Ok everione knows about windows themes, for example default winxp theme have all blue



ok this is just example to show, now i have this one program that show me something like this



btw this one picture two is bether but quality is lost because its gif :)
ok, just to say when i have aportunity, this red close is not ret its black, but when i move mouse its do something like flash animation
and become red.....
if nobady knows how to make that, can anyone even tell me how to just change collor from blue to black, or yellow, or something other
i will be glad if there is some short example or some hint ;)

Thanks in advance

GregL

Trodon,

Well, I don't know how you would change an individual program like that, subclassing maybe, I have never tried to do that.

On a related note, I have been using this Royale Noir theme for XP. I really like it.


PBrennick

Hi Greg,
That is a really cool theme!  :U

Paul
The GeneSys Project is available from:
The Repository or My crappy website

trodon

Greg, i dont need theme for windows  lol
i need example or hint how to create program with that collor ;)
please someone can help me?

Synfire

Trodon,

The method would take a bit of code, but shouldn't be that hard. What you will want to do is create a custom system menu. This means that you should create your application as WS_POPUP and draw your own title bar, set it's title, process WM_NCHITTEST messages for moving the window, and creating your own minimize/maximize/close buttons. My BkServ demo shows how to process the WM_NCHITTEST message and create a custom title bar but it doesn't have custom minimize/maximize/close buttons.

To do those, you will need to create a static control which displays an image of the "button" in it's normal state. Then, when the user moves the mouse over the static control, swap out the image and repaint the control. It would probably be worth it just creating a Custom Control to do this, but subclassing three controls would work (and if you can find info on a "HyperLink Control" it would be basically the same thing).

If you don't care about when the user puts the mouse over the button and would like it to change the image when the user clicks the button, a custom control found in the MASM32 package would save you a lot of time. This control is called BmpButton and information regarding it can be found in MASMLIB.HLP in your MASM32\Help directory.

Check out my projects page for a link to BkServ which demonstrates the custom title bar (for it, the custom title bar is on the side of the application). Also, I used BmpButton in the Shifting Menu demo found on the same page if you need an extra reference for using it (Shifting Menu also is "themed" so to speak).

http://www.codegurus.org/~bkeller/projects.html

Regards,
Bryant Keller

P.S. If you decide to get into advanced skinning of your applications, you should start looking into the following API functions:

CombineRgn, CreateEllipticRgn, CreateEllipticRgnIndirect, CreatePolygonRgn, CreatePolyPolygonRgn, CreateRectRgn, CreateRectRgnIndirect, CreateRoundRectRgn, EqualRgn, ExtCreateRegion, FillRgn, FrameRgn, GetPolyFillMode, GetRegionData, GetRgnBox, InvertRgn, OffsetRgn, PaintRgn, PtInRegion, RectInRegion, SetPolyFillMode

These functions will allow you to modify the edges of your window into whatever shape you want (circles, squares, polygons, monkeys, dragons, whatever).

trodon

hi Synfire, thank you for the answer, and may thanks for shift meny example  :U

TNick

Same thing here, for BigProblem. Everything is ownerdraw in main panel and you have the source code.

Nick


G`HOST

Hi,
I use Aston Shell.It just rocks.No more xp themes for me.
Hi trodon
Looks easy but its quite difficult.I once had a very good example of the same before my harddisk crashed. :(

Ehtyar

I've used nspack myself before. I thought that title was the new Vista theme, becuase that titlebar only came out after the program became compatible with Vista....I guess not. Might be something from the Vista SDK though, because i can't imagine why the author of an executable packer would be interested in creating an entirely custom window from scratch like that...it's not as though aesthetics are important in his line of work ;)

Hope this helps, Ehtyar.