Page 4 of 4

Re: WordPad clone source

Posted: Sun Nov 23, 2014 5:44 am
by Fangbeast
2. Cannot get checkboxes, optionsboxes to be transparent. Went through working code of mine where it worked and too tired to spot the differences.
Finally fixed number 2. D'oh! I have a void in my brain where the used sheep used to be.

Incorporated it into SerialMuncher as well. YAY! Will upload the changes tonight if I haven't broken anything else. Right now, It's too warm in here to code.

Re: WordPad clone source

Posted: Sun Nov 23, 2014 12:39 pm
by Fangbeast
Read the first post for updated info and let me know if the link doesn't work

Re: WordPad clone source

Posted: Sun Nov 23, 2014 1:30 pm
by infratec
Hi,

the menu entry for Search is not working in the latest 7z.

Code: Select all

Case #MenuBar_Search
Should be

Code: Select all

Case #MenuBar_SearchText
Bernd

Re: WordPad clone source

Posted: Sun Nov 23, 2014 5:28 pm
by davido
@Fangbeast,
I always use the latest version of PureBasic, 5.31 x64. So it crashed!
Should have realised you wrote it for previous versions.
Discovered that the problem was with the redundant packer JCALG1.
I just crudely commented lines: 48-54, 66 and 606-616. in _OwnerdrawComboIconsFonts.pbi
Seems to work fine with PB5.31 x64. doesn't seem to be a problem with the missing image.

@infratec,
Had the same problem with Search. Thanks for the solution.

Re: WordPad clone source

Posted: Sun Nov 23, 2014 6:01 pm
by infratec
Hi,

use this:

Code: Select all

DataSection
  FontType: 
  Data.a  $42, $4D, $96, $01, $00, $00, $00, $00, $00, $00, $76, $00, $00, $00, $28, $00
  Data.a  $00, $00, $30, $00, $00, $00, $0C, $00, $00, $00, $01, $00, $04, $00, $00, $00
  Data.a  $00, $00, $20, $01, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
  Data.a  $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $80, $00, $00, $80
  Data.a  $00, $00, $00, $80, $80, $00, $80, $00, $00, $00, $80, $00, $80, $00, $80, $80
  Data.a  $00, $00, $80, $80, $80, $00, $C0, $C0, $C0, $00, $00, $00, $FF, $00, $00, $FF
  Data.a  $00, $00, $00, $FF, $FF, $00, $FF, $00, $00, $00, $FF, $00, $FF, $00, $FF, $FF
  Data.a  $00, $00, $FF, $FF, $FF, $00, $BB, $BB, $BB, $BB, $55, $55, $55, $BB, $BB, $BB
  Data.a  $B8, $77, $7B, $BB, $BB, $BB, $BB, $B9, $99, $7B, $B9, $97, $BB, $BB, $BB, $BB
  Data.a  $BB, $BB, $BB, $55, $BB, $BB, $BB, $BB, $70, $88, $86, $8B, $BB, $BB, $BB, $99
  Data.a  $99, $97, $99, $79, $BB, $BB, $BB, $BB, $BB, $BB, $BB, $55, $BB, $BB, $BB, $B8
  Data.a  $00, $BB, $B8, $68, $BB, $BB, $BB, $99, $7B, $79, $99, $B7, $9B, $BB, $BB, $BB
  Data.a  $66, $66, $66, $55, $BB, $BB, $BB, $B8, $00, $BB, $BB, $76, $8B, $BB, $BB, $99
  Data.a  $7B, $B7, $99, $7B, $BB, $BB, $BB, $BB, $BB, $66, $BB, $55, $BB, $BB, $BB, $B8
  Data.a  $00, $BB, $BB, $86, $6B, $BB, $BB, $99, $7B, $BB, $79, $9B, $BB, $BB, $BB, $BB
  Data.a  $BB, $65, $BB, $55, $BB, $5B, $BB, $B8, $00, $8B, $BB, $B6, $68, $BB, $BB, $79
  Data.a  $9B, $BB, $B9, $97, $BB, $BB, $BB, $BB, $BB, $65, $BB, $55, $BB, $5B, $BB, $BB
  Data.a  $00, $7B, $BB, $B6, $68, $BB, $BB, $B9, $97, $BB, $B7, $99, $BB, $BB, $BB, $BB
  Data.a  $BB, $65, $5B, $55, $B5, $5B, $BB, $BB, $70, $0B, $BB, $B7, $66, $BB, $BB, $B7
  Data.a  $99, $BB, $BB, $99, $7B, $BB, $BB, $B6, $BB, $65, $55, $55, $55, $5B, $BB, $BB
  Data.a  $B0, $08, $BB, $B7, $68, $BB, $BB, $BB, $79, $9B, $BB, $79, $9B, $BB, $BB, $B6
  Data.a  $BB, $66, $BB, $6B, $BB, $BB, $BB, $BB, $B8, $00, $BB, $B7, $68, $BB, $BB, $BB
  Data.a  $B7, $99, $BB, $79, $97, $BB, $BB, $B6, $6B, $66, $B6, $6B, $BB, $BB, $BB, $BB
  Data.a  $BB, $80, $78, $86, $6B, $BB, $BB, $BB, $BB, $B9, $99, $97, $79, $BB, $BB, $B6
  Data.a  $66, $66, $66, $6B, $BB, $BB, $BB, $BB, $BB, $BB, $87, $68, $BB, $BB, $BB, $BB
  Data.a  $BB, $BB, $BB, $BB, $BB, $BB
EndDataSection
and replace

Code: Select all

UseJCALG1Packer()

Define *lpBuffer

;==========================================================================================================================================================
; Load packed image from memory
;==========================================================================================================================================================

*lpBuffer = AllocateMemory(406)

UncompressMemory(?FontType, ?FontTypeEnd - ?FontType, *lpBuffer, MemorySize(*lpBuffer), #PB_PackerPlugin_JCALG1)

CatchImage(0, *lpBuffer)

FreeMemory(*lpBuffer)
with

Code: Select all

CatchImage(0, ?FontType)
And your exe is 3k smaller :mrgreen:
Because the packer needs more bytes than the 'unpacked' image.

Bernd

Re: WordPad clone source

Posted: Sun Nov 23, 2014 8:11 pm
by davido
@infratec,

Nice work. You make it look so simple.

I actually managed to produce the same DataSection as you did.
Got lost after that.

Thank you. :D

Re: WordPad clone source

Posted: Sun Nov 23, 2014 8:24 pm
by Fangbeast
Nice work. You make it look so simple.
He does, doesn't he? And he fixeed thats ection for me in the first place because I wrote this six years ago and that definately had changed in compiler versions.

I should name this 'NoteInfraTec' or just 'NoteTec' in his honour:):)
Got lost after that.
He does that to me too:):):)

Will upload the new change today, when I wake up! (Done, I couldn't sleep!)