2017-02-01から1ヶ月間の記事一覧

マウスで円を描くコード

「猫でもわかるWindowsプログラミング」より ↓こんな感じ。 #include <windows.h> LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); ATOM InitApp(HINSTANCE); BOOL InitInstance(HINSTANCE, int); void DrawRect(HWND, POINTS, POINTS); TCHAR szClassName[] = </windows.h>…

Use of Macro Definitions to Simplify MD Code

MD

C supports the use of macro definitions that can simplify the code considerably. #define Sqr(x) ((x)*(x)) #define Cube(x) ((x)*(x)*(x)) #define VSub(v1, v2, v3) (v1).x = (v2).x - (v3).x, (v1).y = (v2).y - (v3).y The above definition will s…

Win 32 API使ってみた。

一番簡単なやつを使ってみた。 #include "windows.h" void main(){ MessageBox(NULL,"Hello!","My First WinAPI",MB_YESNO); }

Wait Until Next ms Multiple vs Wait (ms)

"Wait Until Next ms Multiple"と"Wait (ms)"の違いについての説明は以下。 日本語版 "Wait (ms)"と "Wait Until Next ms Multiple"の違いはなんですか? - National Instruments 英語版 The Difference Between the Wait (ms) Function and the Wait Until N…

はてな始めました。

技術ブログとして始めましたが、趣味や思いついた事も書いて行きます。