// RESOURCE SCRIPT generated by "Pelles C for Windows, version 6.50".
#include <windows.h>
#include <commctrl.h>
#include <richedit.h>
#include "DPROG2.h"
LANGUAGE LANG_ENGLISH,SUBLANG_ENGLISH_US
INIT_PASS DIALOGEX DISCARDABLE 6, 18, 210, 142
STYLE DS_SHELLFONT|WS_POPUP|DS_MODALFRAME|DS_CONTEXTHELP|DS_3DLOOK|WS_CAPTION|WS_SYSMENU|WS_VISIBLE
CAPTION "Dialog"
FONT 8, "Tahoma"
{
CONTROL "OK", IDOK, "Button", WS_TABSTOP, 156, 100, 45, 15
CONTROL "Cancel", IDCANCEL, "Button", WS_TABSTOP, 156, 116, 45, 15
CONTROL "User Name", 4001, "Static", WS_GROUP, 8, 16, 40, 8
CONTROL "Password", 4002, "Static", WS_GROUP, 8, 44, 40, 8
CONTROL "", 4003, "Edit", ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, 68, 12, 88, 12
CONTROL "", 4004, "Edit", ES_AUTOHSCROLL|ES_PASSWORD|WS_BORDER|WS_TABSTOP, 68, 44, 88, 12
}
My .rc file with line number.
1// RESOURCE SCRIPT generated by "Pelles C for Windows, version 6.50".
2
3#include <windows.h>
4//#include <commctrl.h>
5//#include <richedit.h>
6#include "DPROG2.h"
7
8LANGUAGE LANG_ENGLISH,SUBLANG_ENGLISH_US
9
10INIT_PASS DIALOGEX DISCARDABLE 6, 18, 210, 142
11STYLE DS_SHELLFONT|WS_POPUP|DS_MODALFRAME|DS_CONTEXTHELP|DS_3DLOOK|WS_CAPTION|WS_SYSMENU|WS_VISIBLE
12CAPTION "Dialog"
13FONT 8, "Tahoma"
14{
15 CONTROL "OK", IDOK, "Button", WS_TABSTOP, 156, 100, 45, 15
16 CONTROL "Cancel", IDCANCEL, "Button", WS_TABSTOP, 156, 116, 45, 15
17 CONTROL "User Name", 4001, "Static", WS_GROUP, 8, 16, 40, 8
18 CONTROL "Password", 4002, "Static", WS_GROUP, 8, 44, 40, 8
19 CONTROL "", 4003, "Edit", ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, 68, 12, 88, 12
20 CONTROL "", 4004, "Edit", ES_AUTOHSCROLL|ES_PASSWORD|WS_BORDER|WS_TABSTOP, 68, 44, 88, 12
21 }
FUNCTION GETPASSWORD()
LOCAL oUSER, oGET
LOCAL cPASSWORD :=SPAC(10)
LOCAL cUSER :=SPAC(10)
LOCAL NTRIES :=0
DEFINE DIALOG oDLG RESOURCE "INIT_PASS" of oWND1
REDEFINE GET oUSER VAR cUSER ID 4003 OF ODLG
REDEFINE GET oGET VAR cPASSWORD ID 4004 OF ODLG
REDEFINE BUTTON ID 5000 OF ODLG ;
ACTION NTRIES++,CHKP(cUSER,cPASSWORD,oDLG,@LGO),;
IIF(NTRIES>=3,(MsgStop("PASSWORD INCORRECT"),oWND1:End()),)
oDLG:SETFOCUS()
REDEFINE BUTTON ID 5001 OF ODLG ACTION( Msginfo("Cancel"),oWND1:End() )
ACTIVATE DIALOG oDLG;
CENTERED
oWND1:END()
RETURN(LGO)
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 97 guests