WinAsm Studio, The Assembly IDE - Free Downloads, Source Code
Articles
Programming Quick Start
32-bit Assembler is Easy
Porting Iczelion tutorials
What is FASM
Hard Drive Recovery
Wiring your own LAN
 
Forum
Pages (3) [1] 2 3   ( Go to first unread post )

Patch: Editor/Line Number Font Styles, ODM bug, I've been running it under Wine, and it seems to run fairly well, except for a few minor issues

TerVel
Quote Post


New Member
*

Group: Members
Posts: 11
Member No.: 43342
Joined: 19-April 11


Sponsored Links
All,

I recently discovered WinASM studio, and I was relieved to learn that it's Open Source. To be honest, I'm not one for IDE's. But, I have to say that I really like the flexibility of WinASM Studio. smile.gif I've been running it under Wine, and it seems to run fairly well, except for a few minor issues.

My patch consists of two things. The first is the ODM bug. In MeasureItem, ESI is expected to hold the address of the string to be drawn. In some cases, "Instant New Project" for instance, it tries to lookup the proper string as an index of CHILDWINDOWDATA.szFileName. Perhaps the affected items have the wrong ID, but GetWindowLong is returning 0 there, thus ESI is overwritten with 0x10. tongue.gif

Farther down, when lstrlen and GetTabbedTextExtent are called, it's passing a bad address, with an 'nCount' of 0. On Windows, this safely returns 0, while on Wine it returns a non-zero value, which seriously screws up the height of the affected menu items. I've sent a patch to wine-patches to correct this behavior already, but my patch here will correct the code, so that in the aforementioned case the LEA is skipped, and thus ESI correctly addresses the string to be drawn.

Part two is the implementation of Editor/Line Number font styles. The way this works is fairly simple. It allows the user to select the font 'style' (weight/italic) as well as Underline or Strikeout. This rectifies the issue whereby one might select a font with a default 'Bold' style, and not be able to go back to a 'Regular' style. It also adds the flexibility of selecting these options. tongue.gif

The attached patch is taken against svn r18.

Attached File ( Number of downloads: 24 )
 Login or Register to download
PMEmail PosterUsers WebsiteAOL
Top
ragdog
Quote Post


Extremely Active Member
******

Group: Moderators
Posts: 891
Member No.: 5019
Joined: 13-May 07


Hi

Thanks smile.gif

Can you make screenshots before/after?
PMUsers Website
Top
TerVel
Quote Post


New Member
*

Group: Members
Posts: 11
Member No.: 43342
Joined: 19-April 11


You're welcome! smile.gif

Here are a couple of before/after screenshots (I'm still tweaking my color scheme tongue.gif):

Before (Setting "Strikeout"):
user posted image

After:
user posted image

Before (Changing the font to Italic / Underline):
user posted image

After:
user posted image
PMEmail PosterUsers WebsiteAOL
Top
ragdog
Quote Post


Extremely Active Member
******

Group: Moderators
Posts: 891
Member No.: 5019
Joined: 13-May 07


Thanks

What if with this OwnerDrawMenu?

And with how i can use this patch what for a tool?
PMUsers Website
Top
TerVel
Quote Post


New Member
*

Group: Members
Posts: 11
Member No.: 43342
Joined: 19-April 11


QUOTE (ragdog @ Apr 24 2011, 05:07 AM)
Thanks

What if with this OwnerDrawMenu?

And with how i can use this patch what for a tool?

The ODM stuff wouldn't be visually noticeable under Windows only under Wine, and requires patching Wine to ultimately fix. That part of the patch is simply a safety measure.

As for using the patch, you can either apply the changes manually (most tedious way), or use GNU Patch (easiest way).

Reading the patch is easy. Lines beginning with "+" are lines that were added, lines beginning with "-" are lines that were removed. The line number is given at the start of each block, for reference.

In the case of using GNU Patch, you would apply it like such:

1. Checkout the WinASM source from svn into a directory.
2. Download the patch, and save it into the same directory where you checked out the source.
3. Download GNU Patch, and extract patch.exe to the same directory where you checked out the source.
4. Open a command prompt, and cd into that directory, and run patch --binary -p0 < filename.patch (See attached screenshot)

Then, all you need to do is compile the sources. tongue.gif


Attached Image
Attached Image
PMEmail PosterUsers WebsiteAOL
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Topic Options Pages (3) [1] 2 3  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