Using C++ for GUI with Database Application

This is a discussion on Using C++ for GUI with Database Application within the Windows Programming forums, part of the Platform Specific Boards category; Using C++ for GUI with Database Application i would like to work on a home project (so there is no ...

  1. #1
    Banned
    Join Date
    Nov 2005
    Posts
    8

    Lightbulb Using C++ for GUI with Database Application

    Using C++ for GUI with Database Application

    i would like to work on a home project (so there is no pressure) . More like of a debit-storage program of some sort. so it would need a database, and GUI on Windows 98.

    i just want to ask if it is enough to make a standalone application that i will use Win32 API or that would be too much of a pain(win32 api is hard even to make a dialog). should i go for wxWindows instead for the GUI? or a better suggestion to do the GUI?

    as for the database what is probably easier to connect using C++? i am not well experience with regards to databases, but i only need a simple database probably two tables with relationship will do.

    Another i would also like to have an output through excel or other spreadsheets like the one's on open office, but i don't know how to do it. does this requires me to learn COM? In Borland, i am used to calling to a component library for excel but i probably couldn't do the same thing because i would be dealing with a DevCpp compiler/components.

    thanks and more power.

  2. #2
    Registered User
    Join Date
    Jan 2005
    Posts
    847
    I don't think using the Win32 API is too difficult. Create your dialog in a resource editor and then handle the messages you want in your dialog procedure.
    As for databases look into ODBC.
    You don't have to learn much about COM to use a COM interface. You just need to create an instance of the COM object and call the meathods it exposes then call the release meathod when your done with it.

  3. #3
    Banned
    Join Date
    Nov 2005
    Posts
    8
    thanks! i'll keep those things in mind.

    i see you could do dialogs using a resource editor. i'm using PE Resource Explorer, due to lack of documentation i'm having a hard time, well exploring this resource editor. Are there any other better resource editor than this? i believe those from vc++ has their own but as what i said i'll be using devcpp on this.

    so any database that has ODBC support would probably have a driver for C++, then i would not have any problems with regards on the database.

    i might need to research more on using COM objects but thanks for giving me some idea on what it does.

  4. #4
    Disrupting the universe Mad_guy's Avatar
    Join Date
    Jun 2005
    Posts
    258
    Typically database frontends like that are enormous, if I were you, I'd use Delphi or the MFC (Delphi moreso, it's not that it would nessecarily be hard, it's just that, well, that'd be a great deal of code unless you needed something super ultra custom) for that kind of task, and if you are so inclined, you can write some backend in C++ and stuff it in a DLL. The thing about this approch is that if you modify critical parts of the backend, if you can construct your code right, you won't need to recompile the original frontend at all until you release an actual noticable new feature, the DLL if you need to modify it can simply come in a patch.

    As for resource editors, I don't have VC++, so I did go looking for one, the only free and fairly decent resource editor I could find was that which comes with the Open Watcom suite.
    Last edited by Mad_guy; 12-13-2005 at 08:46 PM.
    operating systems: mac os 10.6, debian 5.0, windows 7
    editor: back to emacs because it's more awesomer!!
    version control: git

    website: http://0xff.ath.cx/~as/

  5. #5
    Banned
    Join Date
    Nov 2005
    Posts
    8
    i am wondering... but delphi is not free right?could i do MFC programming using DevCpp? i only see tutorials using VC++ could i use those example on a DevCpp Compiler? i have never tired taht before. as i know like for borland VCL are specific to borland so i am thinking that MFC would be specific to VC++.

  6. #6
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,855
    I do lots of these small apps using Access DB connected via ODBC to a MFC frontend. MFC has classes for recordsets and databases to derive table specific classes from. Quick to start. Is possible in WIN32 but would have to write alot more back-end code.

    MFC requires the MSVC IDE but I believe you can download a free version of MSVC 2005, but IIRC MFC is not included.....

    COM / DCOM is another solution but I think this would be a bit of over-kill/over complication for this size app. Usually COM is used to connect a VB /ASP frontend through C++ DLLs to a DB.
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

  7. #7
    Banned
    Join Date
    Nov 2005
    Posts
    8
    but MSVC 2005 only works on XP as far as i know.

  8. #8
    Disrupting the universe Mad_guy's Avatar
    Join Date
    Jun 2005
    Posts
    258
    COM is for the most part used to seamlessly interoperate languages that support COM objects, the only issue with this is that natural idiosycratic parts of languages can somewhat make this a little annoying (meaning a long in C++ might not be a long in Visual BASIC.) It is totally feasible to pick yourself up a few COM objects and tie them together with some VB glue and have a fully functional application. A good book over COM is "Essential COM by Don Box."

    As for the Delphi thing - no, Delphi is not free, well, kinda. There are current architect additions of Delphi on Borlands' site of Architect 2005, I don't recommend these though, the IDEs in these new versions (Borland is focusing more on .NET support) are slow as all hell, and from what I hear somewhat annoying to work with. If you want to learn Delphi, I recommend either Borland Delphi 6, or Borland Delphi 7, they're the two most recent versions and very very powerful still. You can get Delphi 6 for about 99$ these days or if you know someone at some place like a university, probably for free.
    operating systems: mac os 10.6, debian 5.0, windows 7
    editor: back to emacs because it's more awesomer!!
    version control: git

    website: http://0xff.ath.cx/~as/

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Best choise for a local application database
    By gogic in forum C# Programming
    Replies: 2
    Last Post: 04-04-2006, 07:08 AM
  2. Developing database management software
    By jdm in forum C++ Programming
    Replies: 4
    Last Post: 06-15-2004, 04:06 PM
  3. Database Application VC++ or vb6..?
    By gardenair in forum C Programming
    Replies: 0
    Last Post: 04-13-2003, 10:06 PM
  4. database application help.
    By Billy Baroo in forum Linux Programming
    Replies: 1
    Last Post: 09-02-2002, 06:23 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21