News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

An Output Window easy to used

Started by ToutEnMasm, March 24, 2009, 04:03:05 PM

Previous topic - Next topic

ToutEnMasm


This want to replace the BLACK window not very pleasant to use.

With this code , you make a window with a richedit and you write in it
Quote
.NOLIST         
   include \masm32\include\masm32rt.inc
   include output.inc
   includelib output.lib

o_callback PROTO

;---------------      declare     -----------------------------------
                           
.const
.data
szUsage    db "I am an output window",13,10
      db "Include me as a library,with output.inc and output.lib",13,10
         db "call me with : invoke o_window",13,10
      db "create a PROC named o_callback without parameters",13,10
      db "Now you can write in me with o_print",13,10
      db 0
szsavingtext db 13,10,13,10,13,10
      db "To save text , select it and use CTRL-C",13,10
      db "It will be copied in the clipboard",13,10
      db "You can use also o_save",13,10
      db "Change the title of the window,with o_title",0
      db "see this sample or output.inc",13,10
      db 0
NewTitle   db "You know what ?,it's too easy",0      
NewFile   db "outputxyz.txt",0
.code
start:
   invoke o_window
   
   invoke ExitProcess,0
;################################################################
o_callback PROC
         Local  retour:DWORD
         mov retour,1
   invoke o_print,addr szUsage
   invoke o_print,addr szsavingtext
   invoke o_WindowHandle
   invoke o_title,addr NewTitle
   ;invoke o_save,addr NewFile
   
Findeo_callback:
         mov eax,retour
         ret
o_callback endp

;################################################################

end start

That's all




[attachment deleted by admin]