[MFC] Ceditview comment ca marche
Bonsoir,
Je n'ai pas encore trouvé comment utiliser Ceditview.
J'ai besoin d'afficher du texte qui doit être *selectionnable* or pour le moment dans ma cscrollview je l'affiche avec textout mais il n'est pas selectionnable.
Cette vue ne comportant que du texte je me suis dit qu'un Ceditview devait etre plus approprié que mon actuel cscrollviex mais je ne sais pas comment l'utiliser.
Alors si une âme charitable pouvais me donner un exemple pour inserer une ligne de texte :)
ps: je cherche sur la msdn mais ce n'est pas simple :$
Re: [MFC] Ceditview comment ca marche
Citation:
Envoyé par foxblue
Bonsoir,
ps: je cherche sur la msdn mais ce n'est pas simple :$
Tout est dans le MSDN ; quel est ton problème ??
Il sufftit d'utiliser les méthodes adéquates
Citation:
CEditView Constructs an object of type CEditView.
Attributes
GetEditCtrl Provides access to the CEdit portion of a CEditView object (the Windows edit control).
GetPrinterFont Retrieves the current printer font.
GetSelectedText Retrieves the current text selection.
LockBuffer Locks the buffer.
UnlockBuffer Unlocks the buffer.
GetBufferLength Obtains the length of the character buffer.
SetPrinterFont Sets a new printer font.
SetTabStops Sets tab stops for both screen display and printing.
Operations
FindText Searches for a string within the text.
PrintInsideRect Renders text inside a given rectangle.
SerializeRaw Serializes a CEditView object to disk as raw text.
Il faut chercher un peu par soi-même, il ya un exemple , je viens de consulter le MSDN.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcmfc98/dt__sample_mfc_MULTIPAD1.asp