Search found 161 matches

by toninhofwi
Fri Apr 17, 2009 1:07 am
Forum: FiveWin for Harbour/xHarbour
Topic: cResToStr working function
Replies: 8
Views: 1152

cResToStr working function

Hi Antonio. Look at this code please: HB_FUNC( CRESTOSTR ) {     HRSRC  hRes = FindResource( ( HMODULE ) GetResources(), MAKEINTRESOURCE( hb_parni( 1 ) ), RT_BITMAP );     HANDLE hResource = LoadResource( ( HINSTANCE ) GetResources(), hRes );     hb_retclen( ( LPSTR ) LockResource( hResource ), size...
by toninhofwi
Fri Apr 17, 2009 12:56 am
Forum: FiveWin for Harbour/xHarbour
Topic: Alphablend Platform Independent Working !!!
Replies: 13
Views: 1890

Re: Alphablend Platform Independent !!!

Toninho, It is getting better :-) Anyhow if you use a zero alpha value, the bitmap should not be seen. With your code, still it is seen. I think that you are quite close to have it :-) DONE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! // Alphablend platform independent // works in all windows versions // Ton...
by toninhofwi
Thu Apr 16, 2009 7:30 pm
Forum: FiveWin for Harbour/xHarbour
Topic: Alphablend Platform Independent Working !!!
Replies: 13
Views: 1890

Re: Alphablend Platform Independent !!!

Toninho, It is getting better :-) Anyhow if you use a zero alpha value, the bitmap should not be seen. With your code, still it is seen. I think that you are quite close to have it :-) Antonio, Thanks. I´ll see it tonight and post here. But I´m trying to use crestostr() without success, can you ple...
by toninhofwi
Thu Apr 16, 2009 6:31 pm
Forum: FiveWin for Harbour/xHarbour
Topic: Alphablend Platform Independent Working !!!
Replies: 13
Views: 1890

Re: Alphablend Platform Independent !!!

Hey Antonio, you are fast ! :D Here is the code: #pragma BEGINDUMP #include "windows.h" #include "hbapi.h" //------------------------------------------------------------------------------------------------------------------// WORD DibNumColors( void * pv ); HPALETTE CreateDIBPale...
by toninhofwi
Thu Apr 16, 2009 4:56 pm
Forum: FiveWin for Harbour/xHarbour
Topic: Alphablend Platform Independent Working !!!
Replies: 13
Views: 1890

Re: Alphablend Platform Independent !!!

Hi Antonio. Done !!!!!!!!!!!!! In another way: #pragma BEGINDUMP #include "windows.h" #include "hbapi.h" //------------------------------------------------------------------------------------------------------------------// WORD DibNumColors( void * pv ); HPALETTE CreateDIBPalett...
by toninhofwi
Thu Apr 16, 2009 2:37 pm
Forum: FiveWin for Harbour/xHarbour
Topic: Alphablend Platform Independent Working !!!
Replies: 13
Views: 1890

Re: Alphablend Platform Independent !!!

Toninho, GetPixel() and SetPixel() are quite slow, you should avoid them. To improve the speed, you have to directly access the array of bytes of the bitmap. Hi Antonio. Thanks. I know it. As I say, it is my first try. Please review this DrDobbs article :-) AlphaBlendU() http://www.ddj.com/windows/...
by toninhofwi
Thu Apr 16, 2009 1:39 pm
Forum: FiveWin for Harbour/xHarbour
Topic: Alphablend Platform Independent Working !!!
Replies: 13
Views: 1890

Alphablend Platform Independent Working !!!

Hi friends, This is my first try of an AlphaBlend funtion that works on all windows version, and can be changed to work on linux too: It is working but need be optmized for speed: #pragma BEGINDUMP #include "windows.h" #include "hbapi.h" WORD DibNumColors( void * pv ); HANDLE Dib...
by toninhofwi
Mon Apr 06, 2009 6:43 pm
Forum: FiveWin for Harbour/xHarbour
Topic: Drawing PNG files with transparencies
Replies: 1
Views: 419

