Anybody know? im having no luck with the HideCaret api call, even though it only has one parameter - hWnd
------------------
------------------
'¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤ ' Test of HideCaret and ShowCaret functions '¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤ #COMPILE EXE #INCLUDE "WIN32API.INC" %ID_TEXT = 20 DECLARE CALLBACK FUNCTION DlgProc() AS LONG '¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤ ' Create dialog and controls, etc '¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤ FUNCTION PBMAIN () AS LONG LOCAL hDlg AS LONG DIALOG NEW 0, "Hide/Show Caret test ",,, 180, 60, %WS_SYSMENU, 0 TO hDlg CONTROL ADD BUTTON, hDlg, 10, "Hide caret", 30, 4, 60, 14, %WS_BORDER CONTROL ADD BUTTON, hDlg, 11, "Show caret", 90, 4, 60, 14, %WS_BORDER CONTROL ADD TEXTBOX, hDlg, %ID_TEXT, "", 4, 25, 166, 14, %WS_CHILD OR %ES_NOHIDESEL, _ %WS_EX_CLIENTEDGE CALL DlgProc CALL SetFocus(GetDlgItem(hDlg, %ID_TEXT)) DIALOG SHOW MODAL hDlg CALL DlgProc END FUNCTION '¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤ ' Main callback '¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤ CALLBACK FUNCTION DlgProc() AS LONG LOCAL lRes AS LONG SELECT CASE CBMSG CASE %WM_COMMAND IF CBCTLMSG = %BN_CLICKED THEN IF CBCTL = 10 THEN CALL SetFocus(GetDlgItem(CBHNDL, %ID_TEXT)) 'textbox must have focus lRes = HideCaret (GetDlgItem(CBHNDL, %ID_TEXT)) 'MSGBOX FORMAT$(lRes) 'if we want to check result ELSEIF CBCTL = 11 THEN CALL SetFocus(GetDlgItem(CBHNDL, %ID_TEXT)) lRes = ShowCaret(GetDlgItem(CBHNDL, %ID_TEXT)) 'MSGBOX FORMAT$(lRes) 'if we want to check result END IF CALL SetFocus(GetDlgItem(CBHNDL, %ID_TEXT)) FUNCTION = 0 : EXIT FUNCTION END IF END SELECT END FUNCTION
DIALOG SHOW MODELESS hDlg Call DlgProc CALL SetFocus(GetDlgItem(hDlg , 400)) HideCaret GetDlgItem(hDlg , 400) DIALOG SHOW MODAL hDlg Call DlgProc
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Comment