Visual C++ 2008 as frontend for Access - c++

I am working on a database project that requires me to code in C++. I have the framework for the relational database built using Microsoft Access. Since I would like a GUI for the user, I am trying to use Visual C++ 2008 to build it.
I have tried to build a solution as a win32 console app, MFC app, and CLR app, each halting me with their various errors.
I have scoured the web for help but to no avail. If anyone could give me some direction or, better yet, a link to a good tutorial, it would be much appreciated.
Ben

I found an MSDN article about developing C / C++ apps that connect to Microsoft Access. Hope this helps.

Related

How to install npgsql for c++ in Visual Studio 2017

sorry if this is too simple to be of help to most people.
This is the first time I have done anything remotely like this and it appears that my problem is too unadvanced to be covered in any documentation.
I am trying to connect a c++ project in Visual Studio 2017 to a PostgreSQL database.
Just to be clear, I know how to run pgAdmin/host databases, code in C++, and I think I could handle the npgsql syntax if I got it working.
However, I've never used .NET (although 4.5 is on my computer).
Here's what I am doing:
I start an empty project for C++ in Visual Studio 2017.
I open nuget manager and search npgsql, but my project is pointing to native,v0.0 instead of a .NET framework.
So I target v4.5 in the .NET framework property, but that doesn't change anything.
Could someone please tell if what I am trying to do is possible?
Should I be using a different project other than empty project?
Does this need to be some kind of web application?
If it is possible I'd love any advice on how to do it.
If you are writing a native c++ program it is very unlikely you want to bring in a .net assembly. If you want to connect to a pg database I would suggest instead that you use the odbc driver (https://odbc.postgresql.org/) or perhaps there is some library available as part of PG, but using a .net assembly will require a great deal of unnecessary interop work.

How can I reference a C++/CLI project in a silverlight application

I have a question about C++/CLI and Silverlight. I am currently working on a projet using the MVVM pattern where :
The business logic is written using C++ DLLs and a C++/CLI wrapper
I use a Silverlight application for the presentation part.
So I have to use my C++/CLI project in my Silverlight application, however, I can't because my project it's not a Silverlight project.
I've looked on the internet, where I found no suitable solution for my problem yet.
Therefore, I hope that you have a solution for this particular problem.
For the record, I work on Windows Seven using Visual Studio 2010, .NET 4.5 and Silverlight 5.
Thank you.
P.S: Sorry for my English, it's not my mothertongue.
The best solution I found is to create a wcf service which calls the c++ functions.
However, you must use a HostServiceFactory in order to make your web services able to find your dlls.
Thanks for your answers

Best way to create a standalone-exe (Forms) (C++)

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?
I would suggest Borland C++ Builder 5 or 6. Visual C++ lacks the functionality to create C++ form apps, if we dismiss MFC
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.
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.
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.
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:
https://stackoverflow.com/q/1754020/4916
https://stackoverflow.com/q/93326/4916
Best C++ IDE or Editor for Windows

Anything like Watin available for C++?

I'm wondering if there are any projects like Watin available for C++ (on Windows), or if I just have to use QtWebkit.
Does anyone know of any good IE automation libraries that work well in C++ and provide a nice layer above MS's WebBrowser control?
Thanks.
You could try using Mozilla's Gecko/FireFox engine in C++.
https://developer.mozilla.org/en/Embedding_Mozilla
You can use IRobotSoft Visual Web Scraper. It has an ActiveX control for C++ in its package.
For automation take a look at VOLE - A Neat C++ COM/Automation Driver.
For C++ Web development see:
CppCMS — C++ Web Development Framework
Wt - A C++ Web Toolkit
You can and should also look at alternatives like Watir and Selinium.

Challenge working with Visual Studio and VC++?

I have started working with C++ recently and am not comfortable with Visual Studio Development Environment and also I do not have proper understanding of MFC, Win32, ATL, COM Terminologies.
From example point of view, I had taken a simple C++ program to see how it works with Visual Studio Environment and I was having some issues to get that code up and running.
I would like to request if someone could point me to some online resources/books where I can get more understanding about Visual Studio Development Environment from C++ perspective and get some knowledge about MFC, Win32, ATL, COM Terminologies than it would be really very helpful to me.
Note: I have checked MSDN library and some related Microsoft sites but when I see HOW DO I kind of video tutorials they are more from .Net/C#/ASP.Net perspective but I am looking for some online resource for C++/VC++ perspective.
www.stackoverflow.com of course will have plenty of resources around if you look # the right tags
https://stackoverflow.com/questions/tagged/mfc
https://stackoverflow.com/questions/tagged/com
etc.
The Code Project is also a good resource for windows / C++ programming, here are a couple areas to start looking #:
http://www.codeproject.com/KB/MFC/
http://www.codeproject.com/KB/atl/
http://www.codeproject.com/KB/COM/comintro.aspx (via Andy in comments)
The classic book about Win32 is presumably Petzold's. Petzold's book is I think (I've never read it) mostly about GUI programming; whereas the other classic/recommended Win32 book, which is Richter's, is about 'system' (non-GUI) programming.
For learning COM, perhaps Essential COM? Some reviewers praise it, but some others reviews say things like "not for beginners"; but it's how I learned COM, and I found it thorough, low-level, and detailed. It assumes you know C++ (not COM) already.
IMO you don't need books about MFC if you already know C++ and the Win32 API, in which case the reference libraries are sufficient. Alternatively, some people recommend an MFC book like Prosise's.
I learned using Visual Studio IDE and MFC using the Scribble Tutorial. It was a step-by-step tutorial creating a simple MFC application. Unfortunately the tutorial was written for Visual Studio 6.0, and in the meantime almost all wizards and menus changed, so it's not applicable anymore.
The tutorial can be found in MSDN, here, though:
http://msdn.microsoft.com/en-us/library/aa716528(VS.60).aspx
The scribble sample source for Visual Studio 2008 can be found here:
http://msdn.microsoft.com/en-us/library/f35t8fts.aspx
Don't bother learning ATL, WTL, MFC or COM for now (or at all, really). Just use standard C++ for starters. If you want to write GUI programs, I recommend Qt, it is much easier and fun to use than any of the former APIs.
If you have trouble compiling Qt for Visual C++ you can download the entire Qt SDK and it comes with a C++ IDE called Qt Creator. It uses MinGW as a backend.