Jump to content

GetSysColor and SetSysColor


Ealric
 Share

Recommended Posts

Anyone want to try their hand at converting GetSysColor and SetSysColor for autoit? I'm particularly interested in setting the color for menubars.

SetSysColor

http://msdn.microsoft.com/en-us/library/ms724940(VS.85).aspx

GetSysColor

http://msdn.microsoft.com/en-us/library/ms724371(VS.85).aspx

The color menubar is I believe on 30.

COLOR_MENUBAR

30

Example

http://msdn.microsoft.com/en-us/library/ms724208(VS.85).aspx

WM_SYSCOLORCHANGE

http://msdn.microsoft.com/en-us/library/dd145223(VS.85).aspx

I'm not very good at portiing code over but I'm certain that it can be done. Is anyone saavy enough with code conversion around that wants to give it a shot?

Many thanks in advance.

My Projects: [topic="89413"]GoogleHack Search[/topic], [topic="67095"]Swiss File Knife GUI[/topic], [topic="69072"]Mouse Location Pointer[/topic], [topic="86040"]Standard Deviation Calculator[/topic]

Link to comment
Share on other sites

  • Moderators

Ealric,

Have you looked at _WinAPI_GetSysColor and _WinAPI_SetSysColor in the Help file?

No, I thought not.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Ealric,

Have you looked at _WinAPI_GetSysColor and _WinAPI_SetSysColor in the Help file?

No, I thought not.

M23

I did a search by SetSysColor and the help file shows "no topics found". GetSysColor does show up though but I figured if one was not in the file, the other would not be also. Unfortunately, the help file does not have search indexing set for wildcard entries - only "exact" entries.

I'm looking through them now and will see if they do what I need them to.

Thanks.

My Projects: [topic="89413"]GoogleHack Search[/topic], [topic="67095"]Swiss File Knife GUI[/topic], [topic="69072"]Mouse Location Pointer[/topic], [topic="86040"]Standard Deviation Calculator[/topic]

Link to comment
Share on other sites

I checked and no, it won't help me. It only applies those settings for 'all' system menubars but not the default gui app. I need a custom DLL call to point a change to the menu color for the existing GUI application and not for the entire system.

So, back to square one. Anyone else understand what it is I'm trying to do?

Thanks.

My Projects: [topic="89413"]GoogleHack Search[/topic], [topic="67095"]Swiss File Knife GUI[/topic], [topic="69072"]Mouse Location Pointer[/topic], [topic="86040"]Standard Deviation Calculator[/topic]

Link to comment
Share on other sites

I checked and no, it won't help me. It only applies those settings for 'all' system menubars but not the default gui app. I need a custom DLL call to point a change to the menu color for the existing GUI application and not for the entire system.

So, back to square one. Anyone else understand what it is I'm trying to do?

Thanks.

Then SetSysColors is not the thing you're looking for, because as the name hints, it changes the colors on the system.

And no, I don't know how to do it for one window (GUI is not my thing).

:)

Broken link? PM me and I'll send you the file!

Link to comment
Share on other sites

Then SetSysColors is not the thing you're looking for, because as the name hints, it changes the colors on the system.

And no, I don't know how to do it for one window (GUI is not my thing).

:)

thanks mate - I appreciate the followup. Yeah, I understand what they do per say, but was hoping to provide a generic example as to what I wanted to do and utilize that with just a GUI file menu. The closest thing I could find that manipulated any menubars was SetSysColors. So, was a far reach but my groping went up empty.

I'm going to bypass the file menu completely and create custom buttons with $BS_BITMAP and pictures instead. It will look cleaner. I almost have the new googlehack completely skinned custom made by me in PS CS4.

Again, thanks.

My Projects: [topic="89413"]GoogleHack Search[/topic], [topic="67095"]Swiss File Knife GUI[/topic], [topic="69072"]Mouse Location Pointer[/topic], [topic="86040"]Standard Deviation Calculator[/topic]

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...