Jump to content

Color a Button


Recommended Posts

you mean like this?

color_buttons.bmp

Edited by Xenogis

[font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font]

Link to comment
Share on other sites

Assuming this isn't an april fools joke, yep - like that.

Currently i am using labels in place of the buttons - they act like a button in onevent mode, but the gui isn't as nice.

you mean like this?

<{POST_SNAPBACK}>

Anyone have a TRS 80 Model III for sale?
Link to comment
Share on other sites

hehee ya i cheated

#include <guiconstants.au3>
GUICreate ( "", 100, 75 )
GUICtrlCreateButton ( "", 0, 0, 100, 25 )
GUICtrlCreateLabel ( "", 1, 1, 97, 22 )
GUICtrlSetBkColor ( -1, 0xff0000 )
GUICtrlCreateLabel ( "Red Button", 1, 5, 97, 17, $SS_CENTER )
GUICtrlCreateButton ( "", 0, 25, 100, 25 )
GUICtrlCreateLabel ( "", 1, 26, 97, 22 )
GUICtrlSetBkColor ( -1, 0x0000ff )
GUICtrlCreateLabel ( "Blue Button", 1, 31, 97, 17, $SS_CENTER )
GUICtrlCreateButton ( "", 0, 50, 100, 25 )
GUICtrlCreateLabel ( "", 1, 51, 97, 22 )
GUICtrlSetBkColor ( -1, 0x00ff00 )
GUICtrlCreateLabel ( "Green Button", 1, 56, 97, 17, $SS_CENTER )
GUISetState ( )
Sleep ( 2000 )

[font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font]

Link to comment
Share on other sites

yeah, i wish we could change the color and stuff. I guess for now we just have to do GuiCtrlCreateGraphic and GUIGetCursorInfo

[font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font]

Link to comment
Share on other sites

Found this yesterday......QHTM

the dll has functions that allow buttons and tooltips to display html

whether it works via dll call.....dunno. (haven't figured out dll calls yet...)

Anyone here that knows dll calls can try it out and see if it works

Edited by quaizywabbit
[u]Do more with pre-existing apps![/u]ANYGUIv2.8
Link to comment
Share on other sites

What are the limits of the DLL you found? the DLL i use for displaying HTML is cwebpage.dll

[font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font]

Link to comment
Share on other sites

Found this yesterday......QHTM

QHTM is the link to the site, the online docs are there also....

there are quite a few working C++ examples( Animated windows in 4 styles, Multi-threading template, etc...) that the developers might want to have a look at

Edited by quaizywabbit
[u]Do more with pre-existing apps![/u]ANYGUIv2.8
Link to comment
Share on other sites

Not yet. I gotta go. I'll try later...

Edit:

This is hard. I believe this can only work in a C++ project.

Especially when a user clicks a QHTM link. When that happens, the DLL sends a message to the GUI to tell which link it was.

We can only intercept that message if the needed modifications in the AutoIt source are done.

Conclusion:

Not easy without C++ experience.

Edited by SlimShady
Link to comment
Share on other sites

//  Call this to initialise the QHTM.
    BOOL WINAPI QHTM_Initialize( HINSTANCE hInst );

    //
    //  Call this to shutdown QHTM.
    BOOL WINAPI QHTM_Uninitialize();

    //  Enable CoolTips in an application that currently uses the WIN32 Tool Tip control.
    BOOL WINAPI QHTM_EnableCooltips();

    //  Enable HTML to be rendered onto a button
    BOOL WINAPI QHTM_SetHTMLButton( HWND hwndButton );

This is from the C++ header...don't know how to translate into AutoIt dll call.....

[u]Do more with pre-existing apps![/u]ANYGUIv2.8
Link to comment
Share on other sites

this should do it but im not sure about the initialize function

DllCall ( "qhtm.dll", "Initialize", "int", hInst )

DllCall ( "qhtm.dll", "Uninitialize" )

DllCall ( "qhtm.dll", "EnableCooltips" )

DllCall ( "qhtm.dll", "SetHTMLButton", "hwnd", hwndButton )

[font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font]

Link to comment
Share on other sites

this should do it but im not sure about the initialize function

DllCall ( "qhtm.dll", "Initialize", "int", hInst )

DllCall ( "qhtm.dll", "Uninitialize" )

DllCall ( "qhtm.dll", "EnableCooltips" )

DllCall ( "qhtm.dll", "SetHTMLButton", "hwnd", hwndButton )

<{POST_SNAPBACK}>

so the 'return type' gets skipped altogether?
[u]Do more with pre-existing apps![/u]ANYGUIv2.8
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...