Jump to content

Recommended Posts

Posted

Does anyone know how to put a vertical cursor in an GUIEdit? A vertical cursor looks like this ' _ ' and it blinks instead of the I-beam blinker.

Hi:

Vertical would be | and horizontal would be _. Which one do you mean?

Normally you would use this:

GUICtrlSetCursor($GUIEditCtrl, <a # indicating cursor type>)

Posted (edited)

Sorry i meant horizontal. like this: _ and it blinks

Aha! The 'ol DOS Cursor.

I don't think the standard cursors ID's have it:

0 = UNKNOWN (this includes pointing and grabbing hand icons)

1 = APPSTARTING

2 = ARROW

3 = CROSS

4 = HELP

5 = IBEAM

6 = ICON

7 = NO

8 = SIZE

9 = SIZEALL

10 = SIZENESW

11 = SIZENS

12 = SIZENWSE

13 = SIZEWE

14 = UPARROW

15 = WAIT

You could try the 0 and load a custom cursor (.cur or .ani) OR

try the CreateCursor Function of "user32" DLL.

Edited by DaRam
Posted

Am I missing something? It is still a cursor !

its not the cursor i want to change. its the why the blinking cursor where you type looks like. as you type you see the vertical line. i want to change it to horizontal_ .

Posted

Yes, but the cursor IDs you are referring to are mouse cursors. He is talking about the blinking "cursor" that shows where the next character will be typed, regardless of where the mouse is.

If you open up SciTE, start typing, then press the insert key. That is what he wants his edit controls to use.

Not sure how to do it though

Regards,Josh

Posted

Got it. You need to call the following functions of user32.dll

1. use the LoadImage Function to load a Bitmap (with your custom Horizontal Shape)

2. Call the CreateCaret Function passing it the Edit Control's handle, Bitmap Reference, Width and Height

3. Call the ShowCaret Function passing it the Edit Control's handle

Yes, but the cursor IDs you are referring to are mouse cursors. He is talking about the blinking "cursor" that shows where the next character will be typed, regardless of where the mouse is.

If you open up SciTE, start typing, then press the insert key. That is what he wants his edit controls to use.

Not sure how to do it though

Posted

exactly, but what does the CreateCaret func look like, same as the showcaret?

VB Style Code:

Private Declare Function CreateCaret Lib "user32" (ByVal hWnd As Long, ByVal hBitmap As Long, ByVal nWidth As Long, ByVal nHeight As Long) As Long
Private Declare Function ShowCaret Lib "user32" (ByVal hWnd As Long) As Long
Private Declare Function LoadImage Lib "user32.dll" Alias "LoadImageA" (ByVal hInst As Long, ByVal lpsz As String, ByVal un1 As Long, ByVal Height As Long, ByVal Width As Long, ByVal un2 As Long) As Long
Posted

Sigh! muttley

DllCall("user32.dll","long","ShowCaret","hwnd",$controlID)

Do a forum search for "+LoadImage" and have fun.

im going to be a big pain, but that means nothing to me. sorry. do you know it in autoit lang.?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...