Assembly code snippets

Back to the snippets overview

Details

Title$RGB
AuthorQvasiModo
Submitted by:QvasiModo
Date added:2003-07-23 19:14:14
Date modified:2003-07-23 19:15:11

Comments

The $RGB macro returns a COLORREF dword, and takes immediate values as params.

Snippet

;needs immediate values as params
;returns 00bbggrr (COLORREF order)
$RGB MACRO red,green,blue
    EXITM %(((blue) SHL 16) OR ((green) SHL 8) OR (red))
ENDM