SELBULLET

EPISCOPAL 27/09/2009 17:44:51
#323796
Pessoal é o seguinte:

no richtextbox a propriedade selbullet = true aciona umas bolinhas para marcação ..... certo???
mas qdo a gente pressiona CRTL+SIFHT+ L automaticamente o bullet vira um numero arabico, romano ou letras ... certo???


agora queria saber se tem algum classmodule pra a pessoa saber qdo é que o paragrafo esta em bullet, Numeros, letras ou nada ?????

....... desde ja agradeçooooooo .....
EPISCOPAL 27/09/2009 17:47:43
#323797
Será q apelei ............... pergunta dificil?????
EPISCOPAL 28/09/2009 21:24:29
#323905
Insira em uma class module

>>>>>

Option Explicit

Private Const EM_GETPARAFORMAT = (WM_USER + 61)
Private Const EM_SETTYPOGRAPHYOPTIONS = (WM_USER + 202)
Private Const EM_GETTYPOGRAPHYOPTIONS = (WM_USER + 203)
Private Const TO_ADVANCEDTYPOGRAPHY = &H1
Private Const PFM_STYLE = &H400
Private Const mZERO = &H0&

Private Declare Function SendMessageLong Lib [Ô]user32[Ô] Alias [Ô]SendMessageA[Ô] (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
#If UNICODE Then
Private Declare Function SendMessage Lib [Ô]user32[Ô] Alias [Ô]SendMessageW[Ô] (ByVal hwnd As Long, ByVal uMgs As Long, ByVal wParam As Long, lParam As Any) As Long
#Else
Private Declare Function SendMessage Lib [Ô]user32[Ô] Alias [Ô]SendMessageA[Ô] (ByVal hwnd As Long, ByVal uMgs As Long, ByVal wParam As Long, lParam As Any) As Long
#End If

Private Type CharRange
cpMin As Long
cpMax As Long
End Type

Private Type PARAFORMAT2
cbSize As Integer
dwpad As Integer
dwMask As Long
wNumbering As Integer
wReserved As Integer
dxStartIndent As Long
dxRightIndent As Long
dxOffset As Long
wAlignment As Integer
cTabCount As Integer
lTabstops(0 To 31&) As Long
dySpaceBefore As Long
dySpaceAfter As Long
dyLineSpacing As Long
sStyle As Integer
bLineSpacingRule As Byte
bOutlineLevel As Byte
wShadingWeight As Integer
wShadingStyle As Integer
wNumberingStart As Integer
wNumberingStyle As Integer
wNumberingTab As Integer
wBorderSpace As Integer
wBorderWidth As Integer
wBorders As Integer
End Type

Public Function NumberBullet(hwndr As Long, intStart As Long, intEnd As Long) As Integer

Dim myparaf As PARAFORMAT2
Dim cr As CharRange
Dim lngRet As Long, teste As Byte

myparaf.cbSize = Len(myparaf)
NumberBullet = 0

cr.cpMax = intEnd
cr.cpMin = intStart

lngRet = SendMessageLong(hwndr, EM_SETTYPOGRAPHYOPTIONS, TO_ADVANCEDTYPOGRAPHY, TO_ADVANCEDTYPOGRAPHY)

If lngRet = 1 Then
lngRet = SendMessage(hwndr, EM_GETPARAFORMAT, mZERO, myparaf)
NumberBullet = myparaf.wNumbering
End If


End Function

>>>>>>>>>>>



Dim BStyle As Integer
Set BulletStyle = New clsRichText
BStyle = BulletStyle.NumberBullet(rtfTexto.hwnd, inText, fimText)

if BStyle > 1 then [ô]esta numerada ................




>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> VALEU GENTE ..................

Tópico encerrado , respostas não são mais permitidas