Could somebody send to me a small example to define in resources and to use in PRG file the DATE PICKER control ?
Regards
#include "FiveWin.ch"
#include "dtpicker.ch"
FUNCTION Main()
local oWnd, oSay
local dDate := Date()
DEFINE WINDOW oWnd TITLE "DTPicker from code ...."
@ 2, 2 DTPICKER dDate OF oWnd ON CHANGE oSay:Refresh()
@ 3, 30 SAY oSay PROMPT "Date: "+ Dtoc( dDate ) OF oWnd SIZE 200, 20
@ 6, 2 BUTTON "From resources ..." OF oWnd ACTION FromRes( oWnd ) SIZE 150, 30
ACTIVATE WINDOW oWnd
return nil
FUNCTION FromRes( oWnd )
local oDlg, oSay
local dDate := Date()
DEFINE DIALOG oDlg RESOURCE "DTPTEST"
REDEFINE DTPICKER dDate ID 101 OF oDlg ;
ON CHANGE oSay:Refresh()
REDEFINE SAY oSay PROMPT "Date: "+ Dtoc(dDate) ID 102 OF oDlg
ACTIVATE DIALOG oDlg CENTERED
return nil
procedure AppSys // Xbase++ requirement
return
#include "..\include\WinApi.ch"
DTPTEST DIALOG 6, 15, 207, 56
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "DTPicker test from resources ..."
FONT 8, "MS Sans Serif"
{
DEFPUSHBUTTON "Close", IDOK, 148, 6, 50, 14
CONTROL "", 101, "SysDateTimePick32", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 16, 13, 81, 11
EDITTEXT 102, 16, 33, 81, 11
}
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 54 guests