Skip to content

Instantly share code, notes, and snippets.

View katahiromz's full-sized avatar
🐜

Katayama Hirofumi MZ katahiromz

🐜
View GitHub Profile
@katahiromz
katahiromz / 2k-imm32-candinfo.cpp
Created February 10, 2023 04:16
2k-imm32-candinfo.cpp
// 2k-imm32-candinfo.cpp
C_ASSERT(sizeof(CANDIDATELIST) == 28);
#define ROUNDUP4(n) (((n) + 3) & ~3) /* DWORD alignment */
#define CLIENTIMC_WIDE 0x1
/* dwType for NtUserQueryInputContext */
typedef enum _QUERY_INPUT_CONTEXT
{
@katahiromz
katahiromz / gss_generator.py
Created July 28, 2020 21:59 — forked from jakalada/gss_generator.py
GSS(一般化螺旋集合) Generator
#!/usr/bin/env python
# coding: utf-8
'''参考文献に記載されているDelphiのコードの移植版
Notes
-----
参考文献: 多数の点を球面上に一様分布させるソフトウェアGSS Generator
https://www.jstage.jst.go.jp/article/geoinformatics/12/1/12_1_3/_article/-char/ja/
@katahiromz
katahiromz / threejstest2.html
Created July 19, 2020 04:54
threejstest2.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>My first three.js app</title>
<style>
body { margin: 0; }
canvas { display: block; }
</style>
</head>
@katahiromz
katahiromz / threejstest.html
Created July 17, 2020 12:16
threejstest.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>My first three.js app</title>
<style>
body { margin: 0; }
canvas { display: block; }
</style>
</head>
@katahiromz
katahiromz / C++_Win32 プログラミング(2020年版).md
Last active November 28, 2021 11:44
C++_Win32 プログラミング(2020年版).md

C++/Win32 プログラミング(2020年版)(未完成)

片山博文MZ(かたやまひろふみエムゼッド)

はじめに

この文書について

スマホに親しんだ若者がWindows 10で現代的な C++/Win32 のプログラムを作る場合に役立てばいいなと思って作りました。

@katahiromz
katahiromz / DoAspectAdapt.cpp
Last active November 4, 2019 17:03
DoAspectAdapt.cpp
enum ASPECT_MODE
{
ASPECT_MODE_IGNORE,
ASPECT_MODE_FIT,
ASPECT_MODE_TRIM
};
BOOL DoAspectAdapt(ASPECT_MODE mode, const SIZE *psizSrc,
const RECT *prcScreen, RECT *prcFrame)
{
@katahiromz
katahiromz / 3-clause-BSD-license.txt
Created October 19, 2019 05:28
the 3-clause BSD license
Copyright (c) 2019, Katayama Hirofumi MZ
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of Win Vector LLC nor the
@katahiromz
katahiromz / 15_548.cpp
Created September 23, 2019 03:04
15_548.cpp
#include <windows.h>
#include <shlobj.h>
#include <shlwapi.h>
#include <stdio.h>
#include <vector>
#pragma comment(lib, "shlwapi.lib")
std::vector<FILETIME> filetimes;
void DoRecurse(LPCWSTR dir)
{
WCHAR szPath[MAX_PATH];
@katahiromz
katahiromz / DoGetOSInfo.cpp
Created September 12, 2019 10:25
DoGetOSInfo.cpp
#include <windows.h>
#include <string>
#include <strsafe.h>
std::wstring DoGetOSInfo(void)
{
HKEY hKey = NULL;
WCHAR szText[32];
DWORD dwValue, cbData;
std::wstring ret;
@katahiromz
katahiromz / GetPathOfShortcut.cpp
Created August 15, 2019 09:39
GetPathOfShortcut
#include <windows.h>
#include <shlobj.h>
BOOL GetPathOfShortcut(HWND hWnd, LPCTSTR pszLnkFile, LPTSTR pszPath)
{
TCHAR szPath[MAX_PATH];
#ifndef UNICODE
WCHAR wsz[MAX_PATH];
#endif
IShellLink* pShellLink;