flat assembler
Message board for the users of flat assembler.

Index > Windows > Help plz icon error!!!!!

Author
Thread Post new topic Reply to topic
senolc_eht



Joined: 22 Mar 2004
Posts: 57
Location: Indonesia
senolc_eht 04 Nov 2004, 20:55
can anybody help me to solve my problems???

I have a code like this.....

Code:
format PE GUI 4.0
entry start

include 'D:\Data\Antony\Programming\fasmw151\INCLUDE\win32a.inc'
starinfo STARTUPINFO
process PROCESSINFO
commandline db "minipad.exe",0
section '.code' code readable executable

  start:
          invoke  GetModuleHandle,0
          invoke LoadIcon,eax,1
          invoke GetStartupInfo, starinfo
          invoke CreateProcess,NULL,commandline,NULL,NULL,FALSE,NULL,NULL,NULL,starinfo,process
          invoke ExitProcess,0

section '.idata' import data readable writeable

  library kernel,'KERNEL32.DLL',\
          user,'USER32.DLL'


  import kernel,\
         GetModuleHandle,'GetModuleHandleA',\
         CreateProcess,'CreateProcessA',\
         GetStartupInfo,'GetStartupInfoA',\
         ExitProcess,'ExitProcess'

  import user,\
         LoadIcon,'LoadIconA'

section '.rsrc' resource data readable

 directory  RT_ICON,icons,\
            RT_GROUP_ICON,group_icons

 resource icons,\
           1,LANG_NEUTRAL,icon_data

  resource group_icons,\
           17,LANG_NEUTRAL,main_icon

  icon main_icon,icon_data,'ragnarok.ico'    


==================================

but after i compile it i got an bad icon in my application, can anybody help..

thank you very much for the help

[edit by moderator]please use the [ code ] [ / code ] tags around sections of code[/edit by moderator]


Description:
Filesize: 24.9 KB
Viewed: 2743 Time(s)

icon.JPG



_________________
sorry if i always asking.....
Post 04 Nov 2004, 20:55
View user's profile Send private message Yahoo Messenger Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2139
Location: Estonia
Madis731 04 Nov 2004, 21:17
Seems like Win98?
it could only happen in conversion from *.ico to raw to display in app.
There seems to be less colours ^o) hmm...I know it does not depend on
that but what is your desktop palette?
Post 04 Nov 2004, 21:17
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
Joshua



Joined: 12 Jul 2003
Posts: 56
Location: Belgium
Joshua 04 Nov 2004, 22:16
An ico file can contain more than one icon: one in 16*16 16color, one in 16*16 256color, one in 32*32... The FASM resource macro just uses the first icon from the icon file. Search the board here for an extended version of the macro, which will allow you to choose the icon you want
Post 04 Nov 2004, 22:16
View user's profile Send private message Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2139
Location: Estonia
Madis731 05 Nov 2004, 10:37
Oh, THAT is the problem...sorry, ignore my question.
Didn't know the rawimage is translated ONLY from the first icon Razz
Post 05 Nov 2004, 10:37
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger 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-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.