WinAsm Studio, The Assembly IDE - Free Downloads, Source Code
Sponsors
Articles
Programming Quick Start
32-bit Assembler is Easy
Porting Iczelion tutorials
What is FASM
Hard Drive Recovery
Wiring your own LAN
Personal menu
Welcome Guest
User:
Pass:
Register!
Resend Validation Email
 
Forum
 

UNICODE resources with ResEdit, ResEdit, UTF8 resources, fasm and WinAsm Studio

shoorick
Quote Post


Extremely Active Member
******

Group: Admins
Posts: 2301
Member No.: 160
Joined: 22-June 04


Hi!

In general, WinAsm Studio resource editor is enough to work with most usual projects, but when you need to have UNICODE resources with strings in different codepage, it is out of its possibilities.

There is a good free resource editor: ResEdit , which is able to produce rc-files in unicode encoding. It is not easy to integrate it with WinAsm Studio, but possible if keep in mind some differences in these two tools.

Usually, ResEdit opens WinAsm Studio produced rc-files, but after saving them they will appear incompatible, as all "#define"-s will be moved into resource.h include file - knowing this we may just decide to use only ResEdit for particular project. Another incompatibility appears when "CONTROL" statement is forced: in this case predefined classes like "Button" etc. will be represent with wrappers like "WC_BUTTON", which are defined in commctrl.h, but not handled by WinAsm Studio.

Running ResEdit you may configure it so it will produce resource.h in assembler accepted format: "MYBUTTON equ 1002" - then such file may be just included into assembly source to represent there resource definitions. This will cause an issue also - in this case rc-file will be not compilable with usual rc compiler as it will not understand "equ" definitions - let's hope it will be solved soon.

To be able to run ResEdit easy from WinAsm Studio, rc-file has to be included into the project (otherwise "Use External Resource Editor" menu option will be just disabled). Also this is required to enable resource compilation stage by IDE/FASM AddIn. But rc file, if it is UTF8 encoded, has to have no BOM header(!), otherwise it will be damaged! Then we have to set up ResEdit to not add BOM and set default encoding UTF8.

Now it is possible to have resource script in the project with UTF8 encoding.

As well as it is possible to use dlg2fasm converter (to use rc for dialogs only) it was upgraded to support ResEdit produced rc-files. To be able to use this you have to get version 4+ of dlg2fasm, set up ResEdit to force "CONTROL" statements and include into your source these definitions directly or as separate include file:
CODE
WC_HEADER               equ "SysHeader32"
WC_LISTVIEW             equ "SysListView"
WC_TREEVIEW             equ "SysTreeView"
WC_COMBOBOXEX           equ "ComboBoxEx32"
WC_TABCONTROL           equ "SysTabControl"
WC_IPADDRESS            equ "SysIPAddress32"
WC_PAGESCROLLER         equ "SysPager"
WC_NATIVEFONTCTL        equ "NativeFontCtl"
WC_BUTTON               equ "Button"
WC_STATIC               equ "Static"
WC_EDIT                 equ "Edit"
WC_LISTBOX              equ "ListBox"
WC_COMBOBOX             equ "ComboBox"
WC_SCROLLBAR            equ "ScrollBar"
WC_LINK                 equ "SysLink"

DS_SHELLFONT            equ DS_SETFONT OR DS_FIXEDSYS


you may see an example in attachment.

Also, ResEdit has a lot of other features, but i have not tested all of then yet, you may try it by yourself.

regards!


Attached File ( Number of downloads: 43 )
 Login or Register to download

PMEmail PosterUsers Website
Top
shoorick
Quote Post


Extremely Active Member
******

Group: Admins
Posts: 2301
Member No.: 160
Joined: 22-June 04


a screenshot...

Attached Image
Attached Image
PMEmail PosterUsers Website
Top
habran
Quote Post


Extremely Active Member
******

Group: Members
Posts: 165
Member No.: 10778
Joined: 2-August 08


Very nice, thank you shoorick biggrin.gif
PMEmail Poster
Top
shoorick
Quote Post


Extremely Active Member
******

Group: Admins
Posts: 2301
Member No.: 160
Joined: 22-June 04


Next example uses ResEdit as rc->res converter to include resources into fasm project directly

you need latest (1.4.8) version of ResEdit to use it as converter

supposed, the ResEdit folder is accessible through RESEDIT environment variable - it is possible to set it in WinAsm Studio environment.

Attached File ( Number of downloads: 21 )
 Login or Register to download
PMEmail PosterUsers Website
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Topic Options Reply to this topicStart new topicStart Poll

 

Sponsors
Computer Science

Internet
C/C++
Hardware & PC maintenance

HiEditor

General Discussions
Suggestions/Bug Reports
WinAsm Studio

General Discussions
Suggestions/Bug Reports
WinAsm Studio FAQ
Multilingual User Interface
Add-Ins
Assembly Programming

Main
Newbies
Projects
Custom Controls
Snippets
Announcements & Rules

Announcements

General

Online Degrees - Distance Learning
The Heap
Russian
Google