Click here to Skip to main content
13,596,867 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hi Guys,

I'm trying to implement some code that uses a Windows Forms that contains a dropdown combobox that is filled with values. These values depict that level of detail i want stuff to be printed to a log (i.e. Critical messages, Error Messages, Debug Messages ec)

I am wondering if there is a way in which to get my C++ class file to READ the value of the COMBOBOX on the windows form?

i.e. comboBox1 = dlCritical.

In the logfile Class:
iDebugLevels = comboBox1.value()? // I know this doesn't actually work but it's just to explain what i'm looking for.

The structure of the file system is as follows:

<pre lang="c++">
   Applicatoin::Run(gcnew Form1());

public ref class Form1 : public System::Windows::Forms::Form
   private: WinIO mWinIO;
         mWinIO = gcnew WinIO();

  mLogFile = new LogFile();

     mDebugLevels = comboBox.Value();  //This is where i would like to read in the value of the combo box value from the form.
Posted 23-Apr-13 15:48pm
Sergey Alexandrovich Kryukov 23-Apr-13 21:56pm
How about just reading of the MSDN help pages, with proper attention?

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You should use the property System.Windows.Forms.ComboBox.Text, which is the value currently presented in the edit area:[^],[^].


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Cookies | Terms of Service
Web04-2016 | 2.8.180621.3 | Last Updated 23 Apr 2013
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100