|
-
Nov 6th, 1999, 03:10 PM
#1
Thread Starter
Fanatic Member
Is it possible to find out what column cursor is in RTF? Word has that function so I guess it is possible. If you know something about it please let me know.
Thanks
------------------
Visual Basic Programmer (at least I want to be one)
------------------
PolComSoft
You will hear a lot about it.
-
Nov 6th, 1999, 09:06 PM
#2
Sure, first make the following declarations:
Private Declare Function SendMessage _
Lib "user32" Alias "SendMessageA" ( _
ByVal hwnd As Long, _
ByVal wMsg As Long, _
ByVal wParam As Long, _
lParam As Any) As Long
Private Const EM_LINEINDEX = &HBB
Then add the following function:
Private Function GetColumn(rtfBox As RichTextBox) As Long
Dim lngCharPos As Long
lngCharPos = SendMessage(rtfBox.hWnd, EM_LINEINDEX, rtfBox.GetLineFromChar(rtfBox.SelStart), 0&)
GetColumn = rtfBox.SelStart - lngCharPos
End Function
Good luck!
------------------
Joacim Andersson
[email protected]
[email protected]
www.YellowBlazer.com
-
Nov 6th, 1999, 09:39 PM
#3
Thread Starter
Fanatic Member
Thanks
------------------
Visual Basic Programmer (at least I want to be one)
------------------
PolComSoft
You will hear a lot about it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|