How to Convert Code from VB to C++?

Can i Convert VB code to C++ code

  • Can I convert my VB code to C++? How can I do it? This is my VB code: Dim OpenFileDialog1 As New OpenFileDialog With OpenFileDialog1 .CheckFileExists = True .ShowReadOnly = False .Filter = "All Files|*.*|Bitmap Files (*)|*.bmp;*.gif;*.jpg" .FilterIndex = 2 If .ShowDialog = DialogResult.OK Then ' Load the specified file into a PictureBox control. PictureBox1.Image = Image.FromFile(.FileName) End If End With

  • Answer:

    Well you can convert it to C++, and using a graphical library might be the easiest way to do so. I recommend using http://qt.nokia.com/products. It is a fairly simple graphical framework which works on several platforms. We currently don't know which platform you target, however I assume you're targeting Windows since you showed an example in Visual Basic. Typically, using Qt classes QFileDialog and QPicture, you should be able to achieve your goal quite quick. The framework is shipped with a whole set of simple examples. One of them is exactly what you ask.

shubu at Stack Overflow Visit the source

Was this solution helpful to you?

Other answers

http://msdn.microsoft.com/en-us/library/ms646829%28VS.85%29.aspx#open_file is an MSDN-Example for an OpenFileDialog using the WinAPI.

gammelgul

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.