News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

1st steps, 1st problem

Started by SHDA, January 31, 2015, 06:13:07 PM

Previous topic - Next topic

SHDA

Hello guys.

After some adventures and pointless time with C++ and Delphi
i am trying to start for good with assembly. A past project that
most of it have been done in Delphi 7 SE (but i never finished it)
will be my goal while learning step-by-step and setting it up in
assembly. (*)

As Greek polytonic language and characters will be the main
codepage as data and content manupulation to be presented,
(localization will be an option for menus etc) i tried to setup the
1st main form (DialogAsMain.tpl) in RADasm under masm32.

I've just make an addition to IDD_DIALOG Dialog (Resource file)
by adding a Greek word to it, but once i press enter or tab the caption
becomes as "Dialog As Main ????a?d???". I have change the DIALOG
properties of LANGUAGE to LANG_GREEK
and after enter or tab in the Language field the values of "8,1" appeared.
I have save the resource file, re-build the project but i've got no Greek
letters appeared in the Dialog's title.
I have tried the addition of UNICODE equ 1 before include statement,
nothing.
Any help please?

I am using:
   VMware 11
   Windows 7 x64 Ultimate
   masm32 installation (vanila)
   RadAsm 2013

(*) Ancient & Modern Greek Literature. A totaly free application.

jj2007

Hi SHDA,

When you open the resource file in Notepad or Wordpad, do you see Greek or ???? characters?

MasmBasic's editor called RichMasm handles Greek etc just fine, and menus are no problem, but I have no idea if it's compatible with RadAsm. I attach a sample Win GUI "project", where only the menu titles are translated. To build it, RichMasm needs only the *.asc file (which you could also see in MS Word or Wordpad), but I have included also the rc file. I am curious if RadAsm can edit the resource, let me know.

Check the source for invoke AppendMenuW, hMenu, MF_POPUP, hM1, uCat$("&φάκελος")

SHDA

jj2007,
thank you very much for your reply.

I can't see the Greek characters in my .rc file at all.
Even if i tried to edit the file by adding the Greek
characters and then save it as UTF-8, RADASM
found an error that couldn't re-build the project. (Mine project, not yours)
(If i got your point, maybe it is RADASM's problem, and not masm32. Ok,
but if yes what about a masm32 source example from somebody here ?
Will this cost me a lot ?  :biggrin:
)

For your project that you have send to me (thank you, my  Italian neighbour  :biggrin:)
i can see Greek in all 3 menus while i am running your .exe. Also in the code .asm.
But i don't have RichMasm found in my installation.
As for the resource file i will try it and i will inform you.

ragdog

Can you upload you project to view  whats the problem is?

SHDA

ragdog,
thank you for your reply.
Here is the whole project directory in a .zip form. As i said
it is a RADASM project file from my custom D:\_InProg\_RADasm-3009c\MASM\Projects location.
I have include a text file with two Greek words saved as UTF-8: Greek_InsertionWords.txt

jj2007

Quote from: SHDA on January 31, 2015, 10:18:54 PMBut i don't have RichMasm found in my installation.

Just add MasmBasic to your Masm32 installation, it's straightforward; the editor will be in \Masm32\MasmBasic\RichMasm.exe. Once you see the help file, use File/Open to load the *.asc file, then hit F6 when you see the source in front of you.

RichMasm is a very idiosyncratic editor, though - not everybody's taste. If you want to use RadAsm instead, you need a solution for editing your rc files in Unicode format. Otherwise, edit the rc files only with RichMasm and use File/Save As with "Unicode RC format".

ragdog

Hi

I have test it but i have add "Αλέξανδρος" manually to the resource and save it to Unicode and it works
I think Radasm (RaRes) support not unicode but im not sure.

You can use jj2007 solution to use Unicode Apis

AppendMenuW, hMenu, MF_POPUP, hM1, uCat$("&φάκελος")


hutch--

There is an editor in MASM32 called UNIEDIT that writes in UNICODE so if you construct you RC file as UNICODE rather than ANSI you will have no problems storing the Greek character set as resource. Then you use the UNICODE versions of the API functions to display your Greek text.

SHDA

Quote from: jj2007 on January 31, 2015, 08:44:53 PM
Check the source for invoke AppendMenuW, hMenu, MF_POPUP, hM1, uCat$("&φάκελος")
You mean that by using uCat$("&xxxxxx") i can pass unicode characters to any child component in masm32 ?

I installed MASMBASIC but when i tried to load your WinGreek.asc
i've got the following alert:
Richedit Assert
The specified module could not be found (msptls.dll)

Once i tried to compile it i've got the following error:
Tmp_File.asm(1) : Error A2209: Syntax error: $

