Modify ↓
Opened 11 years ago
Closed 11 years ago
#2700 closed Bug (Fixed)
_GUICtrlRichEdit_SetCharBkColor()
Reported by: | mLipok | Owned by: | Jpm |
---|---|---|---|
Milestone: | 3.3.11.5 | Component: | Standard UDFs |
Version: | 3.3.11.4 | Severity: | None |
Keywords: | Cc: |
Description
from HelpFile:
Sets the background color of selected text or, if none selected, sets the background color of text inserted at the insertion point
here is a solution to the UDF:
If $ai[0] = $ai[1] Then ;~ Return _SendMessage($hWnd, $EM_SETCHARFORMAT, $SCF_ALL, $tCharFormat, 0, "wparam", "struct*") <> 0 Return _SendMessage($hWnd, $EM_SETCHARFORMAT, $SCF_SELECTION, $tCharFormat, 0, "wparam", "struct*") <> 0 Else Return _SendMessage($hWnd, $EM_SETCHARFORMAT, $SCF_SELECTION, $tCharFormat, 0, "wparam", "struct*") <> 0 EndIf
And solution after cleaning, just do not use If the else statement just use:
Return _SendMessage($hWnd, $EM_SETCHARFORMAT, $SCF_SELECTION, $tCharFormat, 0, "wparam", "struct*") <> 0
MS DOC:
http://msdn.microsoft.com/en-us/library/windows/desktop/bb774230(v=vs.85).aspx
SCF_SELECTION Applies the formatting to the current selection. If the selection is empty, the character formatting is applied to the insertion point, and the new character format is in effect only until the insertion point changes.
Attachments (0)
Change History (2)
comment:1 Changed 11 years ago by mLipok
comment:2 Changed 11 years ago by Jpm
- Milestone set to 3.3.11.5
- Owner set to Jpm
- Resolution set to Fixed
- Status changed from new to closed
Fixed by revision [10091] in version: 3.3.11.5
Guidelines for posting comments:
- You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
- In-depth discussions should take place on the forum.
For more information see the full version of the ticket guidelines here.
Note: See
TracTickets for help on using
tickets.
sorry
I forgot REPRO: