Steve,
FWIW I ported the IUP headers to jwasm.
James
.486
.model flat, c
option casemap :none
include \jwasm\include\crt\crt.inc
include \jwasm\iup\include\iup.inc
includelib \jwasm\wininc\Lib\msvcrt.lib
includelib \iup_dll6\iup.lib
;==============================================================================
CStr macro pszText:VARARG
local szText
.const
szText db pszText,0
.code
exitm <offset szText>
endm
;==============================================================================
.code
start:
call main
invoke exit,0
;==============================================================================
quit_cb proc
mov eax,IUP_CLOSE
ret
quit_cb endp
;==============================================================================
AddChild proc parent:PTR Ihandle,child:PTR Ihandle
invoke IupAppend,parent,child
invoke IupRefresh,parent
ret
AddChild endp
;==============================================================================
Create proc Value:PTR BYTE,Attr:PTR BYTE,parent:PTR Ihandle
LOCAL ihWnd:PTR Ihandle
mov ihWnd,0
invoke IupCreate,Value
.IF eax
mov ihWnd,eax
invoke strlen,Attr
.IF eax
invoke IupSetAttributes,ihWnd,Attr
.endif
.IF parent
invoke AddChild,parent,ihWnd
.endif
mov eax,ihWnd
.endif
ret
Create endp
;==============================================================================
main proc
LOCAL \
win:PTR Ihandle,\
vbox:PTR Ihandle,\
topBox:PTR Ihandle,\
serverFrame:PTR Ihandle,\
serverBox:PTR Ihandle,\
serverCombo:PTR Ihandle,\
btnFetch:PTR Ihandle,\
controlFrame:PTR Ihandle,\
controlBox:PTR Ihandle,\
btnAbout:PTR Ihandle,\
btnClear:PTR Ihandle,\
btnExit:PTR Ihandle,\
dictFrame:PTR Ihandle,\
serverList:PTR Ihandle,\
transFrame:PTR Ihandle,\
text:PTR Ihandle,\
bottomBox:PTR Ihandle,\
lbl:PTR Ihandle,\
entry:PTR Ihandle,\
btnSearch:PTR Ihandle,\
chkAll:PTR Ihandle,\
chkUTF:PTR Ihandle
invoke IupOpen,0,0
invoke Create,CStr("dialog"),CStr("TITLE=Thesaurus, SIZE=500x300"),NULL
mov win,eax
invoke Create,CStr("vbox"),CStr("MARGIN=10x10"), NULL
mov vbox,eax
invoke Create,CStr("hbox"),CStr(" GAP=10"), vbox
mov topBox,eax
invoke Create,CStr("frame"),CStr("TITLE=Servers, EXPAND=YES"), topBox
mov serverFrame,eax
invoke Create,CStr("hbox"),CStr("GAP=5"), serverFrame
mov serverBox,eax
invoke Create,CStr("list"),CStr("DROPDOWN=YES, SIZE=120x, EXPAND=HORIZONTAL, VALUE=1"), serverBox
mov serverCombo,eax
invoke Create,CStr("button"),CStr("TITLE=Fetch, SIZE = 50x"), serverBox
mov btnFetch,eax
invoke Create,CStr("frame"),CStr("TITLE=Controls"), topBox
mov controlFrame,eax
invoke Create,CStr("hbox"),CStr("Margin=6x6, GAP=5"), controlFrame
mov controlBox,eax
invoke Create,CStr("button"),CStr("TITLE=About, SIZE = 50x"), controlBox
mov btnAbout,eax
invoke Create,CStr("button"),CStr("TITLE=Clear, SIZE = 50x"), controlBox
mov btnClear,eax
invoke Create,CStr("button"),CStr("TITLE=Exit, SIZE = 50x"), controlBox
mov btnExit,eax
invoke IupSetCallback,btnExit,CStr("ACTION"),OFFSET quit_cb
invoke Create,CStr("frame"),CStr("TITLE=Dictionaries"), vbox
mov dictFrame,eax
invoke Create,CStr("list"),CStr("EXPAND=YES, VISIBLELINES=1"), dictFrame
mov serverList,eax
invoke Create,CStr("frame"),CStr("TITLE=Translation"), vbox
mov transFrame,eax
invoke Create,CStr("text"),CStr("MULTILINE=YES, EXPAND=YES"), transFrame
mov text,eax
invoke Create,CStr("hbox"),CStr("GAP=10"), vbox
mov bottomBox,eax
invoke Create,CStr("label"),CStr("TITLE=Enter Word to Search For:,SIZE=x12"), bottomBox
mov lbl,eax
invoke Create,CStr("text"),CStr(" EXPAND=HORIZONTAL"), bottomBox
mov entry,eax
invoke Create,CStr("button"),CStr("TITLE=Search, SIZE=50x"), bottomBox
mov btnSearch,eax
invoke Create,CStr("toggle"),CStr("TITLE=ALL, VALUE=ON,SIZE=x12"), bottomBox
mov chkAll,eax
invoke Create,CStr("toggle"),CStr("TITLE=UTF-8, SIZE=x12"), bottomBox
invoke AddChild,win,vbox
invoke IupShow,win
invoke IupSetFocus,btnFetch
invoke IupMainLoop
invoke IupClose
mov eax,0
ret
main endp
end start