RADasm doesn't let me to do something with the WinGreek.rc file.
It has just loaded it.


Quote from: ragdog on February 01, 2015, 02:53:27 AM
I have test it but i have add "Αλέξανδρος" manually to the resource and save it to Unicode and it works
I think Radasm (RaRes) support not unicode but im not sure.
Tell me, under which IDE or else you have compile this by this way ?
I have already done this (in RADasm) but with no success there.

Quote from: hutch-- on February 01, 2015, 07:35:21 AM
There is an editor in MASM32 called UNIEDIT that writes in UNICODE
Thank you for your reply hutch.
I load a source file, i save it through UNIEDIT and i build it with masm32. I tried
WinAsm and Radasm also. I saw Hindi unicode characters but not Greek.
I've noticed that UNIEDIT to allow me to load a file the requirement was this file to have
been saved as Unicode. Greek characters are visible to me only if i save the file as UTF-8.
Thank you for your directions but i can't follow them because i can't understand so to know
what to do so to combine the whole flow. Sorry but i am not experient in assembly.

=================================================================
As i am newbie, please:
allow me to make things easier for you that you try to help me
and for me to understand of how i shall proceed further:
I took Iczelion's tutorial no.2 and i add "Αλέξανδρος" in front.
Can you help me to ressolve this as it is a much more simplest paradigm ?

dedndave

as far as i know, NotePad is capable of handling unicode text

but, that doesn't solve your RadAsm problem
i suspect RadAsm has unicode support, because Ketil is Norwegian   :biggrin:

however, if it doesn't, you could place the unicode string data in seperate OBJ or static LIB and link it with the project

hutch--

#10
Have a look in this directory in the masm32 example code.

\masm32\examples\unicode_generic\multi_lingual

Greek characters are no problem to display in UNICODE.

SHDA

dedndave,
Thank you for your reply.
Quote from: dedndave on February 01, 2015, 05:58:10 PM
i suspect RadAsm has unicode support, because Ketil is Norwegian   :biggrin:
however, if it doesn't, you could place the unicode string data in seperate OBJ or static LIB and link it with the project
I will send to him my questions (Thank you for the data).
Also thanks for the directions. As newbie, now i re-realize that i have (at 1st)
to be fooling by the Assembler so to reach the point (2nd) to fooling him back. :biggrin:

Quote from: hutch-- on February 01, 2015, 06:12:44 PM
Have a look in thios directory in the masm32 example code.
\masm32\examples\unicode_generic\multi_lingual
Greek characters are no problem to display in UNICODE.
Thank you for your guidance. I have read (on the fly) all those examples and many
more, i have collect them for further analysis in a directory, but as i am a linear guy
i have to comply with the usage of include and external files that you have conclude
in their use for some reason-experience for sure. I am not the "write the code for me"
guy but i have just a natural excuse under my present status:
i am newbie and i simitaneusly seeking IDE, Assembler, Syntax, Results, Answers all
at once, just to find out the most suitable programming enviroment for me to start work.
I am sure you that can understand my present stage-level-position. Best wishes my friend!  :t

PS:
i would never imagine  that TXT except english should be out of the main code unit so to be presented correctly
:icon_eek:

jj2007

Quote from: SHDA on February 01, 2015, 05:35:03 PM
i've got the following alert:
Richedit Assert
The specified module could not be found (msptls.dll)

Never seen that one. I'll send you a PM.

SHDA

Quote from: jj2007 on February 01, 2015, 07:46:28 PM
Never seen that one. I'll send you a PM.
OK.
(I am using programming under VMWare 11. Maybe is rellated to this configuration of mine.)

jj2007

The "assert" is probably related to the OfficeNN installation - my PC doesn't have msptls.dll, but one C:\Program Files (x86)\Common Files\microsoft shared\Office11\RichEd20.dll and 8 (eight) RichEd*.dll files in C:\Windows and subfolders. Remember Windows is a Microsoft product :bgrin:

As Hutch wrote above, you also have \Masm32\uniedit.exe - check if you get the same assert there.

I attach temporarily a file that seems to be a zip but in reality is in *.arc format, so you'll need FreeArc to extract it. The result should go to \Masm32\bin - let me know if you still get the "assert" ;-)

The reason to make it that complicated is that as a plain zip, the attachment would be beyond what this forum accepts - and FreeArc is a much, much better archiver. See here, sort by last column.

P.S.: In case you do have
C:\Program Files\Common Files\microsoft shared\Office12\RichEd20.dll
but no
C:\Program Files\Common Files\microsoft shared\Office11\RichEd20.dll
... rename the Office12 dll to *.dlx, then launch \Masm32\MasmBasic\RichMasm.exe again.

Google says many people have the same problem ;-)