flat assembler
Message board for the users of flat assembler.

Index > Windows > Extended styles

Author
Thread Post new topic Reply to topic
kaafe



Joined: 15 Oct 2003
Posts: 18
kaafe 01 Nov 2003, 02:14
I wonder how can be use extended styles in fasmw for resources. There was a macro for this from comrade somewhere but did not worked for me. I think dialog also needs DIALOGEX or such thing. Anybody help?
Post 01 Nov 2003, 02:14
View user's profile Send private message Reply with quote
BiDark



Joined: 22 Jun 2003
Posts: 109
Location: .th
BiDark 01 Nov 2003, 15:25
Try to post you resource code first so we could help you analysis (actually the normal dialogbox macro can use exstyles).
Post 01 Nov 2003, 15:25
View user's profile Send private message Reply with quote
silkodyssey



Joined: 02 Oct 2003
Posts: 198
Location: St.Vincent & the Grenadines
silkodyssey 01 Nov 2003, 18:31
Is it possible with the fasm resource macros to give a dialog a classname so that I can use it as the main window of a program?

_________________
silkodyssey
Post 01 Nov 2003, 18:31
View user's profile Send private message MSN Messenger Reply with quote
kaafe



Joined: 15 Oct 2003
Posts: 18
kaafe 02 Nov 2003, 02:57
Thanks but nothing special. Just try to test with dialog example in FasmW. I removed WS_BORDER and added WS_EX_STATICEDGE(of course in right place) for editbox. Nothing changed except, editbox has any border.

Do you success?
Post 02 Nov 2003, 02:57
View user's profile Send private message Reply with quote
comrade



Joined: 16 Jun 2003
Posts: 1150
Location: Russian Federation
comrade 02 Nov 2003, 03:44
Code:
macro dialogitem class,title,id,x,y,cx,cy,style,exstyle
 { dd style or WS_CHILD,exstyle +0
   dw x,y,cx,cy,id
   if class eq 'BUTTON'
   dw 0FFFFh,80h
   else if class eq 'EDIT'
   dw 0FFFFh,81h
   else if class eq 'STATIC'
   dw 0FFFFh,82h
   else if class eq 'LISTBOX'
   dw 0FFFFh,83h
   else if class eq 'SCROLLBAR'
   dw 0FFFFh,84h
   else if class eq 'COMBOBOX'
   dw 0FFFFh,85h
   else
   du class,0
   end if
   if title eqtype 0
   dw 0FFFFh,title
   else
   du title,0
   end if
   dw 0
   align 4
   dialog_items_counter = dialog_items_counter + 1 }    

_________________
comrade (comrade64@live.com; http://comrade.ownz.com/)
Post 02 Nov 2003, 03:44
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
kaafe



Joined: 15 Oct 2003
Posts: 18
kaafe 02 Nov 2003, 19:52
Seems everybody has different resource include, except comrade, he uses standard. If anybody get a clientedge dialogbox, or staticedge editbox then please show me an example and resource include macro please.

I believe that nobody tried this yet.

Have a nice day
Post 02 Nov 2003, 19:52
View user's profile Send private message Reply with quote
smoke



Joined: 16 Jan 2006
Posts: 42
smoke 09 Sep 2006, 21:34
hmm i have the same problem (as the creator of this thread) ... dont know how to use that DIALOGEX extended dialog , so i will be able to use the extended styles for the dialog items (buttons , textboxes , etc) anyone knows ?

here's the code:
Code:
section '.rsrc' resource data readable
 
  directory RT_DIALOG,dialogs 

  resource dialogs,\ 
           37,LANG_ENGLISH+SUBLANG_DEFAULT,main
   

  dialog main,'Keygen Template',70,70,200,90,WS_POPUP+WS_SYSMENU+DS_MODALFRAME+DS_CENTER,0,0,'Arial',8
    dialogitem 'EDIT','',ID_CAPTION,60,10,130,12,WS_VISIBLE+WS_TABSTOP
    dialogitem 'EDIT','',ID_CAPTION1,60,30,130,12,WS_VISIBLE+WS_TABSTOP
    dialogitem 'STATIC','Name:',ID_NAME,8,10,20,8,WS_VISIBLE+WS_TABSTOP+BS_TEXT
    dialogitem 'BUTTON','Generate',ID_GENERATE,20,57,70,20,WS_VISIBLE+WS_TABSTOP+BS_PUSHBUTTON
    dialogitem 'BUTTON','Exit',ID_EXIT,110,57,70,20,WS_VISIBLE+WS_TABSTOP+BS_PUSHBUTTON
    dialogitem 'STATIC','Serial:',ID_SERIAL,8,30,20,8,WS_VISIBLE+WS_TABSTOP+BS_TEXT
  enddialog
    

only the rsrc section ... i hope someone can help me , so i wont have to use that RadASM for my resources ...
Post 09 Sep 2006, 21:34
View user's profile Send private message Reply with quote
Reverend



Joined: 24 Aug 2004
Posts: 408
Location: Poland
Reverend 10 Sep 2006, 11:28
To use extended styles, you DON'T need DIALOGEX! Look at the beginning of macro definition:
Code:
macro dialogitem class,title,id,x,y,cx,cy,style,exstyle    
See the 'exstyle' at the end? Just pass all arguments in correct order, including extended style at the end.

The only difference between DIALOG and DIALOGEX resource statements is that DIALOGEX allows including information about font. Extended styles are allowed in both versions.
Post 10 Sep 2006, 11:28
View user's profile Send private message Visit poster's website Reply with quote
smoke



Joined: 16 Jan 2006
Posts: 42
smoke 10 Sep 2006, 13:48
Reverend, thanks very much - it works now , i did it like this :
Code:
    dialogitem 'BUTTON','Generate',ID_GENERATE,20,57,70,20,WS_VISIBLE or WS_TABSTOP or BS_PUSHBUTTON,WS_EX_STATICEDGE
    


but im kinda curious ... how does that RadASM create the DIALOGEX ? :p
Post 10 Sep 2006, 13:48
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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.