Thursday, July 9, 2009

Could someone give me a tutorial on how to write a GUI framework/library in c++?

I Want to write an API like windows.h or GTK. I know this might be hard, but I want to try.

Could someone give me a tutorial on how to write a GUI framework/library in c++?
go to codeproject.com and learn MFC and WTL for gui framework
Reply:It's harder to write the tutorial than it is to write the library.





Most programmers buy a library, rather than write one, especially C++ programmers. After all, if they were into systems programming, they'd be using C, not C++.





And if you need a tutorial in order to do it, you are going to end up with something unusable.





So, I imagine the answer to your question is "no".
Reply:I don't see why you would want to. On Windows, you can use DirectX, GDI, or GDI+ for graphics work. However, if you've created some useful graphics procedures which make use of DirectX, GDI, or GDI+, then you can just make your procedures public and put them into a .dll file.





There's 2 ways you can go. You can write a COM object, or you can just write a .dll file with public procedures. I don't recommend the COM object route because there is more work and you should know that COM objects, OOP, and frameworks produce bloated, slow code.





Creating a .dll file is easy. I don't recommend that you use a framework (Microsoft's MFC or Borland's VCL) for creating a .dll file because your code might require some of the stupid 'support' .dll files that those frameworks use. You don't want to bother having to include those files when you distribute your .dll file.





Here's information on DLL files:


http://msdn2.microsoft.com/en-us/library...


(Remember to set the linker to create a .dll file, not an .exe file.)
Reply:Or else you may contact a C++ expert at websites like http://oktutorial.com/


No comments:

Post a Comment