* contrib\hbblat\tests\blatcmd.prg
* contrib\hbblat\tests\blattest.prg
* contrib\hbct\tests\datetime.prg
* contrib\hbcurl\tests\ftp_uldl.prg
* contrib\hbfimage\tests\fitest.prg
* contrib\hbformat\hbfmtcls.prg
* contrib\hbformat\utils\hbformat.prg
* contrib\hbfoxpro\dll.prg
* contrib\hbgd\gd.prg
* contrib\hbgd\gdbarcod.prg
* contrib\hbgd\tests\animgif.prg
* contrib\hbgd\tests\antialia.prg
* contrib\hbgd\tests\counter.prg
* contrib\hbgd\tests\gdtest.prg
* contrib\hbgd\tests\gdtestcl.prg
* contrib\hbgd\tests\test_out.prg
* contrib\hbgd\tests\testdpi.prg
* contrib\hbgd\tests\tostring.prg
* contrib\hbmagic\tests\hbmagit.prg
* contrib\hbmisc\fcomma.prg
* contrib\hbmxml\tests\testmxml.prg
* contrib\hbmysql\tsqlbrw.prg
* contrib\hbnf\menu1.prg
* contrib\hbnf\pegs.prg
* contrib\hbnf\popadder.prg
* contrib\hbnf\savesets.prg
* contrib\hbnf\tempfile.prg
* contrib\hbpgsql\tests\cache.prg
* contrib\hbpgsql\tests\dbf2pg.prg
* contrib\hbpgsql\tests\simple.prg
* contrib\hbpgsql\tests\stress.prg
* contrib\hbqt\qtgui\hbqt_errorsys.prg
* contrib\hbsms\tests\send.prg
* contrib\hbsqlit3\hdbcsqlt.prg
* contrib\hbsqlit3\tests\authoriz.prg
* contrib\hbsqlit3\tests\backup.prg
* contrib\hbsqlit3\tests\hdbctest.prg
* contrib\hbsqlit3\tests\hooks.prg
* contrib\hbtip\cgi.prg
* contrib\hbtip\client.prg
* contrib\hbtip\ftpcli.prg
* contrib\hbtip\httpcli.prg
* contrib\hbtip\sessid.prg
* contrib\hbtip\tests\dnldftp.prg
* contrib\hbtip\tests\gmail.prg
* contrib\hbtip\tests\upld_ftp.prg
* contrib\hbwin\tests\dlg.prg
* contrib\hbwin\tests\testsvc.prg
* contrib\hbwin\win_tcom.prg
* contrib\hbxpp\tgetx.prg
* contrib\hbxpp\xppop.prg
* contrib\hbziparc\ziparc.prg
* examples\hbbtree\tbtree.prg
* examples\httpsrv\modules\info.prg
* examples\httpsrv\modules\testajax.prg
* examples\rddado\adordd.prg
* examples\terminal\terminal.prg
* src\rdd\usrrdd\rdds\arrayrdd.prg
* src\rdd\usrrdd\rdds\logrdd.prg
* src\rtl\achoice.prg
* src\rtl\radiogrp.prg
* src\rtl\tclass.prg
* tests\usrrdd\exlog.prg
* using HB_DEFAULT() instead of DEFAULT ... TO ...
% deleted '#include "common.ch"' where possible
; please pay attention to places where multiple values are
accepted and DEFAULT applied. It's possible some of these
might have been slipped my attention and converted to
HB_DEFAULT(), causing regression.
* src/rdd/usrrdd/rdds/arrayrdd.prg
! typos in recent mods
70 lines
2.1 KiB
Plaintext
70 lines
2.1 KiB
Plaintext
/*
|
|
* $Id$
|
|
*/
|
|
|
|
/*
|
|
* This example demonstrates how to work with some features of the native Win32
|
|
* API. The following function displays a dialog created with an external
|
|
* resource editor (Pelles C)
|
|
* 06/10/2010 - 00:16:41 - [vailtom]
|
|
*/
|
|
|
|
// Some constants
|
|
#define IDD_DIALOG1 101
|
|
#define IDC_BUTTON1 4001
|
|
#define IDC_STATIC1 1002
|
|
#define IDC_EDIT1 1003
|
|
#define IDC_COMBO1 1006
|
|
|
|
#define WM_INITDIALOG 0x0110
|
|
#define WM_COMMAND 0x0111
|
|
#define WM_SYSCOMMAND 0x0112
|
|
#define WM_CLOSE 0x0010
|
|
#define MB_ICONASTERISK 0x00000040
|
|
|
|
// Main entry point
|
|
PROCEDURE Main()
|
|
|
|
wapi_DialogBoxParam( 0, IDD_DIALOG1, 0, @DialogFunc() )
|
|
|
|
RETURN
|
|
|
|
// Main function to control the user interaction
|
|
FUNCTION DialogFunc( hWnd, message, wParam, lParam, wPHigh, wPLow )
|
|
|
|
LOCAL cText
|
|
|
|
HB_SYMBOL_UNUSED( wParam )
|
|
HB_SYMBOL_UNUSED( lParam )
|
|
HB_SYMBOL_UNUSED( wPHigh )
|
|
|
|
SWITCH message
|
|
CASE WM_INITDIALOG
|
|
|
|
wapi_SetDlgItemText( hWnd, IDC_STATIC1, "Hi! " + Time() )
|
|
wapi_SetDlgItemText( hWnd, IDC_EDIT1 , "Harbour" )
|
|
|
|
wapi_ComboBox_AddString( WAPI_GETDLGITEM( hWnd, IDC_COMBO1 ), "Architect" )
|
|
wapi_ComboBox_AddString( WAPI_GETDLGITEM( hWnd, IDC_COMBO1 ), "Engineer" )
|
|
wapi_ComboBox_AddString( WAPI_GETDLGITEM( hWnd, IDC_COMBO1 ), "Project or Program Administrator" )
|
|
wapi_ComboBox_AddString( WAPI_GETDLGITEM( hWnd, IDC_COMBO1 ), "Software Designer" )
|
|
wapi_ComboBox_AddString( WAPI_GETDLGITEM( hWnd, IDC_COMBO1 ), "Other" )
|
|
|
|
wapi_SetFocus( hWnd, WAPI_GETDLGITEM( hWnd, IDC_EDIT1 ) )
|
|
RETURN .T.
|
|
|
|
CASE WM_CLOSE
|
|
wapi_EndDialog( hWnd, 3 )
|
|
RETURN .T.
|
|
|
|
CASE WM_COMMAND
|
|
SWITCH wPLow
|
|
CASE IDC_BUTTON1
|
|
cText := wapi_GetDlgItemText( hWnd, IDC_EDIT1 )
|
|
wapi_MessageBox( 0, "Hello [" + cText + "]!" + Chr( 13 ) + "How are you?", "Hi!", MB_ICONASTERISK )
|
|
RETURN .T.
|
|
ENDSWITCH
|
|
ENDSWITCH
|
|
|
|
RETURN .F.
|