Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
3014 connectés 

  FORUM HardWare.fr
  Programmation
  C++

   [MFC] -- Autoscrolling vertical d' un EditControl multiligne

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

[MFC] -- Autoscrolling vertical d' un EditControl multiligne

n°184016
DonPichol
\o/ CPMA 43v3r \o/
Posté le 26-07-2002 à 23:09:51  profilanswer
 

Comment faire pour que la scrollbar vertical de mon EditControl multiligne descende toute seule lorsque que j'ecris une nouvelle ligne ?
Je m'explique, j'ai besoin de faire une console afin d'afficher à l'utilisateur certaines des opérations effectuées durant l'execution (les afficher a la volée).
Le probleme est lorsque que j'ecris une nouvelle ligne par l'intermediaire d'une fonction (et que le texte generé ligne par ligne devient plus grand que mon editcontrol) la barre de scrolling vertical a gauche s'active normalement mais je voudrais la faire descendre automatiquement afin que la derniere ligne ecrite soit juste au dessus du bord inferieur de mon edit box.
Merci :)
 
(sorry pour les fautes d'ortho :P)


Message édité par DonPichol le 26-07-2002 à 23:11:01
mood
Publicité
Posté le 26-07-2002 à 23:09:51  profilanswer
 

n°184149
torpe23
Posté le 27-07-2002 à 03:07:48  profilanswer
 

CEdit::LineScroll  
void LineScroll( int nLines, int nChars = 0 );
 
Parameters
 
nLines
 
Specifies the number of lines to scroll vertically.
 
nChars
 
Specifies the number of character positions to scroll horizontally. This value is ignored if the edit control has either the ES_RIGHT or ES_CENTER style.
 
Remarks
 
Call this function to scroll the text of a multiple-line edit control.  
 
This member function is processed only by multiple-line edit controls.  
 
The edit control does not scroll vertically past the last line of text in the edit control. If the current line plus the number of lines specified by nLines exceeds the total number of lines in the edit control, the value is adjusted so that the last line of the edit control is scrolled to the top of the edit-control window.  
 
LineScroll can be used to scroll horizontally past the last character of any line.
 
For more information, seeEM_LINESCROLL in the Win32 documentation.
 
CEdit Overview |  Class Members |  Hierarchy Chart
 
See Also   CEdit::LineIndex

n°184161
DonPichol
\o/ CPMA 43v3r \o/
Posté le 27-07-2002 à 04:44:38  profilanswer
 

Merci bien :)
G u du mal a le faire marcher mais c bon mnt !! :)


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  C++

   [MFC] -- Autoscrolling vertical d' un EditControl multiligne

 

Sujets relatifs
[C++] MFC + DLL + multilanguage[MFC] Mettre une boite de dialogue en background
[MFC] Fonction CALLBACK membre d'une classe...[MFC] Récupérer les arguments de la ligne de commande (argc, argv,...)
[MFC] CToolBar et CToolBarCtrl, comment ça marche ?[MFC + DAO] Base de donnees avec DAO
[VC++ MFC] Access - Question sur la gestion d'un champ OLE[VC++ avec les MFC (pour faire plaisir a deathsharp)] changer un icone
texte vertical dans un tableau[VB6] Comment faire un Vertical Scroll Bar???
Plus de sujets relatifs à : [MFC] -- Autoscrolling vertical d' un EditControl multiligne


Copyright © 1997-2025 Groupe LDLC (Signaler un contenu illicite / Données personnelles)