Page 1 of 1

VALID para Windows CE

PostPosted: Sun Oct 25, 2009 6:59 pm
by Antonio Linares
Incluiremos estos cambios en la próxima version de FWPPC.

Mientras tanto, aqui teneis la forma de implementar el VALID en las ventanas con FWPPC en Windows CE:
Code: Select all  Expand view
#include "fwce.ch"
#include "winapi.ch"

function Main()

   local oWnd := TMyWindow():New( "Tutor02",, nOr( WS_CAPTION, WS_SYSMENU ) )

   oWnd:Activate( ,,,, { || MsgYesNo( "Want to end ?", "Please select" ) } )

return nil

CLASS TMyWindow FROM TWindow

   METHOD HandleEvent( nMsg, nWParam, nLParam )
   
   METHOD End( nID )

ENDCLASS

METHOD HandleEvent( nMsg, nWParam, nLParam ) CLASS TMyWindow

   do case
      case nMsg == WM_CLOSE
           return ::End()
   endcase
   
return Super:HandleEvent( nMsg, nWParam, nLParam )      

METHOD End( nID ) CLASS TMyWindow

   DEFAULT nID := 0

   if ::lValid()
      DestroyWindow( ::hWnd )
      ::nResult = nID
      return nil
   endif  
   
return 0