Recent Posts

Pages: [1] 2 3 ... 10
1
MasmBasic & the RichMasm IDE / Re: Cairo
« Last post by HSE on Today at 05:44:31 AM »
P.S.: For the old MasmBasic package, the latest version of the Declare macro posted here for HSE is needed; insert an include before Dll...

And s$Len?  :biggrin:
2
MasmBasic & the RichMasm IDE / Re: Cairo
« Last post by HSE on Today at 05:39:37 AM »
Here are the sources of the demo application.

I think the code is not ObjAsm32 compatible  :biggrin: :biggrin: :biggrin:

Something is silently not working with AsmC (perhaps is a diferent Defined ¿?).


3
UASM Assembler Development / Re: UASM 2.47 Available
« Last post by rsala on Today at 05:31:14 AM »
Hi,

Easy Code v2 64-bit compiles and works fine with this new version of UASM.

Congratulations!
4
Irvine Book Questions. / Re: help please: masm32 input dialog box
« Last post by Vortex on Today at 05:24:27 AM »
Hi Jochen,

You are right, some explanation is required. The previous version of InputBox.exe copied the keyboard input to the registry. The command is simple :

Code: [Select]
InputBox.exe "Type yes to continue, no to exit" "Hello" 100 100
Code: [Select]
InputBox PROTO pText:DWORD,\      ; address of the text to be displayed in the static control
               pCaption:DWORD,\   ; address of the title of the input box
               pBuffer:DWORD,\    ; address of the buffer receiving the input text
               xpos:DWORD,\       ; x-coordinate of the input box
               ypos:DWORD,\       ; y-coordinate of the input box
               pStringLen:DWORD   ; pointer to the number of characters received to the input box

A separate tool was required to read the string stored in the registry :

Code: [Select]
FOR /F "delims=" %%A in ('ReadInputBox.exe') do SET choice=%%A
The output of ReadInputBox.exe is assigned to the variable choice.

A better solution is to write the string received by the input box to the console ( v1.02 ) :

Code: [Select]
FOR /F %%A in ('InputBox.exe "Type yes to continue, no to exit" "Hello" 100 100') do SET string=%%A
No need of ReadInputBox. The FOR loop sets the variable string to the output of InputBox.exe.

5
UASM Assembler Development / Re: UASM 2.47 Available
« Last post by LiaoMi on Today at 05:08:30 AM »
Thanks for the work you've done! What about lambda functions?  :P
6
MasmBasic & the RichMasm IDE / Re: Cairo
« Last post by jj2007 on Today at 05:05:39 AM »
And here is the full source of my version. The attachment contains also the adapted version that uses biterider's Cairo.inc, which I finally got working - thanks, biterider :icon14:

@Timo: No problem with lib, it works. Biterider's version needs the Cairo.lib, but my version below doesn't; both need Cairo.dll (which raises the question what the added value of a static lib is ... I see that relatively often in packages coming from the Linux world 8))

GuiParas equ "Cairo demo", x550, y20, w160, h180, cblack, b RgbCol(255, 255, 160)
include \masm32\MasmBasic\Res\MbGui.asm        ; pure MasmBasic :P
Dll "\Masm32\Cairo\lib\x86\cairo.dll"          ; suggested path to the Dll (Cairo.lib is not needed)
Declare cairo_version                          ; hit F6 to build; this version works from any folder
Declare cairo_win32_surface_create, C:1
Declare cairo_create, C:1
Declare void cairo_rectangle, C:5
Declare void cairo_set_source_rgba, C:5
Declare void cairo_set_fill_rule, C:2
Declare void cairo_fill, C:1
Declare void cairo_destroy, C:1
Declare void cairo_surface_write_to_png, C:2
Declare void cairo_surface_destroy, C:1
Declare void cairo_status, C:1                 ; for context errors
Declare void cairo_surface_status, C:1         ; for surface errors
Declare void cairo_status_to_string, C:1       ; for all errors
Enum 0:CAIRO_FILL_RULE_WINDING, CAIRO_FILL_RULE_EVEN_ODD       ; for usage, click here
SetGlobals surface, context, ctGuiRefresh, double red, green, blue

Event Timer
  If_ ctGuiRefresh<100 Then mcs inc ctGuiRefresh : GuiRefresh   ; show random colours for a few seconds

Event Paint
  invoke TextOut, PtDC, 9, 5, Str$("Cairo version %i\n", cairo_version()), s$Len
  mov surface, cairo_win32_surface_create(PtDC)
  mov context, cairo_create(eax)
  cairo_rectangle(context, FP8(20.0), FP8(30.0), FP8(100.0), FP8(100.0))
  Rand(0.0, 1.0, red)
  Rand(0.0, 1.0, green)         ; generate random colours
  Rand(0.0, 1.0, blue)
  cairo_set_source_rgba(context, red, green, blue, FP8(0.7))    ; last arg: 0=fully transparent, 1.0=opaque
  cairo_set_fill_rule(context, CAIRO_FILL_RULE_EVEN_ODD)
  cairo_fill(context)
  cairo_destroy(context);
  ; cairo_surface_write_to_png(surface, "test.png")    ; optional: saves client area to disk
  cairo_surface_destroy(surface)
GuiEnd


P.S.: For the old MasmBasic package, the latest version of the Declare macro posted here for HSE is needed; insert an include before Dll...
7
MasmBasic & the RichMasm IDE / Re: Cairo
« Last post by TimoVJL on Today at 04:38:21 AM »
cairo-windows-1.15.12 have lib files for it, so what was the problem with them?
calling convention is C __cdecl

CONS: PDF don't work :(
8
MasmBasic & the RichMasm IDE / Re: Cairo
« Last post by Biterider on Today at 04:05:10 AM »
Hi
Here are the sources of the demo application.
Biterider
9
ObjAsm / Re: Fusion
« Last post by HSE on November 20, 2018, 11:25:58 PM »
Hi Biterider!!

   ObjAsm32 is a very mature tool now, and it will be usefull for long time (32 bit PC also will be here some more time) without heavy modifications (if any).

   If ObjAsm64 become dual that could be very interesting, even if that result totally incompatible with ObjAsm32  :t


   
     

   
10
The Campus / Re: WS_TABSTOP for Dialogs created with CreateDialogParam
« Last post by AW on November 20, 2018, 10:57:57 PM »
What is the difference between using this method and using DialogBoxParam (For the parent)?
DialogBoxParam is for modal dialog boxes - this is clearly mentioned in the online reference from Microsoft. So, if you changed your mind, use it.
Pages: [1] 2 3 ... 10