スマホに親しんだ若者がWindows 10で現代的な C++/Win32 のプログラムを作る場合に役立てばいいなと思って作りました。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>My first three.js app</title> | |
<style> | |
body { margin: 0; } | |
canvas { display: block; } | |
</style> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>My first three.js app</title> | |
<style> | |
body { margin: 0; } | |
canvas { display: block; } | |
</style> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#include <string> | |
#include <strsafe.h> | |
std::wstring DoGetOSInfo(void) | |
{ | |
HKEY hKey = NULL; | |
WCHAR szText[32]; | |
DWORD dwValue, cbData; | |
std::wstring ret; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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; |
NewerOlder