billthecreator Posted July 15, 2008 Share Posted July 15, 2008 (edited) Does anyone know how to put a Horizontal cursor in an GUIEdit? A Horizontal cursor looks like this ' _ ' and it blinks instead of the I-beam blinker. Edited July 15, 2008 by billthecreator [font=Microsoft Sans Serif]My Scripts: From Most recent to least.[/font]Countdown GUI | QLOCK TWO | FlipClock | Slot Machine My UDF:_GenerateRandomNoRepeat | _GuiSnap Link to comment Share on other sites More sharing options...
DaRam Posted July 15, 2008 Share Posted July 15, 2008 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>) Link to comment Share on other sites More sharing options...
billthecreator Posted July 15, 2008 Author Share Posted July 15, 2008 Sorry i meant horizontal. like this: _ and it blinks [font=Microsoft Sans Serif]My Scripts: From Most recent to least.[/font]Countdown GUI | QLOCK TWO | FlipClock | Slot Machine My UDF:_GenerateRandomNoRepeat | _GuiSnap Link to comment Share on other sites More sharing options...
DaRam Posted July 15, 2008 Share Posted July 15, 2008 (edited) Sorry i meant horizontal. like this: _ and it blinksAha! 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 = WAITYou could try the 0 and load a custom cursor (.cur or .ani) ORtry the CreateCursor Function of "user32" DLL. Edited July 15, 2008 by DaRam Link to comment Share on other sites More sharing options...
billthecreator Posted July 15, 2008 Author Share Posted July 15, 2008 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_ . [font=Microsoft Sans Serif]My Scripts: From Most recent to least.[/font]Countdown GUI | QLOCK TWO | FlipClock | Slot Machine My UDF:_GenerateRandomNoRepeat | _GuiSnap Link to comment Share on other sites More sharing options...
DaRam Posted July 15, 2008 Share Posted July 15, 2008 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_ . Link to comment Share on other sites More sharing options...
JFee Posted July 15, 2008 Share Posted July 15, 2008 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 Link to comment Share on other sites More sharing options...
DaRam Posted July 15, 2008 Share Posted July 15, 2008 Got it. You need to call the following functions of user32.dll1. 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 Height3. Call the ShowCaret Function passing it the Edit Control's handleYes, 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 Link to comment Share on other sites More sharing options...
billthecreator Posted July 15, 2008 Author Share Posted July 15, 2008 exactly, but what does the CreateCaret func look like, same as the showcaret? [font=Microsoft Sans Serif]My Scripts: From Most recent to least.[/font]Countdown GUI | QLOCK TWO | FlipClock | Slot Machine My UDF:_GenerateRandomNoRepeat | _GuiSnap Link to comment Share on other sites More sharing options...
DaRam Posted July 15, 2008 Share Posted July 15, 2008 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 Link to comment Share on other sites More sharing options...
billthecreator Posted July 15, 2008 Author Share Posted July 15, 2008 im going to be a big pain, but that means nothing to me. sorry. do you know it in autoit lang.? [font=Microsoft Sans Serif]My Scripts: From Most recent to least.[/font]Countdown GUI | QLOCK TWO | FlipClock | Slot Machine My UDF:_GenerateRandomNoRepeat | _GuiSnap Link to comment Share on other sites More sharing options...
DaRam Posted July 15, 2008 Share Posted July 15, 2008 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.? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now