News:

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

Component Colours

Started by Retsim_X, June 07, 2006, 06:22:05 AM

Previous topic - Next topic

Retsim_X

Ok guys. here is the situation.

i am writing some software for a freind

the main dialog is in a dll that is called from a c sharp app he is writing.

the components on the dialog are grey by windows or white

now i have had a playt with changing button colours etc. BUT i cant seem to get the text colour to change nor the list box background (i want to change that to gold with bright red text.

how would i go about changing these?????

zooba

IIRC, C# dialogs are created in Windows Forms. I doubt they'll respond consistently to regular Windows messages.

If your client/friend is creating the dialog, can't he change it? Or can you negotiate a way of communicating with his app to change the colours?

sluggy

Quote from: Retsim x86 on June 07, 2006, 06:22:05 AM
Ok guys. here is the situation.

i am writing some software for a freind
If i had a dollar for everytime i have heard that one..... if your friend is writing the app, why does he need YOU to change the colour of his controls?

Quote
the main dialog is in a dll that is called from a c sharp app he is writing.
Whose dll is it? What is it written in? If .Net, is it v1.1 or v2.0?

Quote
now i have had a playt with changing button colours etc. BUT i cant seem to get the text colour to change nor the list box background (i want to change that to gold with bright red text.

how would i go about changing these?????
Regardless of what is going on here, those are pretty ugly colours, i would just stick with the gray/white  :clap:


Retsim_X

he is writing some softawre for a gps system

it is for taxis so it needts to be fast enogh to not notice a wait.

my dll writen in masm32 (DAHHHH.....) has a dialog contained with in it that is called from his c# executable

when the dialog is displayed it loads all the streets of a cirtain town or area and uses predictive typing so the driver can select what street they are looking for and when they do, it returns the selected street name in a supplied address

i have figured how to paint the dialog and listboxs different coulors now but i have had nho success with trying to paint buttons with owner draw style

how do you do this is there anotther way??????

sluggy

Okay, now it is clear what you want to do. Check out the message CTLCOLORBUTTON, also put the words owner drawn button into the search field at the top of this page.
When i get home from work i will also check if i still have a little project i did a few years ago where i was doing owner drawn buttons on VB forms by calling from the VB code into a MASM dll - very similar to what you need to do.


petezl

I believe CTLCOLORBUTTON was phased out after win95 so it looks like owner drawn button is the way forward.
Cats and women do as they please
Dogs and men should realise it.