The MASM Forum

General => The Campus => Topic started by: cyber48PGL on April 03, 2014, 03:33:53 AM

Title: Need Help !
Post by: cyber48PGL on April 03, 2014, 03:33:53 AM
Hi Buddies!


I want to make an application which could allow me to insert three numbers in three different comboboxes . Here appears the problem . I don't know how I could take the "string" from the combobox and convert it to an integer ...
I will be very glad if you could give me any ideas .
( I started from the example attached )

Regards!
Title: Re: Need Help !
Post by: jj2007 on April 03, 2014, 03:37:36 AM
Check \Masm32\help\masmlib.chm, "Conversions".
Title: Re: Need Help !
Post by: Force on April 03, 2014, 09:37:54 AM
There is an example code named " basic maths "
hope it will help you

http://members.a1.net/ranmasaotome/projects.html  (http://members.a1.net/ranmasaotome/projects.html)
Title: Re: Need Help !
Post by: cyber48PGL on April 03, 2014, 11:32:09 PM
Thank you !
Title: Re: Need Help !
Post by: cyber48PGL on April 08, 2014, 05:10:39 AM
I've got one more question .

How could I printf in the Messagebox a message like this : "The result is : (result)" , where (result) is the actual result  .

Thank you in advance !
Title: Re: Need Help !
Post by: Vortex on April 08, 2014, 05:22:18 AM
Hi cyber48PGL,

Here is a quick example :

include     \masm32\include\masm32rt.inc

.data

_title      db 'Test',0
_format     db 'x = %d',0

.data?

buffer      db 8 dup(?)

.code

start:

    invoke  wsprintf,ADDR buffer,ADDR _format,100

    invoke  MessageBox,0,ADDR buffer,ADDR _title,MB_OK

    invoke  ExitProcess,0

END start
Title: Re: Need Help !
Post by: cyber48PGL on April 08, 2014, 05:32:47 AM
Thank you very much !