CONST EM_GETSEL = &HB0
CONST EM_SETSEL = &HB1
CONST EM_GETRECT = &HB2
CONST EM_SETRECT = &HB3
CONST EM_SETRECTNP = &HB4
CONST EM_SCROLL = &HB5
CONST EM_LINESCROLL = &HB6
CONST EM_SCROLLCARET = &HB7
CONST EM_GETMODIFY = &HB8
CONST EM_SETMODIFY = &HB9
CONST EM_GETLINECOUNT = &HBA
CONST EM_LINEINDEX = &HBB
CONST EM_SETHANDLE = &HBC
CONST EM_GETHANDLE = &HBD
CONST EM_GETTHUMB = &HBE
CONST EM_LINELENGTH = &HC1
CONST EM_REPLACESEL = &HC2
CONST EM_GETLINE = &HC4
CONST EM_LIMITTEXT = &HC5
CONST EM_CANUNDO = &HC6
CONST EM_UNDO = &HC7
CONST EM_FMTLINES = &HC8
CONST EM_LINEFROMCHAR = &HC9
CONST EM_SETTABSTOPS = &HCB
CONST EM_SETPASSWORDCHAR = &HCC
CONST EM_EMPTYUNDOBUFFER = &HCD
CONST EM_GETFIRSTVISIBLELINE = &HCE
CONST EM_SETREADONLY = &HCF
CONST EM_SETWORDBREAKPROC = &HD0
CONST EM_GETWORDBREAKPROC = &HD1
CONST EM_GETPASSWORDCHAR = &HD2
$ESCAPECHARS ON
$TYPECHECK ON
$INCLUDE "RAPIDQ.INC"
DECLARE FUNCTION SendMessageX LIB "user32" ALIAS "SendMessageA" (BYVAL hwnd AS LONG, _
BYVAL wMsg AS LONG, BYVAL wParam AS LONG, lParam AS LONG) AS LONG
DECLARE SUB OnClose_frmMyForm
DECLARE SUB OnClic_AnyMenu (Sender AS QMENUITEM)
CREATE frmMyForm AS QFORM
Center
Width = 600
height = 100
CAPTION = "frmMyForm V 1.0.0 CLIC ON RUN TO START"
AutoScroll = False
OnClose = OnClose_frmMyForm
CREATE Main AS QMAINMENU
CREATE mnuRUN AS QMENUITEM
CAPTION = "&RUN"
OnClick = OnClic_AnyMenu
END CREATE
END CREATE
CREATE edtMyEdit AS QEDIT
Left = 5
Top = 5
Width = 200
Height = 25
Font.Size = 12
Font.Bold = True
Text ="dfaqf\r\nsdwn,f,;:wsdn;:n;:v,nwxcv,;:wn,;:,nsdfggklgj\r\nfkdjqsflkqsdjkljsdjkfl\kjqdkljqfk"
END CREATE
END CREATE
SUB OnClose_frmMyForm
application.Terminate
END
END SUB
DECLARE FUNCTION SetWindowLong LIB "user32" ALIAS "SetWindowLongA" (hWnd AS LONG, _
nIndex AS LONG, dwNewLong AS LONG) AS LONG
SUB MinSet (fhand AS INTEGER, gwl_hand AS INTEGER, hwnd AS INTEGER, apphand AS INTEGER)
setwindowlong(fhand, Gwl_Hand, hwnd)
setwindowlong(apphand, GWL_Hand, fhand)
END SUB
MinSet(frmMyForm.handle, -8, 0, application.handle)
frmMyForm.SHOWMODAL
SUB OnClic_AnyMenu (Sender)
DEFINT lineCount, lineLength, iPtr
DEFSTR EditLineText
SELECT CASE Sender.Handle
CASE mnuRun.Handle
lineCount = SendMessageX (edtMyEdit.Handle, EM_GETLINE, 0, 0)
SHOWMESSAGE ("Line Count : " & STR$(lineCount))
lineLength = SendMessageX (edtMyEdit.Handle, EM_LINELENGTH, 0, 0)
SHOWMESSAGE ("Line Length : " & STR$(lineLength))
EditLineText = SPACE$ (lineLength + 1)
lineLength = SendMessageX (edtMyEdit.Handle, EM_GETLINE, 0,VARPTR(EditLineText))
EditLineText = LEFT$(EditLineText, lineLength)
SHOWMESSAGE ("Line (0): \n" & EditLineText & "\nLength : " & STR$(lineLength))
END SELECT
END SUB
|