changing records from an xbrowse I want to display an intermittent black square on a jpg image to display the printing coordinates for a coupon
example
any test sample pls ?
#include "Fivewin.ch"
#define SRCCOPY 13369376
FUNCTION MAIN()
LOCAL oDlg, oImg
DEFINE DIALOG oDlg;
SIZE 800, 600
@ 0, 0 IMAGE oImg;
SIZE 150, 100;
FILE "TEST.JPG";
ADJUST
@ 15, 0 BUTTON "Draw";
ACTION DRAWIMG( oImg )
@ 15, 20 BUTTON "Save";
ACTION oImg:SaveImage( "MYIMAGETEST.JPG", 2 )
ACTIVATE DIALOG oDlg;
CENTER
RETURN NIL
STATIC FUNCTION DRAWIMG( oImg )
LOCAL hDC := oImg:GetDC()
LOCAL nWidth := oImg:nWidth()
LOCAL nHeight := oImg:nHeight()
LOCAL hMemDC := CREATECOMPATIBLEDC( hDC )
LOCAL hMemBmp := CREATECOMPATIBLEBITMAP( hDC, nWidth, nHeight )
LOCAL hBmpOld := SELECTOBJECT( hMemDC, hMemBmp )
LOCAL hBitmap := oImg:hBitmap
LOCAL hPalette := oImg:hPalette
LOCAL x, y
PALBMPDRAW( hMemDC, 0, 0, hBitmap, hPalette, nWidth, nHeight )
FOR y = 128 TO 135
FOR x = 128 TO 135
SETPIXEL( hMemDC, x, y, CLR_HRED )
NEXT
NEXT
FOR y = 110 TO 117
FOR x = 110 TO 117
SETPIXEL( hMemDC, x, y, CLR_HRED )
NEXT
NEXT
SELECTOBJECT( hMemDC, hBmpOld )
DELETEDC( hMemDC )
oImg:hBitmap = hMemBmp
PALBMPFREE( hBitmap, hPalette )
PALBMPNEW( oImg:hWnd, oImg:hBitmap, oImg:hPalette )
oImg:Refresh()
RETURN NIL
Marc Venken wrote:I try to understand what you would like to do...
I would generate a dialog with all buttons (bmp) for each lotto nummer. (design the lotto form) At that point, you have a button for each number that can interact with clicks and change the button into a square and/or other color etc... Printing will be something like a lottoform jpg to print and position the squares on it. As always... easier said than done )))
Detlef wrote:try to show an animated gif which is blinking at the desired position.
Detlef wrote:Silvio,
I understand your problem.
Unfortunately I'm on voyage at the moment.
I'll send you a formula for finding the correct place of each number later today.
Pleased, tell me the perimeter of one of the circles.
Regards, Detlef
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 86 guests