Hi All,
Is it possible to draw on a window with FWPPC?
Can I use the LineTo() function for example?
Anybody has a sample?
Many thanks,
Raymond
// Draw on a window
#include "Fwce.ch"
#include "Winapi.ch"
FUNCTION Main()
LOCAL oWnd
LOCAL hDC
LOCAL hPen
DEFINE WINDOW oWnd TITLE "DESSIN "
hDC := oWnd:GetDC()
hPen := CreatePen(PS_SOLID,1,RGB(0,0,0))
@ 14.4, 1.0 BUTTON "&Exit" SIZE 60, 35 ;
ACTION (oWnd:End())
oWnd:aControls[1]:SetFocus()
MoveTo(hDC,100,100)
LineTo(hDC,150,150,hPen)
LineTo(hDC,050,050,hPen)
LineTo(hDC,200,200,hPen)
ACTIVATE WINDOW oWnd
RETURN nil
// Draw on a window
#include "Fwce.ch"
#include "Winapi.ch"
FUNCTION Main()
LOCAL oWnd
DEFINE WINDOW oWnd TITLE "DESSIN "
@ 14.4, 1.0 BUTTON "&Exit" SIZE 60, 35 ;
ACTION (oWnd:End())
oWnd:aControls[1]:SetFocus()
ACTIVATE WINDOW oWnd ON PAINT MyPainting( oWnd )
RETURN nil
*******************************************************************************
FUNCTION MyPainting( oWnd )
*******************************************************************************
LOCAL hDC
LOCAL hPen
hDC := oWnd:GetDC()
hPen := CreatePen(PS_SOLID,1,RGB(0,0,0))
MoveTo(hDC,100,100)
LineTo(hDC,150,150,hPen)
LineTo(hDC,150,050,hPen)
LineTo(hDC,200,050,hPen)
RETURN Nil
LOCAL hDC
LOCAL hPen
hDC := oWnd:GetDC()
hPen := CreatePen(PS_SOLID,1,RGB(0,0,0))
MoveTo(hDC,100,100)
LineTo(hDC,150,150,hPen)
LineTo(hDC,150,050,hPen)
LineTo(hDC,200,050,hPen)
oWnd:ReleaseDC()
return nil
Return to FiveWin for Pocket PC
Users browsing this forum: No registered users and 32 guests