Drawing PNG files with transparencies

Hi, This is the way to draw PNG images using FWH and freeimage: hBmp = PngToBitmap( hDC, "c:\myfile.png" ) ABPaint( hDC, 10, 10, hBmp ) ---cut--- HB_FUNC( PNGTOBITMAP ) { HDC hDC = ( HDC ) hb_parnl( 1 ); FIBITMAP *dib; FREE_IMAGE_FORMAT fiSource; fiSource = FreeImage_GetFileType( ( LPSTR )...
by toninhofwi
Wed Apr 01, 2009 4:16 pm
Forum: FiveWin for Harbour/xHarbour
Topic: How load png from resource
Replies: 4
Views: 773

Re: How load png from resource

Antonio Linares wrote:Toninho,
Please review FWH\source\winapi\resource.c function cResToStr( cnResName, cType ) --> cResourceBytes
Thanks Mr Antonio,

Regards,

Toninho.
by toninhofwi
Wed Apr 01, 2009 10:20 am
Forum: FiveWin for Harbour/xHarbour
Topic: Speedtest CLIPPER vs. xHarbour - COMMIT
Replies: 14
Views: 4292

Re: Speedtest CLIPPER vs. xHarbour - COMMIT

This is the answer to Harbour Dev List from Przemyslaw Czerpak: dbCommit() make two things: 1. write application memory buffers to file. 2. send to OS request to flush disk buffers releated to open file. The 1-st action is executed also by any other rdd operation which may cause record reloading or ...
by toninhofwi
Tue Mar 31, 2009 11:39 pm
Forum: FiveWin for Harbour/xHarbour
Topic: How load png from resource
Replies: 4
Views: 773

Re: How load png from resource

Hi Uwe,

Borland Resource Workshop can do it:

#define RT_RCDATA 10
nId RT_RCDATA NONDISCARDABLE "imagem.png"

My question is another: How to load it and have a valid handle, maybe something like:

hBitmap = LoadBitmap( GetResources(), cResName )


Thanks and best regards,

Toninho.
by toninhofwi
Tue Mar 31, 2009 7:52 pm
Forum: FiveWin for Harbour/xHarbour
Topic: How load png from resource
Replies: 4
Views: 773

How load png from resource

Hi

There are any way to load a .png file stored in a resource (rc) file and display it using drawalpha() ?

Thanks in advance,

Best regards,

Toninho.
by toninhofwi
Sun Jan 25, 2009 3:19 pm
Forum: FiveWin para Harbour/xHarbour
Topic: Flags para Harbour SVN...
Replies: 6
Views: 950

Re: Flags para Harbour SVN...

Try:

SET C_USR=-DHB_GUI -DHB_FM_STATISTICS_OFF -DHB_NO_PROFILER -DADS_LIB_VERSION=700 -DHB_HASH_MSG_ITEMS -DHB_NO_DEBUG -DHB_FM_STD_ALLOC

SET HB_BUILD_DLL=no


Regards,

Toninho.
by toninhofwi
Sat Jan 17, 2009 11:56 am
Forum: FiveWin for Harbour/xHarbour
Topic: Error at STRUCTURE/ENDSTRUCTURE!
Replies: 12
Views: 1593

Re: Error at STRUCTURE/ENDSTRUCTURE!

JC wrote:Ok, but... and the error?
Hi JC,

IMO you are mixing things, If you need FWH C language structures support commmands, you need "Struct.CH". Please see how use it in fwh\source\TTRAY.PRG

Regards,

Toninho.
by toninhofwi
Sat Jan 17, 2009 11:47 am
Forum: FiveWin for Harbour/xHarbour
Topic: xHarbour -> Harbour compatibility
Replies: 18
Views: 2317

Re: xHarbour -> Harbour compatibility

Dear Frank and Toninho and Others too, Nonetheless, re-designing xHarbour Apps for Harbour is not that easy. Lesson learned: I must absolutely determine which way to go...xHarbour or Harbour? :idea: Regards, Dear Frances, I understand your point, I lost a lot of time converting my applications to r...