News:

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

Main Menu

True Unicode

Started by jj2007, June 19, 2014, 08:53:10 AM

Previous topic - Next topic

jj2007

Inspired by this post, I wondered whether it was possible to use languages with exotic alphabets directly from the editor. Example:

include \masm32\MasmBasic\MasmBasic.inc      ; download
  Init
  uInkey "Введите текст здесь"
  Exit
end start


Guess what? It works! Paste the snippet in RichMasm, hit Ctrl F6 and click 'Yes'.

jj2007

Hi folks,

I am working on the next version of my IDE, and I wanted a true Unicode example. Could you give me a quick feedback if the menu strings are correct?

Thanks,
JJ


  SWITCH uMsg
  CASE WM_CREATE   ; this message serves to initialise your application
   mov esi, rv(CreateMenu)   ; create the main menu
   mov edi, rv(CreateMenu)   ; create a sub-menu
   invoke AppendMenuW, esi, MF_POPUP, edi, uCat$("Файл")         ; add it to the main menu
   invoke AppendMenuW, edi, MF_STRING, 101, uCat$("Открыть")      ; and add
   invoke AppendMenuW, edi, MF_STRING, 102, uCat$("Сохранить")    ; two items
   mov edi, rv(CreateMenu)   ; create a sub-menu
   invoke AppendMenuW, esi, MF_POPUP, edi, uCat$("Редактировать")   ; add it to the main menu
   invoke AppendMenuW, edi, MF_STRING, 103, uCat$("Копировать")   ; and add
   invoke AppendMenuW, edi, MF_STRING, 104, uCat$("Вставить")    ; two items
   invoke SetMenu, hWnd, esi            ; attach menu to main window
...
  CASE WM_CLOSE   ; decide whether to close or not
      uMsgBox 0, "Вы уверены, что хотите закрыть эту программу?", "Hi", MB_YESNO

GoneFishing

Hi Jochen,
All the menu strings are correct  :t