July 21, 200520 yr I need someone to help me started on a C++ software.I got here a c++ program which can be operated from a cmd window. I need that to become a GUI based software.I got Visual C++ 6 and I got Bloodshed Dev-C++The cmd based program I can change in Dev-Cpp and I can make GUIs in Visual C++ But I can't manage to combine the 2 without errors that I do not know how to correct.I've been messing around with wxWidgets but that seems even to complex for my knowledge.Ideal would be to be able to do it all in VB.Net but I ain't going to start dreamin 'bout that.Who can help me out ?
July 21, 200520 yr Hi Philippe,Run DevC++, create a new project, choose Windows Application with C++ Project as selected option. Now you will have got a skeleton for your GUI program (sort of empty program) for free! You only have to integrate your c++ code into that WinMain function. Just do it step by step and check regularly whether it still compiles and runs.Succes!Regards,Nicowww.nicokaan.nl
July 21, 200520 yr That's what I did try and it don work.I don't manage to add all the code I need to add.
July 21, 200520 yr >That's what I did try and it don work.>I don't manage to add all the code I need to add.What's the problem? It does not compile or what?I'm afraid you have to grab a book on C++ and study some examples...C++ has a learning curve of about 6 months...Remember the a saying: "real programmers need a Fortran compiler and a beer ...";-)Nicowww.nicokaan.nl
July 21, 200520 yr No such tutorials online on this subject as the ones I had for OpenGL ?It took me just 1 day and I got the hang of things with that :/If you'd asked me before I'd have told you that I figured it would be way more dificult to program an OpenGL thingy than just a basic form with buttons and checkboxes and stuff ...I think I can say now for sure: Visual Basic .Net owns :(
July 22, 200520 yr I'm currently building up CMD/FMC with VB6, so far it went well. VB.Net wouldn't do any good... I have tried and it constantly creating few problems. especially intervals>Ok, I'm that far .. now how do I add a btn to my form ?I assume you mean VB.Net?? Just click on btn icon on tool bar, then on the form you you would see it appears.Good luck
July 22, 200520 yr Naaaaaaah, you assume wrong dude !In .Net or even VB6 adding stuff to your form is just click and drag it to where it should be.C++ however :/Ok in Visual C++ I can do that same thing, but I don manage to put my own code into that one and besides it adds to much stuff to the form I don need by default.
July 22, 200520 yr I must misunderstood you, perhaps. I am not sure how you want your program to work. But in vb platform, you don't really need to drag in some tools (i.e. button, frame and etc) on form. You could simply write button or jogging keyboard click events it work almost same with C++.
July 23, 200520 yr I'm relatively good with VB and specially with .NetThe problem is that the soft I get from Manuel from PHCC is in C++ and there's no one who can help me write similar stuff in VB.NetIt should be code which interfaces to the serial port and I'm not sure if I am that good in VB.NetSo I got some cpp files and some header files which makes it work with the phcc. However I do not manage to incorporate this code into a c++ with form and buttons.I got wx-Dev-C++ now which is a modified version of dec-cpp which got wx-widgets baked into the install. That all looks very nice and does work indeed. I can make a form now with buttons and all in C++ but when I try to add the code from the CMD-based program I got from Manuel, things mess up full of errors which I don't understand and don't know how to correct.
July 23, 200520 yr Philippe,Like I said before, you really ought to study a book on C++ and GUI programming. Although the basics is easy, the sheer number of detail about the programming environment and Windows GUI programming makes it complex. Learning by trial and error is not the right approach, imho.(I have about 30 years of practical programming experience, starting with assembly languages, via Pascal, C, Modula2 and CHILL, to Java and C++ ... ;-) )Nicowww.nicokaan.nl
July 23, 200520 yr There are a lot of low-level stuff in C++ that has no direct or equivalent with VB far as I'm aware... there is a converter but I'd imagine there would be a lot of Windows API stuff that stuck in. I would suggest you just try to use the C++ as DLL's to the VB application. It probably would work...I have seen some.
July 23, 200520 yr Also, Instead of pulling your hair... you could try visithttp://www.boondog.com/%5Ctutorials%5Cdllt...%5Cdlltutor.htmon this website, there is a tutorial that explain how to write VB Appl interfacing serial I/O card. But this one is for VB5, and should work same with VB6 or VB.NetI am not sure if it's compatible for PHCC, but I assure there are some basic ideas for you to start and then change some stuffs that become compatible for your PHCC cardsIf you prefer otherway... there is a tutorial that explain how to create C++ into .dll for VBAhttp://www.logix4u.net/dll_tutorial1.htmHope this helps
Create an account or sign in to comment