|
From: markbradley65 on 15 Jan 2006 05:51 I have read in books that programs like Word, Excel, Access, Photoshop, Corel are written in C/C++ language . On the other hand I also have read that C/C++ do not have graphic libraries. If this is, then how do they draw all those icons and graphics of those programs? Any book or website where I can see this? Thanks in advance for any comment [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ]
From: Bob Hairgrove on 15 Jan 2006 14:36 On 15 Jan 2006 05:51:48 -0500, markbradley65(a)yahoo.com wrote: > I have read in books that programs like Word, Excel, >Access, Photoshop, Corel are written in C/C++ language . There is no such language: C/C++. There is C, and there is C++. C is not just a subset of C++, either; there are many differences between the two. >On the other hand I also have read that C/C++ do >not have graphic libraries. > >If this is, then how do they draw all those icons and graphics >of those programs? The operating system (in the case of the programs you mentioned, Microsoft Windows) exposes its API with a C interface. In order to draw on the screen or the printer, or any other supported graphic output device, you can call the GDI functions which are a subset of the API, or the other functions responsible for handling resources such as icons, menus, etc. These can be called from C++, Visual Basic, Fortran, assembler or any other language which can import external C functions from the Windows DLLs. Since the Platform SDK includes C header files, you can include them directly in your C++ programs. C and C++ both have to be portable across many operating systems and hardware platforms. Each OS and platform has different ways of dealing with graphics hardware. Therefore, it doesn't make sense to include the specifics of different platforms in the language itself. >Any book or website where I can see this? >Thanks in advance for any comment Look for the documentation to the Platform SDK on Microsoft's web site for writing programs on Windows. -- Bob Hairgrove NoSpamPlease(a)Home.com [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ]
From: dagecko on 15 Jan 2006 14:39 Le Sun, 15 Jan 2006 05:51:48 -0500, markbradley65 a ?crit : > I have read in books that programs like Word, Excel, > Access, Photoshop, Corel are written in C/C++ language . This is surely true. Few languages are used for programming OSes and 'main OSes programs' like those ones. C is still the main used language and C++ comes after. > > On the other hand I also have read that C/C++ do > not have graphic libraries. They don't have one in their standard library. But it exists thousands of non-standard libraries for that purpose, just like, in your case, the native Windows library. C and C++ are languages that provide only the strict minimum of 'functionalities' threw their standard libraries. This ensures portability and also restricts the work of the standard group. Also this allow users like us to write our own libraries even for graphic stuffs. I actually think of OpenGL which not depends on C/C++ ISO standard. > > If this is, then how do they draw all those icons and graphics > of those programs? Non standard libraries :) > > Any book or website where I can see this? > Thanks in advance for any comment [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ]
From: Niek Sanders on 15 Jan 2006 14:36 markbradley65(a)yahoo.com wrote: > I have read in books that programs like Word, Excel, > Access, Photoshop, Corel are written in C/C++ language . > > On the other hand I also have read that C/C++ do > not have graphic libraries. > Unlike Java, graphical libraries aren't part of the core language. However, there are many 3rd party toolkits which supply this functionality for you. I recommend TrollTech's QT, available here: http://www.trolltech.com/ Besides allowing you to make cross platform GUI programs, it also offers all sorts of neat things like XML parsing and database/network connectivity. - Niek Sanders http://www.cis.rit.edu/~njs8030/ [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ]
From: Alf P. Steinbach on 15 Jan 2006 14:41
* markbradley65(a)yahoo.com: > I have read in books that programs like Word, Excel, > Access, Photoshop, Corel are written in C/C++ language . > > On the other hand I also have read that C/C++ do > not have graphic libraries. Heh. There is no graphics library included in the C++ standard library, and there is no graphics library included in the C standard library. Most graphics libraries are C libraries, which can be used directly from C++, and some graphics libraries are C++ libraries, taking advantage of C++ features not found in C (these libraries cannot easily be used from C). I guess your question boils down to "how can I make something that isn't in the standard library"? Some things (including some graphics functionality) can be implemented in terms of what is in the standard library, and some things requires use of platform-specific features such as operating system APIs or the hardware. -- A: Because it messes up the order in which people normally read text. Q: Why is it such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail? [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ] |