flat assembler
Message board for the users of flat assembler.
Index
> Windows > Resourse in Iczelion tut |
Author |
|
UCM 31 Jul 2006, 13:12
Look at vbVeryBeginner's translation of Iczelion's tutorials to FASM, available at http://sulaiman.netadvant.com/ .
|
|||
31 Jul 2006, 13:12 |
|
DMD 01 Aug 2006, 08:25
UCM wrote: Look at vbVeryBeginner's translation of Iczelion's tutorials to FASM, available at http://sulaiman.netadvant.com/ . Thanks, certainly.. There will be a minute - try №10 - it is very instructive! Who can will prompt as correctly to work with contorls and menu in FASM? |
|||
01 Aug 2006, 08:25 |
|
farrier 01 Aug 2006, 09:48
DMD,
Attached is some code from a program I am translating into FASM, most of the button related code is removed in order to show the controls themselves. The dialog uses RadioButtons, CheckBoxes, ComboBoxes, Buttons, StatusBar, VersionInfo, Manifest, and a DateTimeControl. Also an icon is used for the program icon itself and as a static control/display. vbVeryBeginner's work is an excellent place to start!! hth, farrier
_________________ Some Assembly Required It's a good day to code! U.S.Constitution; Bill of Rights; Amendment 1: ... the right of the people peaceably to assemble, ... The code is dark, and full of errors! |
|||||||||||
01 Aug 2006, 09:48 |
|
DMD 01 Aug 2006, 15:31
farrier wrote: DMD, Ok, may be.. may be... you can see the result in attachment.. If I ask a help - it's mean all other way was checked... I'll try your code. Thanks! Best regards!
|
||||||||||
01 Aug 2006, 15:31 |
|
farrier 03 Aug 2006, 03:49
DMD,
Look at Tutorial 10 in the vbVeryBeginner translation. It is written as a Dialog as Main example--just like Iczelions' 10-2--and should be what you are looking for! hth, farrier _________________ Some Assembly Required It's a good day to code! U.S.Constitution; Bill of Rights; Amendment 1: ... the right of the people peaceably to assemble, ... The code is dark, and full of errors! |
|||
03 Aug 2006, 03:49 |
|
DMD 03 Aug 2006, 10:43
farrier wrote: DMD, farrier, yes, you are right.. almost at first, code vbVeryBeginner not works correctly. second, in the original this tutorial and in the vbVeryBeginner translation resource define via *.RES file. It's not fine. I try to find how I can define resources as usual: section '.rsrc' resource data readable directory RT_DIALOG, ialogs, RT_ICON, cons, R_GROUP_ICON, roup_icons and ect. You can see youself in the RESOURCE.INC: macro dialog label,title,x,y,cx,cy,style,exstyle,menu,fontname,fontsize it's mean that we can define ALL this options... but... HOW ps. between us.. in attachment source and exe by Sulaiman aka vbVeryBeginner. spent 1 min for me and try this Can you repeat "vbVeryBeginner's work is an excellent place to start!!" one more time?
|
|||||||||||
03 Aug 2006, 10:43 |
|
shoorick 03 Aug 2006, 11:55
this is because these tutorials were written under 9x intentionally.
place xor eax,eax at the end of window proc: Code: wmBYE: pop edi esi ebx xor eax,eax ret ; urn and it will work ok under 2k/xp |
|||
03 Aug 2006, 11:55 |
|
DMD 03 Aug 2006, 13:17
I see
ok, it's help partly... - menu is absent it's all the same. Main question was about parameters macro "dialog" (see upper) Who can help? |
|||
03 Aug 2006, 13:17 |
|
shoorick 03 Aug 2006, 14:03
if you wish no suffer - use rc compiler. what a reason to not use it? there are a lot of free tools except from ms: borland free commandline tools have it, watcom package, goasm package, pelle's c package, etc. i have no anything against macros, but i just have no time to calculate pixels etc...
|
|||
03 Aug 2006, 14:03 |
|
farrier 04 Aug 2006, 05:17
DMD,
After changing the return at the end of the wmBYE: segment to: Code: xor eax, eax
ret
The menu still did not show up as you have stated! I used Resource Hacker--http://www.angusj.com/resourcehacker/--to view the resources of the MASM32 assembled version and the version created by FASMW 1.67.7; they were different in one substantial way Resoiurce Hacker report for MASM32 version: Menu: Code: 3003 MENU LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US { POPUP "Test Controls" { MENUITEM "Get Text", 32000 MENUITEM "Clear Text", 32001 MENUITEM SEPARATOR MENUITEM "E&xit", 32003 } } Dialog: Code: MYDIALOG DIALOG 10, 10, 205, 60 STYLE DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Our Second Dialog Box" MENU 3003 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US { CONTROL "", 3000, EDIT, ES_LEFT | ES_AUTOHSCROLL | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 15, 17, 111, 13 CONTROL "Say Hello", 3001, BUTTON, BS_DEFPUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 141, 10, 52, 13 CONTROL "E&xit", 3002, BUTTON, BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 141, 26, 52, 13 } Resoiurce Hacker report for FASM version: Menu: Code: 30 MENUEX LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL { POPUP "Test Controls", 0, MFT_STRING, MFS_ENABLED, 0 { MENUITEM "Get Text", 32000, MFT_STRING, MFS_ENABLED MENUITEM "Clear Text", 32001, MFT_STRING, MFS_ENABLED MENUITEM "", 0, MFT_SEPARATOR, MFS_ENABLED MENUITEM "E&xit", 32002, MFT_STRING, MFS_ENABLED } } Dialog: Code: 31 DIALOG 10, 10, 205, 60 STYLE DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_NOPARENTNOTIFY | WS_EX_TOPMOST | WS_EX_ACCEPTFILES CAPTION "Our First Dialog Box" LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL FONT 8, "MS Sans Serif" { CONTROL "", 3000, EDIT, ES_LEFT | ES_AUTOHSCROLL | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 15, 17, 111, 13 CONTROL "Say Hello", 3001, BUTTON, BS_DEFPUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 141, 10, 52, 13 CONTROL "E&xit", 3002, BUTTON, BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 141, 26, 52, 13 } FASM uses MENUEX vs. MASM using MENU, but the significant difference is the absence of a reference to the Menu resource within the Dialog resource. In the MASM dialog resource, the is a line: Code: MENU 3003 and there is no reference to the Menu resource in the FASM dialog resource. Using Resource Hackers ability to modify an EXE files resource, I added the line: Code: MENU 30 and saved the modification. With this modification, the FASM EXE worked as expected. I'm going to look at the FASM resource macros, but I get easily confused trying to figure out what these macros do! They work great, I just don't understand them! farrier _________________ Some Assembly Required It's a good day to code! U.S.Constitution; Bill of Rights; Amendment 1: ... the right of the people peaceably to assemble, ... The code is dark, and full of errors! |
|||
04 Aug 2006, 05:17 |
|
farrier 04 Aug 2006, 17:02
DMD,
Easily fixed! You--and I--looked at the problem but didn't see it. On the line describing the Dialog resource: Code: dialog dlgMain,'Our First Dialog Box',10,10,205,60,\ DS_CENTER + WS_CAPTION + WS_MINIMIZEBOX + WS_SYSMENU + WS_VISIBLE + WS_OVERLAPPED + DS_MODALFRAME + DS_3DLOOK,30 the last parameter here is actually where the exstyle should be: Code: macro dialog label,title,x,y,cx,cy,style,exstyle,menu,fontname,fontsize To make it work, change the line to: Code: dialog dlgMain,'Our First Dialog Box',10,10,205,60,\ DS_CENTER + WS_CAPTION + WS_MINIMIZEBOX + WS_SYSMENU + WS_VISIBLE + WS_OVERLAPPED + DS_MODALFRAME + DS_3DLOOK,0,30 And I still say the vbVeryBeginner translations are a great place to start. Look how much I learned!! They're just not perfect! farrier _________________ Some Assembly Required It's a good day to code! U.S.Constitution; Bill of Rights; Amendment 1: ... the right of the people peaceably to assemble, ... The code is dark, and full of errors! |
|||
04 Aug 2006, 17:02 |
|
DMD 11 Aug 2006, 11:26
farrier wrote: And I still say the vbVeryBeginner translations are a great place to start. Look how much I learned!! They're just not perfect! farrier, "And I still say the vbVeryBeginner translations are a great place to start. Look how much I learned!! They're just not perfect!" I see. Congratulation! As for me, If "a great place to start", it`s cannot be "They're just not perfect!" If "They're just not perfect!" cannot be "a great place to start" At us it names to confuse sour with red! Sorry... May be You know answer on this very old question? Whether the God can create a stone which cannot lift himself? If - can - he allmighty but it is not omnipotent If - is not - he not allmighty.. Course, I know right answer! And You? If seriously, this is http://www.winasm.net/forum/index.php?showtopic=943 has name "Nice job"... |
|||
11 Aug 2006, 11:26 |
|
MHajduk 11 Aug 2006, 12:04
DMD wrote: Whether the God can create a stone which cannot lift himself? If I remember correctly, this paradox was invented by Polish mathematician Stefan Banach when he was a schoolboy. Banach asked this question to the priest and totally confused him. Regards, M.H. |
|||
11 Aug 2006, 12:04 |
|
shoorick 11 Aug 2006, 12:28
bad tutorials can make better experience: "if everybody says excellent and easy (even if they were not try it ) - why i cann't??? i shall!!!"
|
|||
11 Aug 2006, 12:28 |
|
vbVeryBeginner 11 Aug 2006, 13:20
lol
yo yo dmd, farrier :p sorry for all the problem u got while learning, the source couldn't be copy & paste and assemble directly coz there were changes from the fasm i used last time compare to current fasm. regarding the .res file, i just use that to learn how to use the .res file and btw, ( i was a newbie back then ) i did those tutorial as my exercise to understand asm and windows programming. btw, regarding, Whether the God can create a stone which cannot lift himself? it is like if the power of God is infinity eg, - infinity to 0 to + infinity. then you ask God to create a number (biggest number) which the number cannot grow anymore. the problem is, the meaning of all the words/number/sequence we used are reside on the power of God, they are all created by God, (God can change them if God so wishes) and when they were created and during the creation, they already proved themselves they are lower than the power of creation and their existence relied on the power of God. the logic is, how could a "created" thing be so powerful to stop the power that created that thing? and no matter how powerful the created thing could go, it couldn't change the fact/history that its existence was due to power that created it. so the statement, "Whether the God can create a stone which cannot lift himself?" is actually invalid and contradicted in itself. imho. |
|||
11 Aug 2006, 13:20 |
|
DMD 14 Aug 2006, 10:23
MHajduk wrote:
MHajduk, I can imagine this talk! Of course, priest not was the professor of theology. But we know answer... vbVeryBeginner wrote:
vbVeryBeginner, You are not quite right because using method by syllogism: invalid as actually invalid. Ok, the answer is: Got as extra-essence do not permit self-contradiction. We can't to use ordinary logic for him. If it is necessary to create - will create if to lift - will lift. So, let's stop flame(flood). And continue coding! vbVeryBeginner, I understand your thought about your translated tutorials. I think all tutorials originally was make as "copy & paste". It's logically. imho. Else what for needs posting examples include heading and source of all section: .data, .idata, .rsrc? On my mind, it's very deeper and difficult problem: How teach? Everyone answers himself... shoorick wrote: bad tutorials can make better experience: "if everybody says excellent and easy (even if they were not try it ) - why i cann't??? i shall!!!" Mr shoorick only has confirmed my thoughts! Have a nice day and good code! |
|||
14 Aug 2006, 10:23 |
|
vbVeryBeginner 14 Aug 2006, 16:24
|
|||
14 Aug 2006, 16:24 |
|
shoorick 14 Aug 2006, 20:43
there is need to separate examples from tutorials. own projects, written once ago to understand some and then shared can not be tutorials, of course. tutorials have to be written by man, experienced both in subject, and in "teaching technology": source has to be clean, has no any not understandable, teacher has to guess possible mistakes, thus, not only comment "here we do this", but also note what can be if we omit this, or why we have to do this. tutorials always supposed some level of student, etc... etc... it's not easy to write good tutorial in real. From other side we have what we have, and thanks that we have anything to start at all
regards! |
|||
14 Aug 2006, 20:43 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.