flat assembler
Message board for the users of flat assembler.

Index > Windows > Who can support cursor resource macro define ?

Author
Thread Post new topic Reply to topic
Kevin_Zheng



Joined: 04 Jul 2003
Posts: 125
Location: China
Kevin_Zheng
Dear All:
The "cursor" resource macro doesn't present in resource.inc, So I can't define some cursor resources on the exe file.
I don't think to use the "res from" syntax, Who can support it through macro define?

Thank you.
Post 09 Feb 2004, 10:22
View user's profile Send private message MSN Messenger Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3502
Location: Bulgaria
JohnFound
Here is one from Fresh macro library. I use it before to turn to use of .res files. I hope it will be usefull.
Code:
macro cursor [group,_label,cursor_file] {
  forward
    local _header, _data,_size,_position,_hotX, _hotY, _xsize, _ysize

    load _xsize     byte  from cursor_file:$06
    load _ysize     byte  from cursor_file:$07
    load _hotX      word  from cursor_file:$0a
    load _hotY      word  from cursor_file:$0c
    load _size      dword from cursor_file:$0e
    load _position  dword from cursor_file:$12

    align 4

    group   dd    RVA _header, $14, 0, 0

    _header dw    0, 2, 1
            dw    _xsize, _ysize
            dw    $1                     ; Planes ???
            dw    $00                     ; Bit count ???
            dd    _size+4                    ; Resource len

    filter_id = RVA _label

            dw    _label#.resid

    _label dd RVA _data, _size+4, 0, 0

    _data dw _hotX, _hotY
            file    cursor_file:_position,_size
}

    
Post 09 Feb 2004, 10:45
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
Kevin_Zheng



Joined: 04 Jul 2003
Posts: 125
Location: China
Kevin_Zheng
Dear Johnfound:
Thank you very much. It worked normally.
The attached file is my test icon and cursor program. It's worked OK.


Description:
Download
Filename: icon.zip
Filesize: 36.06 KB
Downloaded: 151 Time(s)

Post 09 Feb 2004, 11:23
View user's profile Send private message MSN Messenger Reply with quote
FrozenKnight



Joined: 24 Jun 2005
Posts: 128
FrozenKnight
can someone please update this to v1.62 macro format?

I'm still learning the macros.
Post 29 Jun 2005, 11:04
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.