|
I'm going on a bit of a book spending spree to get myself an ultimate C++/Object Oriented reference library and am considering the following books (which all seem to be highly recommended):
Accelerated C++: Practical Programming by Example
Effective C++
More Effective C++
Effective STL
Exceptional C++
More Exceptional C++
Exceptional C++ Style
The C++ Standard Library: A Tutorial and Reference
Beyond the C++ Standard Library: An Introduction to Boost
C++ Templates: The Complete Guide
C++ Template Metaprogramming: Concepts, Tools, and Techniques from Boost and Beyond
Modern C++ Design: Applied Generic and Design Patterns
Design patterns : elements of reusable object-oriented software (Gof)
Head First Design Patterns
Design Patterns Explained: A New Perspective on Object-Oriented Design
1) If I get all three Effective C++/STL books, is it worthwhile me getting all three Exceptional C++ books ?
2) Should I get the Design Patterns Gof book as it is quite old now, and from what I've read it doesn't really explain when patterns shoul;d not be used (plus there are other newer design pattern books) ?
3) Should I get both C++ Template books, or would one suffice ?
4) Any other suggestions or comments would be appreciated ?
|
|
|
|
|
Maybe you should start with Effective C++, read it, and after that see what you
want to do? Have you tried the Stroustrup?
|
|
|
|
|
Yeah, I've got the Stroustrup Special Edition.
I want to start using STL and the Boost libraries in particular to help speed up development time as well as offering portability and improving the quality (compared to custom written classes).
|
|
|
|
|
Hi
I'd like to write a programm to restrict internet sides.
I mean a filter that only allows some sides - maybe working like a virtual proxy depending on the user login name for a machine.
Second function should be to fill in login data into a form. And those data should be non changebal. For example using gmx login only for one given account.
Thanks for any help
Tim
If you believe this is not very usefull then I believe you have not been in my situaltion.
|
|
|
|
|
Does anyone have any good articles on doing these 2 things with c/c++? I see many articles for c# and VB. I would like to do simple everyday tasks but faster without the need of accessing AD Users and computers everytime.
Thanks
|
|
|
|
|
You can use the Win32 functions GetCurrentDirectory and SetCurrentDirectory or the CRT functions _tgetdcwd and _tchdir .
Steve
|
|
|
|
|
I recently downloaded Visual C++ Studio and when I try to compile my project, I get error messages such as these below. I made sure to follow the instructions on setting the VC++ Directories option but I still keep getting errors such as this one
c:\Pam 2\Headers\afxwin.h(19) : fatal error C1083: Cannot open include file: 'AFX.h': No such file or directory
and the problem is that most of these include files happen to be in the Windows Platform SDK / Include/MFC folder. How do I get my the compiler to look in there for these files please.
Tokorie
|
|
|
|
|
Tokorie wrote: recently downloaded Visual C++ Studio
Downloaded the express edition? If so, it doesn't come with MFC
|
|
|
|
|
I did download the express edition and then I downloaded SDK and followed the instructions on this page to get the two integrated http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/default.aspx[^]
but the problem is that it is still not detecting the files in the SDK and I would like to get the two working so I can compile my files without all these errors
|
|
|
|
|
Hmmm the last time I checked, you could only build native apps with the express edition.
|
|
|
|
|
It is able to do more now but needs to have the settings done correctly and that is the problem I keep having.
|
|
|
|
|
Tokorie wrote: It is able to do more now
ok... so what about adding
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\mfc
to the include directories?
|
|
|
|
|
Can you help with this error ??
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\mfc\afxv_w32.h(14) : fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h>
|
|
|
|
|
Are you including windows.h explicitly somewhere?
Also make sure you have something like this before any MFC header file includes...
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0400
#endif
Even if you get past this, the MFC included with the platform SDK is from VC 6.
If you get it to compile and run on 2005 express you will be the first I believe.
Even then, you'd be using MFC version 4.x
|
|
|
|
|
that didn't help.... the same problem persists and this what it points to when I compile and it gives me that error
#ifdef _WINDOWS_
#error WINDOWS.H already included. MFC apps must not #include <windows.h>
#endif
|
|
|
|
|
|
Hi,there
I'd like to load a JPEG picture onto a DirectDraw7 surface. For parsing the JPEG, I have used GDI+, the code like this:
Bitmap bitmap(L"F:\\images\\CIMG1531_1.jpg");
g_width = bitmap.GetWidth();
g_height = bitmap.GetHeight();
//create surface, load image
DDSURFACEDESC2 ddsd2;
INIT_STRUCT(ddsd2);
ddsd2.dwFlags = DDSD_CAPS|DDSD_WIDTH|DDSD_HEIGHT;
ddsd2.dwWidth = g_width;
ddsd2.dwHeight = g_height;
ddsd2.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN|DDSCAPS_VIDEOMEMORY;
if(FAILED(g_lpdd7->CreateSurface(&ddsd2, &g_lpddsSecond, NULL)))
return -1;
HDC hDC;
if(SUCCEEDED(g_lpddsSecond->GetDC(&hDC)))
{
Graphics graphics(hDC);
graphics.DrawImage(&bitmap, 0, 0);
g_lpddsSecond->ReleaseDC(hDC);
}
when the picture is small, the code works fine. otherwise, there's only a part of the picture could be display! The test picture has a resolution of 2990*2000, it's big, the problem occurs.
when I change the code like this:
ddsd2.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN|DDSCAPS_SYSTEMMEMORY;
to create the surface in system memory, the area displayed increased, but not all yet.
|
|
|
|
|
How are you displaying it once you've drawn it on the surface?
What video mode?
|
|
|
|
|
this is the drawing code:
RECT dest, src;
dest.left = pt.x+100;
dest.top = pt.y+50;
dest.right = pt.x + 400;
dest.bottom = pt.y + 350;
src.left = 0;
src.top = 0;
src.right = g_width-1;
src.bottom = g_height-1;
g_lpddsPrimary->Blt(&dest, g_lpddsSecond, &src, DDBLT_WAIT, NULL);
g_lpddsPrimary is the primary surface
video mode?sorry I don't know what you mean
|
|
|
|
|
giant_hao wrote: video mode?sorry I don't know what you mean
I meant display mode. I asked just in case you were trying to draw 2990x2000 image on 1280x1024
display without stretching.
I would think your code should work.
Perhaps Creating Wide Surfaces[^] is an issue
since you are creating an offscreen surface larger than the primary..(?)
Also what happens if you try this (keep the aspect ratio of the src image)...
RECT dest, src;
dest.left = pt.x+100;
dest.top = pt.y+50;
dest.right = dest.left + (g_width / 10 - 1);
dest.bottom = dest.top + (g_height / 10 - 1);
src.left = 0;
src.top = 0;
src.right = g_width-1;
src.bottom = g_height-1;
g_lpddsPrimary->Blt(&dest, g_lpddsSecond, &src, DDBLT_WAIT, NULL);
|
|
|
|
|
Does anyone know how to implement "Right Click-->Copy to Clipboard-->Ctrl-V" with CListCtrl control.
I would like the functionality of copying the contents of a CListCtrl into Word editor.
Thanks,
cy163
-- modified at 18:27 Saturday 25th November, 2006
|
|
|
|
|
See Clipboard: Copying and Pasting Data on MSDN...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Do you want to copy the entire contents of the CListCtrl into the clipboard or the item on which the user is clicking? In either case, if you have a Control variable of the CListCtrl, then you could get the contents. Then just copy that into memory by using SetClipboardData() function.
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
Thank you for your hints. However, I am new to MFC. Would you please to be more specific.
(1) How to bring up a pop=up menu by right-clicking over a CListCtrl control.
(2) How to get the contents.
Thanks in advance
|
|
|
|
|
I have been searching for the answer to the captioned question for a long time.
anyone can help.
|
|
|
|