petzold-pw5e-zig

所属分类:collect
开发工具:Zig
文件大小:0KB
下载次数:0
上传日期:2022-11-04 16:32:59
上 传 者sh-1993
说明:  查尔斯·佩佐德(Charles Petzold)的《编程窗口》(Programming Windows)第5版的Zig音译,
(Zig transliteration of Charles Petzold s Programming Windows 5th Edition,)

文件列表:
Chapter 01 Getting Started/ (0, 2022-11-04)
Chapter 01 Getting Started/01-HelloMsg/ (0, 2022-11-04)
Chapter 01 Getting Started/01-HelloMsg/HelloMsg.zig (1090, 2022-11-04)
Chapter 01 Getting Started/01-HelloMsg/build.zig (1120, 2022-11-04)
Chapter 02 An Introduction to Unicode/ (0, 2022-11-04)
Chapter 02 An Introduction to Unicode/02-ScrnSize/ (0, 2022-11-04)
Chapter 02 An Introduction to Unicode/02-ScrnSize/ScrnSize.zig (1865, 2022-11-04)
Chapter 02 An Introduction to Unicode/02-ScrnSize/build.zig (1120, 2022-11-04)
Chapter 03 Windows and Messages/ (0, 2022-11-04)
Chapter 03 Windows and Messages/03-HelloWin/ (0, 2022-11-04)
Chapter 03 Windows and Messages/03-HelloWin/HelloWin.wav (60340, 2022-11-04)
Chapter 03 Windows and Messages/03-HelloWin/HelloWin.zig (6091, 2022-11-04)
Chapter 03 Windows and Messages/03-HelloWin/build.zig (1692, 2022-11-04)
Chapter 04 An Exercise in Text Output/ (0, 2022-11-04)
Chapter 04 An Exercise in Text Output/04-SysMets1/ (0, 2022-11-04)
Chapter 04 An Exercise in Text Output/04-SysMets1/SysMets.zig (9055, 2022-11-04)
Chapter 04 An Exercise in Text Output/04-SysMets1/SysMets1.zig (7433, 2022-11-04)
Chapter 04 An Exercise in Text Output/04-SysMets1/build.zig (1359, 2022-11-04)
Chapter 04 An Exercise in Text Output/05-SysMets2/ (0, 2022-11-04)
Chapter 04 An Exercise in Text Output/05-SysMets2/SysMets2.zig (9738, 2022-11-04)
Chapter 04 An Exercise in Text Output/05-SysMets2/build.zig (1960, 2022-11-04)
Chapter 04 An Exercise in Text Output/06-SysMets3/ (0, 2022-11-04)
Chapter 04 An Exercise in Text Output/06-SysMets3/SysMets3.zig (14449, 2022-11-04)
Chapter 04 An Exercise in Text Output/06-SysMets3/build.zig (1960, 2022-11-04)
Chapter 05 Basic Drawing/ (0, 2022-11-04)
Chapter 05 Basic Drawing/07-DevCaps/ (0, 2022-11-04)
Chapter 05 Basic Drawing/07-DevCaps/DevCaps1.zig (10462, 2022-11-04)
Chapter 05 Basic Drawing/07-DevCaps/build.zig (1481, 2022-11-04)
Chapter 05 Basic Drawing/08-SineWave/ (0, 2022-11-04)
Chapter 05 Basic Drawing/08-SineWave/SineWave.zig (6382, 2022-11-04)
Chapter 05 Basic Drawing/08-SineWave/build.zig (1481, 2022-11-04)
Chapter 05 Basic Drawing/09-LineDemo/ (0, 2022-11-04)
Chapter 05 Basic Drawing/09-LineDemo/LineDemo.zig (6683, 2022-11-04)
Chapter 05 Basic Drawing/09-LineDemo/build.zig (1481, 2022-11-04)
Chapter 05 Basic Drawing/10-Bezier/ (0, 2022-11-04)
Chapter 05 Basic Drawing/10-Bezier/Bezier.zig (7567, 2022-11-04)
Chapter 05 Basic Drawing/10-Bezier/build.zig (1477, 2022-11-04)
Chapter 05 Basic Drawing/11-AltWind/ (0, 2022-11-04)
... ...

# petzold-pw5e-zig [Zig](https://ziglang.org/) transliteration of Charles Petzold's excellent book Programming Windows 5th Edition ISBN-10 157231995X --- Not much content yet. The Zig (beta) release is at 0.10.0 at the time of writing. The code works with Zig 0.9.1 - it requires tweaking to work with 0.10.0 and that won't happen until after [zigwin32](https://github.com/marlersoft/zigwin32) has been updated to work with Zig 0.10.0 --- Notes ----- - This project uses [zigwin32](https://github.com/marlersoft/zigwin32) to eliminate importing the Windows header files directly. (Which is good as `@cImport()` has issues parsing the complexities of said Windows header files.) - Unlike C/C++ there is no `WIN32_LEAN_AND_MEAN` to reduce the #include C header file burden. Zig is quick enough. - https://github.com/marlersoft/zigwin32gen/issues/9 causes occasional memory align panics with CreateWindowExW and other functions. To fix `align(1)` needs to be added to the offending parameter in the zigwin32 declarations. - `CreateWindowExW()`, `CreateWindowExA()` - 2nd (*lpClassName*) parameter - `LoadImageW()`, `LoadImageA()` - 2nd (*name*) parameter - `TextOutW()`, `TextOutA()` the `lpString` parameter does not need to be zero terminated. - `IDC_ARROW` is present in zigwin32, but `IDC_WAIT` and others have been skipped. Probably to avoid the `align(1)` issues. - `LoadIcon` & `LoadCursor` functions have been superseded by the `LoadImage` function. - `GetWindowLongPtr`/`GetWindowLongPtr` functions are correctly mapped to `GetWindowLong`/`SetWindowLong` for 32 bit systems. No need to panic. - There is no replacement for the `CreateWindow` macro in *WinUser.h* that maps to `CreateWindowEx` - missing `StringCchCopy` and its ilk from *strsafe.h*

近期下载者

相关文件


收藏者