News:

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

Colors

Started by Shooter, December 31, 2010, 02:41:52 AM

Previous topic - Next topic

Shooter

Quote from: donkey on January 02, 2011, 09:59:46 PM
That list is available by downloading the development kit and checking the indexes that OllyDbg passes to its syntax highlighter in the plugin header.

Edgar,
In my hastened search I haven't yet located the development kit on ollydbg.de website. Am I just not seeing it, or is it someplace else?

-Shooter
Never use direct references to anything ever. Bury everything in
macros. Bury the macros in include files. Reference those include
files indirectly from other include files. Use macros to reference
those include files.

dedndave

http://ollydbg.de/download.htm

bottom of the page
note - it is for v 1.10  :'(

xandaz

   Does rgbResult represent the color chosen by the user? is it a pointer? or does the result come in EAX? thanks

xandaz

   its just that i was using choosecolor but cant get the color out. rbgResult i always zero wether i use the Structures dword variable or point it to somewhere. does anyone have an example? Thanks

MichaelW

The rgbResult member is the COLORREF value of whatever color was selected when the user clicked the OK button, which could be zero if the selected color was black.

;=========================================================================
; Build as console app.
;=========================================================================
    include \masm32\include\masm32rt.inc
;=========================================================================
    .data
        ;-------------------------------------------------
        ; These RGB values approximate the default colors
        ; for the first 16 VGA Color (DAC) registers.
        ;-------------------------------------------------
        cust  dd 00000000h,00aa0000h,0000aa00h,00aaaa00h
              dd 000000aah,00aa00aah,000055aah,00aaaaaah
              dd 00555555h,00ff5555h,0055ff55h,00ffff55h
              dd 005555ffh,00ff55ffh,0055ffffh,00ffffffh
        cc    CHOOSECOLOR <>
    .code
;=========================================================================
start:
;=========================================================================
    mov cc.lStructSize, SIZEOF CHOOSECOLOR
    mov cc.lpCustColors, OFFSET cust
    mov cc.Flags, CC_SOLIDCOLOR
    invoke ChooseColor, ADDR cc
    print str$(eax),13,10
    print hex$(cc.rgbResult),"h",13,10,13,10

    inkey "Press any key to exit..."
    exit
;=========================================================================
end start

eschew obfuscation

xandaz

    Sorry... it seems there was no problem there. I can't seem to set the color depth to display colors in my little app.

hutch--

Dave is right here, the most reliable way to specify a colour is in COLORREF format, 00BBGGRRh where blue is BB, green is GG and red is RR. The leading 00 is used with RGB/a (alpha channel) for transparency.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

dedndave

Henry Ford (refering to available colors for the model A)
"You can have any color you like, as long as it's black"   :P