5

I have to create an application for testing that is relatively simple. If a user plugs in a device into a USB (hid library), the form will say "Pass". If no device is detected, it will say "Fail".

I want to create the app to run on WinXP+. It must be a forms application as it needs to be visual and have colors. The biggest requirement for me is that it must be stand-alone (a user just double clicks, the file and it opens, no installation). I need to avoid installing any extra .dll files and want to avoid the .net framework all together. It has to be written in C++.

So my question is, what are my options? I am new to Forms applications and the only forms application I have written required the .net framework.

From my research, Visual C++ seems out of the question as it requires .net for Forms apps. What about Turbo C++ by Borland? It seems outdated, but can it do the job?

ThinkingStiff
  • 64,767
  • 30
  • 146
  • 239
skybox
  • 67
  • 4

5 Answers5

4

I would suggest Borland C++ Builder 5 or 6. Visual C++ lacks the functionality to create C++ form apps, if we dismiss MFC

Ulterior
  • 2,786
  • 3
  • 30
  • 58
  • 1
    Yes I went with this route. Create an app in less than an hour! Borland includes some great tools to convert Visual C++ .lib files to Borland .lib files. Implementation was really easy. – skybox Jul 08 '11 at 15:56
3

I'd say Visual C++ would probably still be your best option. A standard simple Win32 C/C++ program using only the native API will should suite your needs just fine. If you're targeting XP+, then the only dependency would be "msvcrt.dll" which is included with Windows by default.

Edit: This article on MSDN should get you started in the right direction.

Brandon Moretz
  • 7,512
  • 3
  • 33
  • 43
  • 1
    Geez, ppl dont wanna code forms by hand anymore and you suggest WinAPI. What's more to it is the UP votes from other devs. Visual C++ always lacked native c++ rad development and made their bet on .NET – Ulterior Jul 07 '11 at 18:06
  • @User in OP's problem statement he stated that he needs a window to say "Pass" or "Fail", I don't know that that really justifies a need for "RAD" tools. The article I linked him to will get him 90% of the way. If you want "RAD", that's what MFC was created for. – Brandon Moretz Jul 07 '11 at 18:10
  • Thanks for the info. Unfortunately I didn't have time to mess around with the native stuff. Hopefully in the future I can dig a little deeper into it. – skybox Jul 08 '11 at 15:57
1

What you're talking about is C++/CLI, it's microsoft's dialect of C++ that requires a .Net framework. Please distinguish it from real (native) C++, which can be used to create what you want to. Visual C++ is perfectly fine, just make sure you don't create a .Net project.

Yakov Galka
  • 70,775
  • 16
  • 139
  • 220
1

Forms are a .NET library. It's not Windows or anything like that, you can use the native GUI libraries in Win32 with no problem or any native wrapping of them. You can implement this in native C++ easily in Visual Studio.

Puppy
  • 144,682
  • 38
  • 256
  • 465
  • Thanks. After my research, I concluded using C++ Builder 10 was a far better solution. I'll look more into the native WINAPI when I have some time. – skybox Jul 08 '11 at 15:55
1

If you're looking to create the application in a rapid fashion (i.e. stock UI components that you can drag and drop onto forms), my experience is that Embarcardero C++ Builder effectively solves that problem space.

I like Visual C++ but it's not a great environment for rapidly creating forms based applications. I want to emphasize that I'm referring to Rapid Application Development (RAD) tools. There are plenty of great C++ IDEs and libraries for creating forms based applications and all of them should be able to create standalone exes.

Here is a list of related questions that might help in your decision:

Community
  • 1
  • 1
Scott Saad
  • 17,962
  • 11
  • 63
  • 84
  • Great links. I am going to read them all. I ended up using C++ Builder and it was really easy and well documented. I found a lot of help online. Thanks! – skybox Jul 08 '11 at 15:56