hi,
i have some Bitmap like this
picture here is *JPG while *.BMP is not allowed as upload
it contain "more" than one Bitmap so you have to split it to use.
i have search for HB_FUNC with "BitBlt" API Function but nothing seems to match.
who have a Tip
how to use a Bitmap "Band" with harbour / HMG
Moderator: Rathinagiri
- AUGE_OHR
- Posts: 2060
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
how to use a Bitmap "Band" with harbour / HMG
have fun
Jimmy
Jimmy
- AUGE_OHR
- Posts: 2060
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Re: how to use a Bitmap "Band" with harbour / HMG
hi,
i have found StretchBlt function
https://docs.microsoft.com/de-de/window ... stretchblt
it seems better API function while it contain Source and Target.
now i have to find out how to use it which harbour / HMG as it need 2 x HDC
i have found StretchBlt function
https://docs.microsoft.com/de-de/window ... stretchblt
Code: Select all
HB_FUNC(STRETCHBLT)
{
hb_retl( StretchBlt( (HDC) hb_parnl( 1 ) ,
hb_parni( 2 ) ,
hb_parni( 3 ) ,
hb_parni( 4 ) ,
hb_parni( 5 ) ,
(HDC) hb_parnl( 6 ) ,
hb_parni( 7 ) ,
hb_parni( 8 ) ,
hb_parni( 9 ) ,
hb_parni( 10 ) ,
(DWORD) hb_parnl( 11 )
) );
}
now i have to find out how to use it which harbour / HMG as it need 2 x HDC
have fun
Jimmy
Jimmy
- AUGE_OHR
- Posts: 2060
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Re: how to use a Bitmap "Band" with harbour / HMG
have fun
Jimmy
Jimmy
- AUGE_OHR
- Posts: 2060
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Re: how to use a Bitmap "Band" with harbour / HMG
hi,
now i try it with LABEL and IMAGE but even if i got the Controlhandle it does not show anything
i have enable in BMP_PAINT
both are WC_STATIC and i know it it possible to BitBlt() or StretchBlt() into those hDC
as HMG has LABEL and IMAGE (for me both are the same -> WC_STATIC) i have to ask for Limitation.
the Difference is "only" Style of LABEL and IMAGE and that can be change "on-fly"
Question : can i still change Style (if i want) or does it make Problem e.g. with _HMG_SYSDATA
now i try it with LABEL and IMAGE but even if i got the Controlhandle it does not show anything
i have enable in BMP_PAINT
Code: Select all
hDC = GetDC (hWnd)
as HMG has LABEL and IMAGE (for me both are the same -> WC_STATIC) i have to ask for Limitation.
the Difference is "only" Style of LABEL and IMAGE and that can be change "on-fly"
Code: Select all
nStyle := @user32:GetWindowLongA(hWnd, GWL_STYLE) // get Style
nStyle := nAndNot(nStyle, WS_VSCROLL, LBS_DISABLENOSCROLL) // remove some Style
nStyle := nor(nStyle, LBS_DISABLENOSCROLL ) // add Style
@user32:SetWindowLongA(hWnd , GWL_STYLE , nStyle ) // set Style
@user32:InvalidateRect(hWnd,1)
have fun
Jimmy
Jimmy
Re: how to use a Bitmap "Band" with harbour / HMG
No encuentro estos .fmg ?Declare Window BMP_BAND1
Declare Window BMPBAND2
Can't open #include file 'BMP_BAND1.fmg'
*-----------------------------------
I can't find these .fmg?
Andrés González López
Desde Guadalajara, Jalisco. México.
Desde Guadalajara, Jalisco. México.
- AUGE_OHR
- Posts: 2060
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Re: how to use a Bitmap "Band" with harbour / HMG
Ok, sorry ... total forgot FMG files
here it is ---
i got Part of Solution :
Code: Select all
HB_FUNC(InvalidateRect)
{
HWND hWnd;
RECT rect;
hWnd = (HWND) hb_parnl (1);
GetClientRect(hWnd, &rect);
InvalidateRect(hWnd,&rect,1);
hb_retnl (0);
}
have fun
Jimmy
Jimmy