IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Visual C++ Discussion :

Proposition de ligne après un "."


Sujet :

Visual C++

  1. #1
    Membre du Club
    Homme Profil pro
    Electronicien
    Inscrit en
    Août 2008
    Messages
    361
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Electronicien
    Secteur : High Tech - Électronique et micro-électronique

    Informations forums :
    Inscription : Août 2008
    Messages : 361
    Points : 53
    Points
    53
    Par défaut Proposition de ligne après un "."
    Bonjour,

    Etant loin d'être un habitué de visual C++, je sais que par exemple sur delphi quand je tape une ligne de commande après le point il me proposait plusieurs choix.

    Je n'ai pas cette option sur visual C++, pourtant d'après ce que j'ai vu cette option correspond à intellisence si je me trompe pas, et en allant dans les option celui-ci est activé et pourtant ?

    Quand par exemple je commence par taper

    textbox6. Après le point rien ne s'ouvre pour me proposer plusieurs choix.

    Est-ce normal ?

  2. #2
    Expert éminent sénior
    Avatar de Médinoc
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Septembre 2005
    Messages
    27 381
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 40
    Localisation : France

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Septembre 2005
    Messages : 27 381
    Points : 41 582
    Points
    41 582
    Par défaut
    Quelle version/édition de Visual? Il y a eu bcp de changements d'une version à l'autre.

    Dans la version 2010, Intellisense est carrément désactivé pour C++ (ou seulement certains types de projets C++? Je n'ai pas bien compris).

  3. #3
    Membre du Club
    Homme Profil pro
    Electronicien
    Inscrit en
    Août 2008
    Messages
    361
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Electronicien
    Secteur : High Tech - Électronique et micro-électronique

    Informations forums :
    Inscription : Août 2008
    Messages : 361
    Points : 53
    Points
    53
    Par défaut
    En faite, je suis passé de la version Visual C++ express 2010 ou intellisense ne fonctionnait apparemment pas à la version Visual Studio 2013 qui apparemment fonctionne correctement.

    Maintenant la problèmatique est autre c'est à dire que je souhait afficher une valeur décimal dans mon textbox alors que celle-ci m'affiche cette même valeur en ascii, ça fait environ une semaine que je galère pour pouvoir faire ça.

    En faite mon programme que j'ai récupérer de chez microchip est fonctionnel dans le sans ou j'arrive a récupérer la valeur envoyé par mon micro PIC32MX795 sur mon bus USB seulement celle-ci est affiché en ascii ???

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
     
    private: System::Void serialPort1_DataReceived(System::Object^  sender, System::IO::Ports::SerialDataReceivedEventArgs^  e) 
    		{
    			//The ReadExisting() function will read all of the data that
    			//  is currently available in the COM port buffer.  In this 
    			//  example we are sending all of the available COM port data
    			//  to the SetText() function.
    			//
    			//  NOTE: the <SerialPort>_DataReceived() function is launched
    			//  in a seperate thread from the rest of the application.  A
    			//  delegate function is required in order to properly access
    			//  any managed objects inside of the other thread.  Since we
    			//  will be writing to a textBox (a managed object) the delegate
    			//  function is required.  Please see the SetText() function for 
    			//  more information about delegate functions and how to use them.
    			try
    			{
    				SetText(serialPort1->ReadExisting());
     
     
     
    			}
    			catch(...)
    			{
    			}
    		}
    et là elle s'affiche

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
     
    		private: void SetText(String^ text)
    		//private: void SetData(String)
    		{
    			System::Text::StringBuilder output;
    			System::String^ input ;
    			//InvokeRequired required compares the thread ID of the
    			//  calling thread to the thread ID of the creating thread.
    			//  If these threads are different, it returns true.  We can
    			//  use this attribute to determine if we can append text
    			//  directly to the textbox or if we must launch an a delegate
    			//  function instance to write to the textbox.
     
    			if (this->txtDataReceived->InvokeRequired)
    			//if (this->txtDataReceived1->InvokeRequired) //Laurent
    			{
    				//InvokeRequired returned TRUE meaning that this function
    				//  was called from a thread different than the current
    				//  thread.  We must launch a deleage function.
     
    				//Create an instance of the SetTextCallback delegate and
    				//  assign the delegate function to be this function.  This
    				//  effectively causes this same SetText() function to be
    				//  called within the main thread instead of the second
    				//  thread.
    				SetTextCallback^ d = gcnew SetTextCallback(this,&VCCDC::Form1::SetText);
     
     
    				//Invoke the new delegate sending the same text to the
    				//  delegate that was passed into this function from the
    				//  other thread.
     
     
    				this->Invoke(d, gcnew String(text));
     
    			}
    			else
    			{
     
     
    				textBox6->Clear();
    				textBox6->AppendText(text);
     
     
     
    			}
    		}
    a priorie AppendText ajoute du texte encodé UTF-8 à un fichier à "test", comment pourrai-je récupérer une valeur que je souhaite merci

    cette environnement m'est complètement inconnu, étant habitué à codée en "c" en tant qu'électronicien et pacal sur delphi

  4. #4
    Expert éminent sénior
    Avatar de Médinoc
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Septembre 2005
    Messages
    27 381
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 40
    Localisation : France

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Septembre 2005
    Messages : 27 381
    Points : 41 582
    Points
    41 582
    Par défaut
    "En ASCII" n'est pas un format de nombre, c'est un encodage de texte: ça ne veut rien dire.

    Dis-moi le nombre que tu transmets, et sous quelle forme il est transmis par le port série: Si je transmets 42, sera-t-il de la forme {0x00, 0x00, 0x00, 0x2A} ou plutôt {0x34, 0x32}?

  5. #5
    Membre du Club
    Homme Profil pro
    Electronicien
    Inscrit en
    Août 2008
    Messages
    361
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Electronicien
    Secteur : High Tech - Électronique et micro-électronique

    Informations forums :
    Inscription : Août 2008
    Messages : 361
    Points : 53
    Points
    53
    Par défaut
    Mon pic transmet une valeur hexadécimal que j'ai pris au hasard pour l'essai qui est 3C4F487A sous mplab(en c ) comme ceci :

    int valeur3;
    valeur3=0x3C4F487A;
    putUSBUSART(&valeur3,4);

    et j'affiche pour l'instant dans ma textbox6 => zHO< via Visual Studio sur mon pc, avec l'octet de poids faible envoyé en premier.

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Réponses: 4
    Dernier message: 14/02/2006, 08h35
  2. [DOM] Problème de suppression sauts de lignes après modification XML
    Par chabada dans le forum Format d'échange (XML, JSON...)
    Réponses: 4
    Dernier message: 15/06/2005, 13h46
  3. [XSL-FO] retour à la ligne après un tableau ?
    Par Mrlud dans le forum XSL/XSLT/XPATH
    Réponses: 5
    Dernier message: 25/04/2005, 17h15
  4. [langage] split ligne apres ligne ?
    Par simos dans le forum Langage
    Réponses: 17
    Dernier message: 25/06/2004, 15h07

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo