View
262
Download
12
Category
Preview:
Citation preview
Hanbit eBook
Realtime 88
C++
WIN32 100
C++
WIN32 100
C++ WIN32 100
2014 12 30
/
() / 7 83 () IT
02-325-5544 / 02-336-7124
1999 6 24 10-1779
ISBN 978-89-6848-727-9 15000 / 15,000
/ /
, [],
, , /
() .
www.hanbit.co.kr / ask@hanbit.co.kr
Published by HANBIT Media, Inc. Printed in Korea
Copyright 2014 & HANBIT Media, Inc.
() .
.
.
(ebookwriter@hanbit.co.kr) .
() .
_
2006 ,
. C++ ,
C++
. ,
.
. , 2 ,
4 Sierra .
.
.
C
,
. .
, C# Nuget
.
, C++
.
, .
Visual Studio C++ Nuget
, Visual
Studio . WIN32
C++
.
WIN32
. WIN32
WIN32
. WIN32
. CMake premake WIN32
, WIN32
. WIN32
, WIN32
. , ,
.
WIN32 Visual Studio 2013 C++
.
. Visual Studio 2013 ,
.
WIN32 Visual Studio
.
.
.
.
.
.
.
.
?
JSP
. ,
.
WIN32 C++
. C++
.
WIN32
,
.
.
.
,
.
32
. , 64 .
Visual Studio . ,
.
. Visual
Studio , MTMulti-
thread MDMuilti-thread DLL .
.
MT , MD
.
.
.
Visual Studio
. .
.
.
. ,
.
. WIN32
,
WIN32
.
.
. , WIN32
,
WIN32 .
.
100
.
.
.
eBook
eBook IT eBook.
IT .
.
.
?
?
. .
.
, .
1. eBook Only - IT .
500 () ,
100 .
,
, ,
.
O'Reilly .
2. .
.
.
()
.
3. DRM-Free .
IT DRM-Free PDF
.
.
4. .
,
.
,
.
.
.
.
.
.
, , .
, .
,
.
1
P A R T 1 13
1. 14
2. 29
3. XML 55
4. 70
5. 75
6. 94
P A R T 2 97
1. RPC 98
2. 116
3. 122
4. 132
5. 152
P A R T 3 167
1. 168
2. 3D 176
3. 2D 188
4. GUI 200
5. 210
6. 218
7. 232
P A R T 4 237
1. 238
2. 247
3. 261
P A R T 4 268
1. 269
2. 273
P A R T 5 281
1. 282
2. 289
3. 295
P A R T 6 309
1. 310
2. 315
3. 321
338
1
.
, .
.
.
Visual Studio 2013
Visual Studio
2013 . Visual Studio 2013 Express
.
http://www.visualstudio.com/downloads/download-visual-studio-vs
DVD
. wdexpress_full.exe
.
Visual Studio 2013 Community
, Visual Studio
. Express ,
Community IDE Community
.
http://www.visualstudio.com/downloads/download-visual-studio-vs
2
CMake GUI
CMake Cross Platform Make ,
Make . CMake Visual Studio
. Meta
Make . Make
. , CMake GUI
. CMake .
3.0.2, .
http://www.cmake.org/download/
CMake
. CMake zlib
.01
TortoiseSVN
TortoiseSVN . SVN
TortoiseSVN . 32 64 ,
. .
http://tortoisesvn.net/downloads.html
01 CMake CMake
zlib .
http://www.cmake.org/download/http://tortoisesvn.net/downloads.html
3
Python 2.7
. .
2.x 3.x , .
. 2.x 2.7.8, 3.x
3.4.2.
https://www.python.org/downloads/
2.7.8
. C:\Python27
. Windows 7 .
.
http://tortoisesvn.net/downloads.html
4
Path Python
(C:\Python27\;C:\Python27\Scripts).
Path . Path
.
.
+ R , CMD
. python --version
( 2.7.5).
.
02 Version
1.55.0 .03
Other DownLoads Windows binaries .
02http://www.boost.org/
03 . 1.55.0.
,
.
http://www.boost.org/http://www.boost.org/
5
boost_1_55_0_msvc-12.0-64.exe boost_1_55_0_msvc-12.0-32.exe
.
DirectX SDK 2010
04 Download
( DirectX SDK 2010 6 ). DirectX SDK 32 64
.
DirectX SDK
.
.
04http://www.microsoft.com/en-us/download/details.aspx?id=6812
http://www.microsoft.com/en-us/download/details.aspx%3Fid%3D6812
6
Microsoft.Cpp.Win32.user
.
Microsoft.Cpp.Win32.user
VC++ DirectX
( ). 64
.
7
VC++
DirectX . 64 64
.
DirectX,
.
8
.
VS2013 x64
nmake
. 64 VS2013 x64
. Visual Studio 2013 Visual
Studio Tools .
NASM
NASM Netwide Assembler ,
2.11.05.
.
http://www.nasm.us/pub/nasm/releasebuilds/2.11.05/win32/
nasm-2.11.05-win32.zip C:\nasm .
PATH
.
ActivePerl
ActiverPerl Perl ,
. 5.18.2.18.
http://www.activestate.com/activeperl
32/64 .
http://www.nasm.us/pub/nasm/releasebuilds/2.11.05/win32/http://www.activestate.com/activeperl
9
ActivePerl .
ActivePerl
NASM ActivePerl
. C:\Nasm, C:\Perl
Path . ActivePerl
, NASM
.
NASM ActivePerl
10
git
git .
http://git-scm.com/download/win
.
32 /
64 . 64
32 . 64
.
.
prebuilt
. ,
zlib prebuilt .
prebuilt\zlib\include:
prebuilt\zlib\lib\x86\debug: 32
prebuilt\zlib\lib\x86\release: 32
.
prebuilt\zlib\lib\x86
http://git-scm.com/download/win
11
D:
E:, D:\Library E:\Library .
prebuilt .
.
,
.
.
. ,
.
,
. ,
.
.
https://github.com/pdpdds/Win32OpenSourceSample
prebuilt .
https://github.com/pdpdds/Win32OpenSourceSample
12
,
.
https://drive.google.com/folderview?id=0B4zZS0o3dor0UW44N0tBRFlo
M0U&usp=sharing
prebuilt.rar . D:\Dev\Win32Open
SourceSample D:\Dev\
Prebuilt .
. 32
. ,
(Debug.rar). Win32OpenSourceSample\Debug
.
https://github.com/pdpdds/Win32OpenSourceSamplehttps://github.com/pdpdds/Win32OpenSourceSample
13PART 1
PA
RT
1
1.
2.
3. XML
4.
5.
6.
PART 1
14PART 1
PA
RT
1
1 |
PDF .
.
libHaru
PoDoFo
xlsLib
libxls
audio_ostream
15PART 1
PA
RT
1
libHaru
PDF , PDF
PDF .
http://libharu.org/
2.3.ORC1
CMake , .
zlib libHaru.sln libhpdf libhpdfs
C/C++ zlib
. libhpdf
zlib
zlibd.lib .
, C2373
. .
http://msdn.microsoft.com/ko-kr/library/k6z2ykx4(v=vs.90).aspx
hpdf_image_ccitt.c HPDF_Image_LoadRaw1 BitImage
FromMem .
#ifdef HPDF_DLL_MAKE
HPDF_Image __stdcall
#else
HPDF_Image
#endif
http://libharu.org/http://msdn.microsoft.com/ko-kr/library/k6z2ykx4%28v%3Dvs.90%29.aspx
16PART 1
PA
RT
1
. \build\
src\Debug\Window . .
libHaru . libharuEx
libHaru . libHaru
zlib DLL zlibd.dll
, HPDF_DLL .
PDF .
[PDF ]
int main(int argc, char **argv)
{
//PDF.
pdf = HPDF_New(error_handler, NULL);
if (!pdf) {
printf(error: cannot create PdfDoc object\n);
return 1;
}
if (setjmp(env)) {
HPDF_Free(pdf);
return 1;
}
//.
page = HPDF_AddPage(pdf);
//.
17PART 1
PA
RT
1
height = HPDF_Page_GetHeight(page);
width = HPDF_Page_GetWidth(page);
//.
HPDF_Page_SetLineWidth(page, 1);
//.
HPDF_Page_Rectangle(page, 50, 50, width - 100, height - 110);
HPDF_Page_Stroke(page);
//.24.
def_font = HPDF_GetFont(pdf, Helvetica, NULL);
HPDF_Page_SetFontAndSize(page,def_font,24);
//.
tw = HPDF_Page_TextWidth(page, page_title);
HPDF_Page_BeginText(page);
HPDF_Page_TextOut(page,(width-tw)/2,height-50,page_title);
HPDF_Page_EndText(page);
HPDF_Page_BeginText(page);
HPDF_Page_SetFontAndSize(page, def_font, 16);
HPDF_Page_TextOut(page, 60, height - 80, );
HPDF_Page_EndText(page);
HPDF_Page_BeginText(page);
HPDF_Page_MoveTextPos(page, 60, height - 105);
//.
i = 0;
while (font_list[i]) {
18PART 1
PA
RT
1
constchar*samp_text=abcdefgABCDEFG12345!#$%&+-@?;
HPDF_Font font = HPDF_GetFont(pdf, font_list[i], NULL);
/* print a label of text */
HPDF_Page_SetFontAndSize(page, def_font, 9);
HPDF_Page_ShowText(page, font_list[i]);
HPDF_Page_MoveTextPos(page, 0, -18);
/*printasampletext.*/
HPDF_Page_SetFontAndSize(page,font,20);
HPDF_Page_ShowText(page, samp_text);
HPDF_Page_MoveTextPos(page,0,-20);
i++;
}
HPDF_Page_EndText(page);
//PDF.
HPDF_SaveToFile(pdf, fname);
/* clean up */
HPDF_Free(pdf);
return 0;
}
19PART 1
PA
RT
1
libHaru demo
. libHaru
.
20PART 1
PA
RT
1
PoDoFo
PoDoFo Portable Document Format , PDF
. C++ ,
OS X .
http://podofo.sourceforge.net/download.html
0.9.3
PoDoFo
PoDoFo ,
libjpeg zlib. CMake , GUI
.
PoDoFo build.cmd
( E:\Library\prebuilt ).
delcmakecache.txt
set FTDIR=E:\Library\prebuilt\freetype
set FTLIBDIR=E:\Library\prebuilt\freetype\lib\x86
set JPEGDIR= E:\Library\jpeg-9a
setZLIBDIR=E:\Library\zlib-1.2.8
setPNG_LIBRARY=D:\Library\lpng1613\build\Release
depends on PoDoFo-Base
libpng fontconfig FreeType 2 libjpeg zliblibtiff
PoDoFo-Doc
http://podofo.sourceforge.net/download.html
21PART 1
PA
RT
1
cmake-GVisualStudio12./
-DCMAKE_INCLUDE_PATH=%FTDIR%\include;%PTHREADDIR%;%JPEGDIR%;%JPEGDIR%;%ZLIB
DIR%
-DCMAKE_LIBRARY_PATH=%FTLIBDIR%;%FTDIR%\lib;%JPEGDIR%\Release;%JPEGDIR%;%PN
G_LIBRARY%;%ZLIBDIR%\build\Release-DPODOFO_BUILD_SHARED:BOOL=FALSE-DFREET
YPE_LIBRARY_NAMES_DEBUG=freetype253_D
-DFREETYPE_LIBRARY_NAMES_RELEASE=freetype253
build.cmd
. FreeType, libjpeg, zlib, libpng
, Visual Studio 2013
Visual Studio 12 . Podofo.sln
, .
aaa .
.
podofoimg2pdf .
[ pdf ]
int main( int argc, char* argv[] )
{
char* pszOutput;
//
//output.pdf-useimgsizesnap071.jpg
if(argc lines;
ifstream input;
input.open(test.tsv);
if (!input) {
http://sourceforge.net/projects/xlslib/
24PART 1
PA
RT
1
cout
25PART 1
PA
RT
1
libxls
-
libxls . ,
.
http://libxls.sourceforge.net/
0.2.0
.
libxlsEx test.xls .
int main(int argc, char *argv[])
{
//
xlsWorkBook* pWB;
//
xlsWorkSheet* pWS;
//
st_row_data* row;
WORD t, tt;
//.
pWB=xls_open(test.xls,UTF-8);
if (pWB != NULL)
{
//.
for(inti=0;i
26PART 1
PA
RT
1
{
printf(Sheet[%i](%s)pos=%i\n,i,pWBsheets.sheet[i].name,
pWBsheets.sheet[i].filepos);
//
//.
pWS = xls_getWorkSheet(pWB, i);
xls_parseWorkSheet(pWS);
//.
printf(Countofrows:%i\n,pWSrows.lastrow+1);
printf(Maxcol:%i\n,pWSrows.lastcol);
//.
for(t=0;t
27PART 1
PA
RT
1
audio_ostream(A Text-to-Speech ostream)
-
audio_ostream .
http://www.codeproject.com/Articles/17897/audio-ostream-A-Text-to-
Speech-ostream
-
Speech SDK01 .
. Speech SDK
STLSoft C++ 02 .
.
library_discriminator.hpp , Visual Studio 2013
. .
#elif_CPPLIB_VER
28PART 1
PA
RT
1
TextToSpeechEx .
Hello World .
[Hello World ]
int _tmain(int argc, _TCHAR* argv[])
{
audio_ostream aout;
aout
Recommended