「atom」を含む日記 RSS

はてなキーワード: atomとは

2020-01-22

初心者向け、仮想通貨投資の始め方

ヨーロピアン氏のエントリホッテントリ入りしていた。

氏は界隈の中では珍しく金持ちの犬良心のある人物なのだが、ブコメでは「仮想通貨投資は怪しい。投機家滅すべし」という風潮が強かった。

ので、しょうもないトレードを細々と続けているド底辺の俺目線から補足を書いておく。

対象のひと

市場全体の状況

怪しいの?

  • 数年前ならともかく、今「怪しい」などと言うやつは流石に恥ずかしいぞ。
  • FacebookのLibraが、逆説的にビットコイン正統性を高める結果となった。

儲かるの?

から始めれば良い?

国内取引所アカウントを作る。
海外取引所アカウントを作る。

からず集。

トレンドに逆らう。
一気に買う。
  • やめとけ。ビットコインはたまに暴落・暴騰を起こすので、特定の時期に一気に買うのではなく、時間を置いて何度か買うのが良い。
アルトコインを買う。

買うべきもの、時期

ビットコインドルコスト平均法で買う。
  • 一番安牌。例えば、投資総額を120万として、月に1回10万ずつ投下する。この方法だと、2018年の暴落市場でも現状利益が出ているので一番安全
イーサリアムドルコスト平均法で買う。
  • 悪くない選択肢。現状メチャメチャ値が下がっているが、正直なところ覇権はほぼ確定。
投資商品を買う。

https://help.ftx.com/hc/en-us/articles/360027668812-Index-Calculation

今後の相場観。

  • 正直わからん。が、敢えて予想すると…
  • 「5月半減期までかなり上昇するが、一回暴落する。長い横移動のあと、年末来年に向けて上昇再開」を想定している。

買った通貨ウォレットに移動させるべき?

これを書いた筆者は何を買っている?

以上。

それでは、楽しい仮想通貨ライフを。

2020-01-15

最小限の機能を備えた小型スマホがほしい

Slack から端末が古いと警告が出ていると会社インフラ部門の人に言われたので買い替えを考えている。

条件としては以下を満たしていればそれでいいと思っている。

今までに見たの

2019-10-31

かっこいいしAtomちょっと触ってたけどこれいちいちめんどくせえわ

俺はmiに戻る

2019-10-17

Macユーザーで長年miを使ってきてたんだけど、現行バージョンがどうしても気に入らなくて別のエディタにしようと思う

色々ググってみてatomBracketsの二択かなというところまで来たんだけど一番ユーザーが多いエディタってどれなんだろう、教えてちょんまげ

2019-07-16

会社書類マークダウンで書いてたら怒られた話(詳細)

https://anond.hatelabo.jp/20190716162658

”■会社書類マークダウンで書いてたら怒られた話

昼一に書類マークダウンで書いてるのがバレて、さっきまで別室でウルトラ怒られてた。

もう4時半じゃん。ふざけんな。

なんか色々言われたけど、怒られた理由最後まで分からなかった。

午後がほぼ丸々つぶれたことに驚いて、とりあえず喫煙所概要だけ書いた。

仕事がぜんぜん終わってないから、家帰ってから詳細を書く。



IT企業管理部、新卒入社6年目

そもそもなんでマークダウン形式書類を作ってたかというと

・全ての書類Excel作成するから、長文だと行ごとに改行したり均等割り付けしたりが面倒だった

・提出はPDF

別にExcelでの様式は慣習的に使われてるだけで、文書規定されているわけではなかった

パソコンスペックカスで、Excelを開きながらだとメール返すのも一苦労

この辺りの理由atomマークダウン形式で書いて、pdfエクスポートするようしていた。

形式も似せてたから、それこそ5年近くバレてこなかったけど、今日たまたま上司部長)がデスクの後ろを通った時に画面を覗き込まれてバレた。

そして別室に呼ばれて説教タイム開始(約一年ぶり3回目)

だいたい半年に一回くらいのペースで部署内の誰かがイチャもんつけられて説教される、見せしめみたいな儀式から

まぁあんまり気にしてなかったけど、なんかこの儀式を定期的にやるのもしんどいし、もう新卒って感じでもないので自分の言い分は主張してみた。

上記理由を述べて、(主にスペック的に)仕事に支障が出ているので、その対策として行なっていた。(2年目くらいの頃、スペックについては相談したけど全く聞き入れて貰えなかった)

実際、Excel作成するの時間の半分くらいの時間作成してきた。

マークダウンではないにしろ、せめてWordを使おう。

ここまで言ったあたりで部長ヒートアップ

結果、はちゃめちゃに長くなった。

部長言葉を要約すると、みんな苦労してExcelて書いている。

お前はワケのわからない事をして楽をしている、みたいな、手書きの方が気持ちがこもってる系の理屈だったと思う。

風通しの悪い会社だとは思っていたけど、ここまで息苦しいとは思わなかった。

まぁ、これ以上なんかあったら転職するつもりです。

書いたらスッキリした。

追記

スペックはi3 の真ん中くらいのベンチマークのやつで、

メモリは2GBです。

2019-05-27

4コアATOM10個並べるのと8コア16スレRyzen1個並べるの

どっちが高効率

2019-05-22

anond:20190522152721

Atomタブレット「最新のCPUの筈なのに性能はiPadどころかその辺のスマホ以下ですが何か?」

2019-02-22

anond:20190222163151

ワイは旧型ドスパラスティック(Atom Z8550)でデジタルサイネージごっこしてたけど

別に熱で落ちるようなことは無かったで。(chromeブラウザを表示させっぱなしにしてた)

Atom Zシリーズは意外とGPU性能高いんやで。

2019-01-15

anond:20190115183204

サーバーに保存されるってウェブサービスだよねえ

DropboxPaperとかEvernoteの類いになるのかな?

私はAtomとGoogleBackup&Syncの組み合わせでテキスト書いてる

メモ類はGoogleKeep

anond:20190115033033

魂活自体子供を産む道具をとATOMを求めてるんだろ

2019-01-03

anond:20190103184241

// WindowsProject7.cpp: アプリケーションエントリ ポイント定義します。
//

#include "stdafx.h"
#include "WindowsProject7.h"

#define MAX_LOADSTRING 100

// グローバル変数:
HINSTANCE hInst;                                // 現在インターフェイス
WCHAR szTitle[MAX_LOADSTRING];                  // タイトル バーテキスト
WCHAR szWindowClass[MAX_LOADSTRING];            // メイン ウィンドウ クラス名

// このコード モジュールに含まれ関数宣言転送します:
//ATOM                MyRegisterClass(HINSTANCE hInstance);
BOOL                InitInstance(HINSTANCE, int);
LRESULT CALLBACK    WndProc(HWND, UINT, WPARAM, LPARAM);
INT_PTR CALLBACK    About(HWND, UINT, WPARAM, LPARAM);

#include <list>

class MyWindow;
	
std::list< MyWindow *> windows;

class MyWindow
{
public:

	HWND hWnd;



	MyWindow()
		:hWnd(NULL)
	{
		windows.push_back(this);
	}

	virtual ~MyWindow()
	{
		std::list< MyWindow *>::iterator it;
		for (it = windows.begin(); it != windows.end(); it++)
		{
			if (*it == this)
			{
				windows.erase(it);
				break;
			}
		}
	}

	static MyWindow * find(HWND key)
	{
		std::list< MyWindow *>::iterator it;
		for (it = windows.begin(); it != windows.end(); it++)
		{
			MyWindow *target = *it;

			if (target->hWnd == key)
			{
				return target;
			}

		}

		return NULL;
	}



	//
	//  関数: MyRegisterClass()
	//
	//  目的: ウィンドウ クラス登録します。
	//
	ATOM MyRegisterClass(HINSTANCE hInstance)
	{
		WNDCLASSEXW wcex;

		wcex.cbSize = sizeof(WNDCLASSEX);

		wcex.style = CS_HREDRAW | CS_VREDRAW;
		wcex.lpfnWndProc = WndProc;
		wcex.cbClsExtra = 0;
		wcex.cbWndExtra = 0;
		wcex.hInstance = hInstance;
		wcex.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_WINDOWSPROJECT7));
		wcex.hCursor = LoadCursor(nullptr, IDC_ARROW);
		wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
		wcex.lpszMenuName = MAKEINTRESOURCEW(IDC_WINDOWSPROJECT7);
		wcex.lpszClassName = szWindowClass;
		wcex.hIconSm = LoadIcon(wcex.hInstance, MAKEINTRESOURCE(IDI_SMALL));

		return RegisterClassExW(&wcex);
	}

	//
	//   関数: InitInstance(HINSTANCE, int)
	//
	//   目的: インスタンス ハンドルを保存して、メイン ウィンドウ作成します。
	//
	//   コメント:
	//
	//        この関数で、グローバル変数インスタンス ハンドルを保存し、
	//        メイン プログラム ウィンドウ作成および表示します。
	//

	int blocks[100][100];

	BOOL InitInstance()
	{
		hInst = hInstance; // グローバル変数インスタンス処理を格納します。

		ATOM c = MyRegisterClass(hInstance);
		x = 0;
		y = 0;
		boxType = 0;

		hWnd = CreateWindowW(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW,
			CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, nullptr, nullptr, hInstance, nullptr);

		for(int x = 0 ; x < 100 ; x++)
		{
			for (int y = 0; y < 100; y++)
			{
				blocks[y][x] = 0;
			}
		}

		if (!hWnd)
		{
			return FALSE;
		}

		return TRUE;
	}

	BOOL ShowWindow()
	{
		BOOL ret;
		ret = ::ShowWindow(hWnd, SW_SHOW);
		::UpdateWindow(hWnd);

		return ret;
	}


	HINSTANCE hInstance;
	MSG msg;
	BOOL run;
	int x;
	int y;
	BOOL Main()
	{

		HACCEL hAccelTable = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDC_WINDOWSPROJECT7));
		run = true;
		int rc;
		// メイン メッセージ ループ:
		while (run)
		{
			DWORD obj = MsgWaitForMultipleObjectsEx(0, NULL,  100 , QS_PAINT| QS_ALLEVENTS,0);
			if (obj <= WAIT_OBJECT_0)
			{
				while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
				{
					if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
					{
						TranslateMessage(&msg);
						DispatchMessage(&msg);
					}
					if (msg.message == WM_QUIT) {
						run = FALSE;
					}
					if (msg.message == WM_CLOSE) {
						run = FALSE;
					}

				}
			}
			else if (obj == WAIT_TIMEOUT)
			{
				y++;
				PAINTSTRUCT ps;
				HDC hdc = BeginPaint(hWnd, &ps);
				this->OnPaint(ps);
				EndPaint(hWnd, &ps);
				::UpdateWindow(hWnd);
				RECT Rect2 = { 0,0,48*9,48 * 100 };
				InvalidateRect(hWnd, &Rect2, TRUE);
			}
			else if (obj == WAIT_FAILED)
			{
				rc = GetLastError();
			}
			else {

			}
		}


		return TRUE;

	}

	int boxType;

	BOOL WriteBoxOLDBox()
	{
		int width = 24;

		HDC hdc = GetDC(hWnd);
		HBRUSH hBrush = CreateSolidBrush(RGB(48, 48, 48));
		for (int y = 0; y < 30; y++)
		{
			for (int x = 0; x < 8; x++)
			{
				if (blocks[y][x] == 0)
				{
					continue;
				}

				RECT Rect = { 0,0,48,48 };
				BOOL ret;

				Rect.left = width * x + 1;
				Rect.right = width * (x + 1) - 1;
				Rect.top = width * y + 1;
				Rect.bottom = width * (y + 1) - 1;

				ret = FillRect(hdc, &Rect, hBrush);


			}
		}

		DeleteObject(hBrush);

		return FALSE;
	}


	BOOL WriteBox()
	{
		WriteBoxOLDBox();

		switch (boxType)
		{
		case 0:
			return WriteBoxI();
		case 1:
			return WriteBoxL();
		case 2:
			return WriteBoxZ();

		}

		return TRUE;
	}

	BOOL WriteBoxZ()
	{
		HDC hdc = GetDC(hWnd);
		HBRUSH hBrush = CreateSolidBrush(RGB(48, 48, 246));

		int width = 24;

		RECT Rect = { 0,0,48,48 };
		BOOL ret;

		Rect.left = width * x + 1;
		Rect.right = width * (x + 1) - 1;
		Rect.top = width * y + 1;
		Rect.bottom = width * (y + 1) - 1;

		ret = FillRect(hdc, &Rect, hBrush);


		Rect.top += width;
		Rect.bottom += width;
		ret = FillRect(hdc, &Rect, hBrush);

		Rect.left += width;
		Rect.right += width;
		ret = FillRect(hdc, &Rect, hBrush);

		Rect.top += width;
		Rect.bottom += width;
		ret = FillRect(hdc, &Rect, hBrush);


		DeleteObject(hBrush);

		return TRUE;
	}


	BOOL WriteBoxL()
	{
		HDC hdc = GetDC(hWnd);
		HBRUSH hBrush = CreateSolidBrush(RGB(48, 246 , 48));

		int width = 24;

		RECT Rect = { 0,0,48,48 };
		BOOL ret;

		Rect.left = width * x + 1;
		Rect.right = width * (x + 1) -1 ;
		Rect.top = width * y + 1;
		Rect.bottom = width * (y + 1) -1;

		ret = FillRect(hdc, &Rect, hBrush);


		Rect.top    += width; 
		Rect.bottom += width;
		ret = FillRect(hdc, &Rect, hBrush);

		Rect.top += width;
		Rect.bottom += width;
		ret = FillRect(hdc, &Rect, hBrush);

		Rect.left   += width;
		Rect.right  += width;
		ret = FillRect(hdc, &Rect, hBrush);

		DeleteObject(hBrush);

		return TRUE;
	}

	BOOL WriteBoxI()
	{
		HDC hdc = GetDC(hWnd);
		HBRUSH hBrush = CreateSolidBrush(RGB( 246 , 48 , 48));

		int width = 24;

		RECT Rect = { 0,0,48,48 };
		BOOL ret;

		Rect.left = width * x + 1;
		Rect.right = width * (x + 1) - 1;
		Rect.top = width * y + 1;
		Rect.bottom = width * (y + 1) - 1;

		ret = FillRect(hdc, &Rect, hBrush);


		//Rect.left   += width;
		//Rect.right  += width;
		Rect.top += width;
		Rect.bottom += width;
		ret = FillRect(hdc, &Rect, hBrush);

		Rect.top += width;
		Rect.bottom += width;
		ret = FillRect(hdc, &Rect, hBrush);

		Rect.top += width;
		Rect.bottom += width;
		ret = FillRect(hdc, &Rect, hBrush);

		DeleteObject(hBrush);

		return TRUE;
	}

	BOOL SaveBoxI()
	{
		blocks[y  ][x] = 1;
		blocks[y+1][x] = 1;
		blocks[y+2][x] = 1;
		blocks[y+3][x] = 1;
		return TRUE;
	}


	BOOL OnPaint(PAINTSTRUCT &ps)
	{
		if (x > 8) {
			x = 0;
		}
		if (x <0) {
			x = 8;
		}
		if (y > 20) {
			switch (boxType)
			{
			case 0:
				SaveBoxI();
				break;
			case 1:
				break;
			case 2:
				break;
			}

			y = 0;
			boxType++;
			if (boxType > 2)
			{
				boxType = 0;
			}
		}

		this->WriteBox();

		return TRUE;
	}



	BOOL OnKey(WPARAM wParam)
	{
		if (wParam == VK_LEFT)
		{
			x++;
		}
		if (wParam == VK_RIGHT)
		{
			x--;
		}
		return TRUE;
	}


};


int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
                     _In_opt_ HINSTANCE hPrevInstance,
                     _In_ LPWSTR    lpCmdLine,
                     _In_ int       nCmdShow)
{
    UNREFERENCED_PARAMETER(hPrevInstance);
    UNREFERENCED_PARAMETER(lpCmdLine);

    // TODO: ここにコードを挿入してください。

    // グローバル文字列初期化しています。
    LoadStringW(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
    LoadStringW(hInstance, IDC_WINDOWSPROJECT7, szWindowClass, MAX_LOADSTRING);
    //MyRegisterClass(hInstance);



	MyWindow win;



	win.hInstance = hInstance;

	// アプリケーション初期化を実行します:
	if (!win.InitInstance())
	{
		return FALSE;
	}

	BOOL ret;

	win.ShowWindow();

	ret = win.Main();

	if (ret)
	{
		return 0;
	}else {
		return (int)win.msg.wParam;
	}



}






//
//  関数: WndProc(HWND, UINT, WPARAM, LPARAM)
//
//  目的:    メイン ウィンドウメッセージを処理します。
//
//  WM_COMMAND  - アプリケーション メニューの処理
//  WM_PAINT    - メイン ウィンドウの描画
//  WM_DESTROY  - 中止メッセージを表示して戻る
//
//
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
    switch (message)
    {
    case WM_COMMAND:
        {
            int wmId = LOWORD(wParam);
            // 選択されたメニューの解析:
            switch (wmId)
            {
            case IDM_ABOUT:
                DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, About);
                break;
            case IDM_EXIT:
                DestroyWindow(hWnd);
                break;
            default:
                return DefWindowProc(hWnd, message, wParam, lParam);
            }
        }
		break;
	case WM_KEYDOWN:
		{
			MyWindow *target = MyWindow::find(hWnd);
			target->OnKey(wParam);
		}
	break;
    case WM_PAINT:
        {
            PAINTSTRUCT ps;
            HDC hdc = BeginPaint(hWnd, &ps);

			MyWindow *target = MyWindow::find(hWnd);
			target->OnPaint(ps);


            // TODO: HDC を使用する描画コードをここに追加してください...
            EndPaint(hWnd, &ps);
        }
        break;
    case WM_DESTROY:
        PostQuitMessage(0);
        break;
    default:
        return DefWindowProc(hWnd, message, wParam, lParam);
    }
    return 0;
}

// バージョン情報ボックスメッセージ ハンドラーです。
INT_PTR CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
    UNREFERENCED_PARAMETER(lParam);
    switch (message)
    {
    case WM_INITDIALOG:
        return (INT_PTR)TRUE;

    case WM_COMMAND:
        if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)
        {
            EndDialog(hDlg, LOWORD(wParam));
            return (INT_PTR)TRUE;
        }
        break;
    }
    return (INT_PTR)FALSE;
}

anond:20190103170543

テトリス

落ちてくるブロックの描き方

わかりやす関数化してみた

まずはブロックの種類は3種類

 

WriteBoxLとWriteBoxIとWriteBoxZ

の違いをよく見比べて

自力で違いがわかれば

プログラマーにはなれるとおもう

とはいえ、コレを自力でわかるならもっと儲かる仕事あるとはおもうけどな

 

	BOOL WriteBox()
	{
		switch (boxType)
		{
		case 0:
			return WriteBoxI();
		case 1:
			return WriteBoxL();
		case 2:
			return WriteBoxZ();

		}
	}
// WindowsProject7.cpp: アプリケーションエントリ ポイント定義します。
//

#include "stdafx.h"
#include "WindowsProject7.h"

#define MAX_LOADSTRING 100

// グローバル変数:
HINSTANCE hInst;                                // 現在インターフェイス
WCHAR szTitle[MAX_LOADSTRING];                  // タイトル バーテキスト
WCHAR szWindowClass[MAX_LOADSTRING];            // メイン ウィンドウ クラス名

// このコード モジュールに含まれ関数宣言転送します:
//ATOM                MyRegisterClass(HINSTANCE hInstance);
BOOL                InitInstance(HINSTANCE, int);
LRESULT CALLBACK    WndProc(HWND, UINT, WPARAM, LPARAM);
INT_PTR CALLBACK    About(HWND, UINT, WPARAM, LPARAM);

#include <list>

class MyWindow;
	
std::list< MyWindow *> windows;

class MyWindow
{
public:

	HWND hWnd;



	MyWindow()
		:hWnd(NULL)
	{
		windows.push_back(this);
	}

	virtual ~MyWindow()
	{
		std::list< MyWindow *>::iterator it;
		for (it = windows.begin(); it != windows.end(); it++)
		{
			if (*it == this)
			{
				windows.erase(it);
				break;
			}
		}
	}

	static MyWindow * find(HWND key)
	{
		std::list< MyWindow *>::iterator it;
		for (it = windows.begin(); it != windows.end(); it++)
		{
			MyWindow *target = *it;

			if (target->hWnd == key)
			{
				return target;
			}

		}

		return NULL;
	}



	//
	//  関数: MyRegisterClass()
	//
	//  目的: ウィンドウ クラス登録します。
	//
	ATOM MyRegisterClass(HINSTANCE hInstance)
	{
		WNDCLASSEXW wcex;

		wcex.cbSize = sizeof(WNDCLASSEX);

		wcex.style = CS_HREDRAW | CS_VREDRAW;
		wcex.lpfnWndProc = WndProc;
		wcex.cbClsExtra = 0;
		wcex.cbWndExtra = 0;
		wcex.hInstance = hInstance;
		wcex.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_WINDOWSPROJECT7));
		wcex.hCursor = LoadCursor(nullptr, IDC_ARROW);
		wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
		wcex.lpszMenuName = MAKEINTRESOURCEW(IDC_WINDOWSPROJECT7);
		wcex.lpszClassName = szWindowClass;
		wcex.hIconSm = LoadIcon(wcex.hInstance, MAKEINTRESOURCE(IDI_SMALL));

		return RegisterClassExW(&wcex);
	}

	//
	//   関数: InitInstance(HINSTANCE, int)
	//
	//   目的: インスタンス ハンドルを保存して、メイン ウィンドウ作成します。
	//
	//   コメント:
	//
	//        この関数で、グローバル変数インスタンス ハンドルを保存し、
	//        メイン プログラム ウィンドウ作成および表示します。
	//
	BOOL InitInstance()
	{
		hInst = hInstance; // グローバル変数インスタンス処理を格納します。

		ATOM c = MyRegisterClass(hInstance);
		x = 0;
		y = 0;
		boxType = 0;

		hWnd = CreateWindowW(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW,
			CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, nullptr, nullptr, hInstance, nullptr);

		if (!hWnd)
		{
			return FALSE;
		}

		return TRUE;
	}

	BOOL ShowWindow()
	{
		BOOL ret;
		ret = ::ShowWindow(hWnd, SW_SHOW);
		::UpdateWindow(hWnd);

		return ret;
	}


	HINSTANCE hInstance;
	MSG msg;
	BOOL run;
	int x;
	int y;
	BOOL Main()
	{

		HACCEL hAccelTable = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDC_WINDOWSPROJECT7));
		run = true;
		int rc;
		// メイン メッセージ ループ:
		while (run)
		{
			DWORD obj = MsgWaitForMultipleObjectsEx(0, NULL,  100 , QS_PAINT| QS_ALLEVENTS,0);
			if (obj <= WAIT_OBJECT_0)
			{
				while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
				{
					if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
					{
						TranslateMessage(&msg);
						DispatchMessage(&msg);
					}
					if (msg.message == WM_QUIT) {
						run = FALSE;
					}
					if (msg.message == WM_CLOSE) {
						run = FALSE;
					}

				}
			}
			else if (obj == WAIT_TIMEOUT)
			{
				y++;
				PAINTSTRUCT ps;
				HDC hdc = BeginPaint(hWnd, &ps);
				this->OnPaint(ps);
				EndPaint(hWnd, &ps);
				::UpdateWindow(hWnd);
				RECT Rect2 = { 0,0,48*9,48 * 8 };
				InvalidateRect(hWnd, &Rect2, TRUE);
			}
			else if (obj == WAIT_FAILED)
			{
				rc = GetLastError();
			}
			else {

			}
		}


		return TRUE;

	}

	int boxType;

	BOOL WriteBox()
	{
		switch (boxType)
		{
		case 0:
			return WriteBoxI();
		case 1:
			return WriteBoxL();
		case 2:
			return WriteBoxZ();

		}
	}

	BOOL WriteBoxZ()
	{
		HDC hdc = GetDC(hWnd);
		HBRUSH hBrush = CreateSolidBrush(RGB(48, 48, 246));

		int width = 24;

		RECT Rect = { 0,0,48,48 };
		BOOL ret;

		Rect.left = width * x + 1;
		Rect.right = width * (x + 1) - 1;
		Rect.top = width * y + 1;
		Rect.bottom = width * (y + 1) - 1;

		ret = FillRect(hdc, &Rect, hBrush);


		Rect.top += width;
		Rect.bottom += width;
		ret = FillRect(hdc, &Rect, hBrush);

		Rect.left += width;
		Rect.right += width;
		ret = FillRect(hdc, &Rect, hBrush);

		Rect.top += width;
		Rect.bottom += width;
		ret = FillRect(hdc, &Rect, hBrush);


		DeleteObject(hBrush);

		return TRUE;
	}


	BOOL WriteBoxL()
	{
		HDC hdc = GetDC(hWnd);
		HBRUSH hBrush = CreateSolidBrush(RGB(48, 48, 246));

		int width = 24;

		RECT Rect = { 0,0,48,48 };
		BOOL ret;

		Rect.left = width * x + 1;
		Rect.right = width * (x + 1) -1 ;
		Rect.top = width * y + 1;
		Rect.bottom = width * (y + 1) -1;

		ret = FillRect(hdc, &Rect, hBrush);


		Rect.top    += width; 
		Rect.bottom += width;
		ret = FillRect(hdc, &Rect, hBrush);

		Rect.top += width;
		Rect.bottom += width;
		ret = FillRect(hdc, &Rect, hBrush);

		Rect.left   += width;
		Rect.right  += width;
		ret = FillRect(hdc, &Rect, hBrush);

		DeleteObject(hBrush);

		return TRUE;
	}

	BOOL WriteBoxI()
	{
		HDC hdc = GetDC(hWnd);
		HBRUSH hBrush = CreateSolidBrush(RGB(48, 48, 246));

		int width = 24;

		RECT Rect = { 0,0,48,48 };
		BOOL ret;

		Rect.left = width * x + 1;
		Rect.right = width * (x + 1) - 1;
		Rect.top = width * y + 1;
		Rect.bottom = width * (y + 1) - 1;

		ret = FillRect(hdc, &Rect, hBrush);


		//Rect.left   += width;
		//Rect.right  += width;
		Rect.top += width;
		Rect.bottom += width;
		ret = FillRect(hdc, &Rect, hBrush);

		Rect.top += width;
		Rect.bottom += width;
		ret = FillRect(hdc, &Rect, hBrush);

		Rect.top += width;
		Rect.bottom += width;
		ret = FillRect(hdc, &Rect, hBrush);

		DeleteObject(hBrush);

		return TRUE;
	}


	BOOL OnPaint(PAINTSTRUCT &ps)
	{
		if (x > 8) {
			x = 0;
		}
		if (x <0) {
			x = 8;
		}
		if (y > 8) {
			y = 0;
			boxType++;
			if (boxType > 2)
			{
				boxType = 0;
			}
		}

		this->WriteBox();

		return TRUE;
	}



	BOOL OnKey()
	{
		x++;
		return TRUE;
	}


};


int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
                     _In_opt_ HINSTANCE hPrevInstance,
                     _In_ LPWSTR    lpCmdLine,
                     _In_ int       nCmdShow)
{
    UNREFERENCED_PARAMETER(hPrevInstance);
    UNREFERENCED_PARAMETER(lpCmdLine);

    // TODO: ここにコードを挿入してください。

    // グローバル文字列初期化しています。
    LoadStringW(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
    LoadStringW(hInstance, IDC_WINDOWSPROJECT7, szWindowClass, MAX_LOADSTRING);
    //MyRegisterClass(hInstance);



	MyWindow win;



	win.hInstance = hInstance;

	// アプリケーション初期化を実行します:
	if (!win.InitInstance())
	{
		return FALSE;
	}

	BOOL ret;

	win.ShowWindow();

	ret = win.Main();

	if (ret)
	{
		return 0;
	}else {
		return (int)win.msg.wParam;
	}



}






//
//  関数: WndProc(HWND, UINT, WPARAM, LPARAM)
//
//  目的:    メイン ウィンドウメッセージを処理します。
//
//  WM_COMMAND  - アプリケーション メニューの処理
//  WM_PAINT    - メイン ウィンドウの描画
//  WM_DESTROY  - 中止メッセージを表示して戻る
//
//
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
    switch (message)
    {
    case WM_COMMAND:
        {
            int wmId = LOWORD(wParam);
            // 選択されたメニューの解析:
            switch (wmId)
            {
            case IDM_ABOUT:
                DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, About);
                break;
            case IDM_EXIT:
                DestroyWindow(hWnd);
                break;
            default:
                return DefWindowProc(hWnd, message, wParam, lParam);
            }
        }
		break;
	case WM_KEYDOWN:
		{
			MyWindow *target = MyWindow::find(hWnd);
			target->OnKey();
		}
	break;
    case WM_PAINT:
        {
            PAINTSTRUCT ps;
            HDC hdc = BeginPaint(hWnd, &ps);

			MyWindow *target = MyWindow::find(hWnd);
			target->OnPaint(ps);


            // TODO: HDC を使用する描画コードをここに追加してください...
            EndPaint(hWnd, &ps);
        }
        break;
    case WM_DESTROY:
        PostQuitMessage(0);
        break;
    default:
        return DefWindowProc(hWnd, message, wParam, lParam);
    }
    return 0;
}

// バージョン情報ボックスメッセージ ハンドラーです。
INT_PTR CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
    UNREFERENCED_PARAMETER(lParam);
    switch (message)
    {
    case WM_INITDIALOG:
        return (INT_PTR)TRUE;

    case WM_COMMAND:
        if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)
        {
            EndDialog(hDlg, LOWORD(wParam));
            return (INT_PTR)TRUE;
        }
        break;
    }
    return (INT_PTR)FALSE;
}

anond:20190101175055

テトリス風?プログラムに向けて

第何回だろうな

キー入力を追加した

まだ、何を押してもブロックが右に移動するだけ(右端にいくと左にワープ

タイマー自動落下

 

でもまぁ ここまでサンプルがあるとほぼテトリスは見えてきた

// WindowsProject7.cpp: アプリケーションエントリ ポイント定義します。
//

#include "stdafx.h"
#include "WindowsProject7.h"

#define MAX_LOADSTRING 100

// グローバル変数:
HINSTANCE hInst;                                // 現在インターフェイス
WCHAR szTitle[MAX_LOADSTRING];                  // タイトル バーテキスト
WCHAR szWindowClass[MAX_LOADSTRING];            // メイン ウィンドウ クラス名

// このコード モジュールに含まれ関数宣言転送します:
//ATOM                MyRegisterClass(HINSTANCE hInstance);
BOOL                InitInstance(HINSTANCE, int);
LRESULT CALLBACK    WndProc(HWND, UINT, WPARAM, LPARAM);
INT_PTR CALLBACK    About(HWND, UINT, WPARAM, LPARAM);

#include <list>

class MyWindow;
	
std::list< MyWindow *> windows;

class MyWindow
{
public:

	HWND hWnd;



	MyWindow()
		:hWnd(NULL)
	{
		windows.push_back(this);
	}

	virtual ~MyWindow()
	{
		std::list< MyWindow *>::iterator it;
		for (it = windows.begin(); it != windows.end(); it++)
		{
			if (*it == this)
			{
				windows.erase(it);
				break;
			}
		}
	}

	static MyWindow * find(HWND key)
	{
		std::list< MyWindow *>::iterator it;
		for (it = windows.begin(); it != windows.end(); it++)
		{
			MyWindow *target = *it;

			if (target->hWnd == key)
			{
				return target;
			}

		}

		return NULL;
	}



	//
	//  関数: MyRegisterClass()
	//
	//  目的: ウィンドウ クラス登録します。
	//
	ATOM MyRegisterClass(HINSTANCE hInstance)
	{
		WNDCLASSEXW wcex;

		wcex.cbSize = sizeof(WNDCLASSEX);

		wcex.style = CS_HREDRAW | CS_VREDRAW;
		wcex.lpfnWndProc = WndProc;
		wcex.cbClsExtra = 0;
		wcex.cbWndExtra = 0;
		wcex.hInstance = hInstance;
		wcex.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_WINDOWSPROJECT7));
		wcex.hCursor = LoadCursor(nullptr, IDC_ARROW);
		wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
		wcex.lpszMenuName = MAKEINTRESOURCEW(IDC_WINDOWSPROJECT7);
		wcex.lpszClassName = szWindowClass;
		wcex.hIconSm = LoadIcon(wcex.hInstance, MAKEINTRESOURCE(IDI_SMALL));

		return RegisterClassExW(&wcex);
	}

	//
	//   関数: InitInstance(HINSTANCE, int)
	//
	//   目的: インスタンス ハンドルを保存して、メイン ウィンドウ作成します。
	//
	//   コメント:
	//
	//        この関数で、グローバル変数インスタンス ハンドルを保存し、
	//        メイン プログラム ウィンドウ作成および表示します。
	//
	BOOL InitInstance()
	{
		hInst = hInstance; // グローバル変数インスタンス処理を格納します。

		ATOM c = MyRegisterClass(hInstance);
		x = 0;
		y = 0;

		hWnd = CreateWindowW(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW,
			CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, nullptr, nullptr, hInstance, nullptr);

		if (!hWnd)
		{
			return FALSE;
		}

		return TRUE;
	}

	BOOL ShowWindow()
	{
		BOOL ret;
		ret = ::ShowWindow(hWnd, SW_SHOW);
		::UpdateWindow(hWnd);

		return ret;
	}


	HINSTANCE hInstance;
	MSG msg;
	BOOL run;
	int x;
	int y;
	BOOL Main()
	{

		HACCEL hAccelTable = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDC_WINDOWSPROJECT7));
		run = true;
		int rc;
		// メイン メッセージ ループ:
		while (run)
		{
			DWORD obj = MsgWaitForMultipleObjectsEx(0, NULL,  100 , QS_PAINT| QS_ALLEVENTS,0);
			if (obj <= WAIT_OBJECT_0)
			{
				while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
				{
					if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
					{
						TranslateMessage(&msg);
						DispatchMessage(&msg);
					}
					if (msg.message == WM_QUIT) {
						run = FALSE;
					}
					if (msg.message == WM_CLOSE) {
						run = FALSE;
					}

				}
			}
			else if (obj == WAIT_TIMEOUT)
			{
				y++;
				PAINTSTRUCT ps;
				HDC hdc = BeginPaint(hWnd, &ps);
				this->OnPaint(ps);
				EndPaint(hWnd, &ps);
				::UpdateWindow(hWnd);
				RECT Rect2 = { 0,0,48*9,48 * 8 };
				InvalidateRect(hWnd, &Rect2, TRUE);
			}
			else if (obj == WAIT_FAILED)
			{
				rc = GetLastError();
			}
			else {

			}
		}


		return TRUE;

	}

	BOOL OnPaint(PAINTSTRUCT &ps)
	{
		HDC hdc = GetDC(hWnd);
		HBRUSH hBrush = CreateSolidBrush(RGB(48, 48, 246));
		RECT Rect = { 0,0,48,48 };
		Rect.left = 48 * x;
		Rect.right = 48 * (x+1);
		Rect.top = 48 * y;
		Rect.bottom = 48 * (y+1);
		if (x > 8) {
			x = 0;
		}
		if (x <0) {
			x = 8;
		}
		if (y > 8) {
			y = 0;
		}
		BOOL ret = FillRect(ps.hdc, &Rect, hBrush);
		DeleteObject(hBrush);

		return TRUE;
	}

	BOOL OnKey()
	{
		x++;
		return TRUE;
	}


};


int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
                     _In_opt_ HINSTANCE hPrevInstance,
                     _In_ LPWSTR    lpCmdLine,
                     _In_ int       nCmdShow)
{
    UNREFERENCED_PARAMETER(hPrevInstance);
    UNREFERENCED_PARAMETER(lpCmdLine);

    // TODO: ここにコードを挿入してください。

    // グローバル文字列初期化しています。
    LoadStringW(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
    LoadStringW(hInstance, IDC_WINDOWSPROJECT7, szWindowClass, MAX_LOADSTRING);
    //MyRegisterClass(hInstance);



	MyWindow win;



	win.hInstance = hInstance;

	// アプリケーション初期化を実行します:
	if (!win.InitInstance())
	{
		return FALSE;
	}

	BOOL ret;

	win.ShowWindow();

	ret = win.Main();

	if (ret)
	{
		return 0;
	}else {
		return (int)win.msg.wParam;
	}



}






//
//  関数: WndProc(HWND, UINT, WPARAM, LPARAM)
//
//  目的:    メイン ウィンドウメッセージを処理します。
//
//  WM_COMMAND  - アプリケーション メニューの処理
//  WM_PAINT    - メイン ウィンドウの描画
//  WM_DESTROY  - 中止メッセージを表示して戻る
//
//
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
    switch (message)
    {
    case WM_COMMAND:
        {
            int wmId = LOWORD(wParam);
            // 選択されたメニューの解析:
            switch (wmId)
            {
            case IDM_ABOUT:
                DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, About);
                break;
            case IDM_EXIT:
                DestroyWindow(hWnd);
                break;
            default:
                return DefWindowProc(hWnd, message, wParam, lParam);
            }
        }
		break;
	case WM_KEYDOWN:
		{
			MyWindow *target = MyWindow::find(hWnd);
			target->OnKey();
		}
	break;
    case WM_PAINT:
        {
            PAINTSTRUCT ps;
            HDC hdc = BeginPaint(hWnd, &ps);

			MyWindow *target = MyWindow::find(hWnd);
			target->OnPaint(ps);


            // TODO: HDC を使用する描画コードをここに追加してください...
            EndPaint(hWnd, &ps);
        }
        break;
    case WM_DESTROY:
        PostQuitMessage(0);
        break;
    default:
        return DefWindowProc(hWnd, message, wParam, lParam);
    }
    return 0;
}

// バージョン情報ボックスメッセージ ハンドラーです。
INT_PTR CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
    UNREFERENCED_PARAMETER(lParam);
    switch (message)
    {
    case WM_INITDIALOG:
        return (INT_PTR)TRUE;

    case WM_COMMAND:
        if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)
        {
            EndDialog(hDlg, LOWORD(wParam));
            return (INT_PTR)TRUE;
        }
        break;
    }
    return (INT_PTR)FALSE;
}

2019-01-01

anond:20190101172100

タイマーを使ったアニメーションを付けた

// WindowsProject7.cpp: アプリケーションエントリ ポイント定義します。
//

#include "stdafx.h"
#include "WindowsProject7.h"

#define MAX_LOADSTRING 100

// グローバル変数:
HINSTANCE hInst;                                // 現在インターフェイス
WCHAR szTitle[MAX_LOADSTRING];                  // タイトル バーテキスト
WCHAR szWindowClass[MAX_LOADSTRING];            // メイン ウィンドウ クラス名

// このコード モジュールに含まれ関数宣言転送します:
//ATOM                MyRegisterClass(HINSTANCE hInstance);
BOOL                InitInstance(HINSTANCE, int);
LRESULT CALLBACK    WndProc(HWND, UINT, WPARAM, LPARAM);
INT_PTR CALLBACK    About(HWND, UINT, WPARAM, LPARAM);

#include <list>

class MyWindow;
	
std::list< MyWindow *> windows;

class MyWindow
{
public:

	HWND hWnd;



	MyWindow()
		:hWnd(NULL)
	{
		windows.push_back(this);
	}

	virtual ~MyWindow()
	{
		std::list< MyWindow *>::iterator it;
		for (it = windows.begin(); it != windows.end(); it++)
		{
			if (*it == this)
			{
				windows.erase(it);
				break;
			}
		}
	}

	static MyWindow * find(HWND key)
	{
		std::list< MyWindow *>::iterator it;
		for (it = windows.begin(); it != windows.end(); it++)
		{
			MyWindow *target = *it;

			if (target->hWnd == key)
			{
				return target;
			}

		}

		return NULL;
	}



	//
	//  関数: MyRegisterClass()
	//
	//  目的: ウィンドウ クラス登録します。
	//
	ATOM MyRegisterClass(HINSTANCE hInstance)
	{
		WNDCLASSEXW wcex;

		wcex.cbSize = sizeof(WNDCLASSEX);

		wcex.style = CS_HREDRAW | CS_VREDRAW;
		wcex.lpfnWndProc = WndProc;
		wcex.cbClsExtra = 0;
		wcex.cbWndExtra = 0;
		wcex.hInstance = hInstance;
		wcex.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_WINDOWSPROJECT7));
		wcex.hCursor = LoadCursor(nullptr, IDC_ARROW);
		wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
		wcex.lpszMenuName = MAKEINTRESOURCEW(IDC_WINDOWSPROJECT7);
		wcex.lpszClassName = szWindowClass;
		wcex.hIconSm = LoadIcon(wcex.hInstance, MAKEINTRESOURCE(IDI_SMALL));

		return RegisterClassExW(&wcex);
	}

	//
	//   関数: InitInstance(HINSTANCE, int)
	//
	//   目的: インスタンス ハンドルを保存して、メイン ウィンドウ作成します。
	//
	//   コメント:
	//
	//        この関数で、グローバル変数インスタンス ハンドルを保存し、
	//        メイン プログラム ウィンドウ作成および表示します。
	//
	BOOL InitInstance()
	{
		hInst = hInstance; // グローバル変数インスタンス処理を格納します。

		ATOM c = MyRegisterClass(hInstance);
		y = 0;

		hWnd = CreateWindowW(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW,
			CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, nullptr, nullptr, hInstance, nullptr);

		if (!hWnd)
		{
			return FALSE;
		}

		return TRUE;
	}

	BOOL ShowWindow()
	{
		BOOL ret;
		ret = ::ShowWindow(hWnd, SW_SHOW);
		::UpdateWindow(hWnd);

		return ret;
	}


	HINSTANCE hInstance;
	MSG msg;
	BOOL run;
	int y;
	BOOL Main()
	{

		HACCEL hAccelTable = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDC_WINDOWSPROJECT7));
		run = true;
		int rc;
		// メイン メッセージ ループ:
		while (run)
		{
			DWORD obj = MsgWaitForMultipleObjectsEx(0, NULL,  100 , QS_PAINT| QS_ALLEVENTS,0);
			if (obj <= WAIT_OBJECT_0)
			{
				while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
				{
					if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
					{
						TranslateMessage(&msg);
						DispatchMessage(&msg);
					}
					if (msg.message == WM_QUIT) {
						run = FALSE;
					}
					if (msg.message == WM_CLOSE) {
						run = FALSE;
					}

				}
			}
			else if (obj == WAIT_TIMEOUT)
			{
				y++;
				PAINTSTRUCT ps;
				HDC hdc = BeginPaint(hWnd, &ps);
				this->OnPaint(ps);
				EndPaint(hWnd, &ps);
				::UpdateWindow(hWnd);
				RECT Rect2 = { 0,0,48,48 * 8 };
				InvalidateRect(hWnd, &Rect2, TRUE);
			}
			else if (obj == WAIT_FAILED)
			{
				rc = GetLastError();
			}
			else {

			}
		}


		return TRUE;

	}

	BOOL OnPaint(PAINTSTRUCT &ps)
	{
		HDC hdc = GetDC(hWnd);
		HBRUSH hBrush = CreateSolidBrush(RGB(48, 48, 246));
		RECT Rect = { 0,0,48,48 };
		Rect.top = 48 * y;
		Rect.bottom = 48 * (y+1);
		if (y > 8) {
			y = 0;
		}
		BOOL ret = FillRect(ps.hdc, &Rect, hBrush);
		DeleteObject(hBrush);

		return TRUE;
	}


};


int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
                     _In_opt_ HINSTANCE hPrevInstance,
                     _In_ LPWSTR    lpCmdLine,
                     _In_ int       nCmdShow)
{
    UNREFERENCED_PARAMETER(hPrevInstance);
    UNREFERENCED_PARAMETER(lpCmdLine);

    // TODO: ここにコードを挿入してください。

    // グローバル文字列初期化しています。
    LoadStringW(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
    LoadStringW(hInstance, IDC_WINDOWSPROJECT7, szWindowClass, MAX_LOADSTRING);
    //MyRegisterClass(hInstance);



	MyWindow win;



	win.hInstance = hInstance;

	// アプリケーション初期化を実行します:
	if (!win.InitInstance())
	{
		return FALSE;
	}

	BOOL ret;

	win.ShowWindow();

	ret = win.Main();

	if (ret)
	{
		return 0;
	}else {
		return (int)win.msg.wParam;
	}



}






//
//  関数: WndProc(HWND, UINT, WPARAM, LPARAM)
//
//  目的:    メイン ウィンドウメッセージを処理します。
//
//  WM_COMMAND  - アプリケーション メニューの処理
//  WM_PAINT    - メイン ウィンドウの描画
//  WM_DESTROY  - 中止メッセージを表示して戻る
//
//
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
    switch (message)
    {
    case WM_COMMAND:
        {
            int wmId = LOWORD(wParam);
            // 選択されたメニューの解析:
            switch (wmId)
            {
            case IDM_ABOUT:
                DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, About);
                break;
            case IDM_EXIT:
                DestroyWindow(hWnd);
                break;
            default:
                return DefWindowProc(hWnd, message, wParam, lParam);
            }
        }
        break;
    case WM_PAINT:
        {
            PAINTSTRUCT ps;
            HDC hdc = BeginPaint(hWnd, &ps);

			MyWindow *target = MyWindow::find(hWnd);
			target->OnPaint(ps);


            // TODO: HDC を使用する描画コードをここに追加してください...
            EndPaint(hWnd, &ps);
        }
        break;
    case WM_DESTROY:
        PostQuitMessage(0);
        break;
    default:
        return DefWindowProc(hWnd, message, wParam, lParam);
    }
    return 0;
}

// バージョン情報ボックスメッセージ ハンドラーです。
INT_PTR CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
    UNREFERENCED_PARAMETER(lParam);
    switch (message)
    {
    case WM_INITDIALOG:
        return (INT_PTR)TRUE;

    case WM_COMMAND:
        if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)
        {
            EndDialog(hDlg, LOWORD(wParam));
            return (INT_PTR)TRUE;
        }
        break;
    }
    return (INT_PTR)FALSE;
}

anond:20190101162210

やすいように フルソー

青い■を表示するだけ

// WindowsProject7.cpp: アプリケーションエントリ ポイント定義します。
//

#include "stdafx.h"
#include "WindowsProject7.h"

#define MAX_LOADSTRING 100

// グローバル変数:
HINSTANCE hInst;                                // 現在インターフェイス
WCHAR szTitle[MAX_LOADSTRING];                  // タイトル バーテキスト
WCHAR szWindowClass[MAX_LOADSTRING];            // メイン ウィンドウ クラス名

// このコード モジュールに含まれ関数宣言転送します:
//ATOM                MyRegisterClass(HINSTANCE hInstance);
BOOL                InitInstance(HINSTANCE, int);
LRESULT CALLBACK    WndProc(HWND, UINT, WPARAM, LPARAM);
INT_PTR CALLBACK    About(HWND, UINT, WPARAM, LPARAM);

#include <list>

class MyWindow;
	
std::list< MyWindow *> windows;

class MyWindow
{
public:

	HWND hWnd;



	MyWindow()
		:hWnd(NULL)
	{
		windows.push_back(this);
	}

	virtual ~MyWindow()
	{
		std::list< MyWindow *>::iterator it;
		for (it = windows.begin(); it != windows.end(); it++)
		{
			if (*it == this)
			{
				windows.erase(it);
				break;
			}
		}
	}

	static MyWindow * find(HWND key)
	{
		std::list< MyWindow *>::iterator it;
		for (it = windows.begin(); it != windows.end(); it++)
		{
			MyWindow *target = *it;

			if (target->hWnd == key)
			{
				return target;
			}

		}

		return NULL;
	}



	//
	//  関数: MyRegisterClass()
	//
	//  目的: ウィンドウ クラス登録します。
	//
	ATOM MyRegisterClass(HINSTANCE hInstance)
	{
		WNDCLASSEXW wcex;

		wcex.cbSize = sizeof(WNDCLASSEX);

		wcex.style = CS_HREDRAW | CS_VREDRAW;
		wcex.lpfnWndProc = WndProc;
		wcex.cbClsExtra = 0;
		wcex.cbWndExtra = 0;
		wcex.hInstance = hInstance;
		wcex.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_WINDOWSPROJECT7));
		wcex.hCursor = LoadCursor(nullptr, IDC_ARROW);
		wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
		wcex.lpszMenuName = MAKEINTRESOURCEW(IDC_WINDOWSPROJECT7);
		wcex.lpszClassName = szWindowClass;
		wcex.hIconSm = LoadIcon(wcex.hInstance, MAKEINTRESOURCE(IDI_SMALL));

		return RegisterClassExW(&wcex);
	}

	//
	//   関数: InitInstance(HINSTANCE, int)
	//
	//   目的: インスタンス ハンドルを保存して、メイン ウィンドウ作成します。
	//
	//   コメント:
	//
	//        この関数で、グローバル変数インスタンス ハンドルを保存し、
	//        メイン プログラム ウィンドウ作成および表示します。
	//
	BOOL InitInstance()
	{
		hInst = hInstance; // グローバル変数インスタンス処理を格納します。

		ATOM c = MyRegisterClass(hInstance);


		hWnd = CreateWindowW(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW,
			CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, nullptr, nullptr, hInstance, nullptr);

		if (!hWnd)
		{
			return FALSE;
		}

		return TRUE;
	}

	BOOL ShowWindow()
	{
		BOOL ret;
		ret = ::ShowWindow(hWnd, SW_SHOW);
		::UpdateWindow(hWnd);

		return ret;
	}


	HINSTANCE hInstance;
	MSG msg;

	BOOL Main()
	{

		HACCEL hAccelTable = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDC_WINDOWSPROJECT7));

		// メイン メッセージ ループ:
		while (GetMessage(&msg, nullptr, 0, 0))
		{
			if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
			{
				TranslateMessage(&msg);
				DispatchMessage(&msg);
			}
		}


		return TRUE;

	}

	BOOL OnPaint(PAINTSTRUCT &ps)
	{
		HBRUSH hBrush = CreateSolidBrush(RGB(48, 48, 246));
		RECT Rect = { 0,0,48,48 };
		BOOL ret = FillRect(ps.hdc, &Rect, hBrush);
		DeleteObject(hBrush);

		return TRUE;
	}


};


int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
                     _In_opt_ HINSTANCE hPrevInstance,
                     _In_ LPWSTR    lpCmdLine,
                     _In_ int       nCmdShow)
{
    UNREFERENCED_PARAMETER(hPrevInstance);
    UNREFERENCED_PARAMETER(lpCmdLine);

    // TODO: ここにコードを挿入してください。

    // グローバル文字列初期化しています。
    LoadStringW(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
    LoadStringW(hInstance, IDC_WINDOWSPROJECT7, szWindowClass, MAX_LOADSTRING);
    //MyRegisterClass(hInstance);



	MyWindow win;



	win.hInstance = hInstance;

	// アプリケーション初期化を実行します:
	if (!win.InitInstance())
	{
		return FALSE;
	}

	BOOL ret;

	win.ShowWindow();

	ret = win.Main();

	if (ret)
	{
		return 0;
	}else {
		return (int)win.msg.wParam;
	}



}






//
//  関数: WndProc(HWND, UINT, WPARAM, LPARAM)
//
//  目的:    メイン ウィンドウメッセージを処理します。
//
//  WM_COMMAND  - アプリケーション メニューの処理
//  WM_PAINT    - メイン ウィンドウの描画
//  WM_DESTROY  - 中止メッセージを表示して戻る
//
//
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
    switch (message)
    {
    case WM_COMMAND:
        {
            int wmId = LOWORD(wParam);
            // 選択されたメニューの解析:
            switch (wmId)
            {
            case IDM_ABOUT:
                DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, About);
                break;
            case IDM_EXIT:
                DestroyWindow(hWnd);
                break;
            default:
                return DefWindowProc(hWnd, message, wParam, lParam);
            }
        }
        break;
    case WM_PAINT:
        {
            PAINTSTRUCT ps;
            HDC hdc = BeginPaint(hWnd, &ps);

			MyWindow *target = MyWindow::find(hWnd);
			target->OnPaint(ps);


            // TODO: HDC を使用する描画コードをここに追加してください...
            EndPaint(hWnd, &ps);
        }
        break;
    case WM_DESTROY:
        PostQuitMessage(0);
        break;
    default:
        return DefWindowProc(hWnd, message, wParam, lParam);
    }
    return 0;
}

// バージョン情報ボックスメッセージ ハンドラーです。
INT_PTR CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
    UNREFERENCED_PARAMETER(lParam);
    switch (message)
    {
    case WM_INITDIALOG:
        return (INT_PTR)TRUE;

    case WM_COMMAND:
        if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)
        {
            EndDialog(hDlg, LOWORD(wParam));
            return (INT_PTR)TRUE;
        }
        break;
    }
    return (INT_PTR)FALSE;
}

anond:20181231104029

// WindowsProject7.cpp: アプリケーションエントリ ポイント定義します。
//

#include "stdafx.h"
#include "WindowsProject7.h"

#define MAX_LOADSTRING 100

// グローバル変数:
HINSTANCE hInst;                                // 現在インターフェイス
WCHAR szTitle[MAX_LOADSTRING];                  // タイトル バーテキスト
WCHAR szWindowClass[MAX_LOADSTRING];            // メイン ウィンドウ クラス名

// このコード モジュールに含まれ関数宣言転送します:
//ATOM                MyRegisterClass(HINSTANCE hInstance);
BOOL                InitInstance(HINSTANCE, int);
LRESULT CALLBACK    WndProc(HWND, UINT, WPARAM, LPARAM);
INT_PTR CALLBACK    About(HWND, UINT, WPARAM, LPARAM);

#include <list>

class MyWindow;
	
std::list< MyWindow *> windows;

class MyWindow
{
public:

	HWND hWnd;



	MyWindow()
		:hWnd(NULL)
	{
		windows.push_back(this);
	}

	virtual ~MyWindow()
	{
		std::list< MyWindow *>::iterator it;
		for (it = windows.begin(); it != windows.end(); it++)
		{
			if (*it == this)
			{
				windows.erase(it);
				break;
			}
		}
	}

	static MyWindow * find(HWND key)
	{
		std::list< MyWindow *>::iterator it;
		for (it = windows.begin(); it != windows.end(); it++)
		{
			MyWindow *target = *it;

			if (target->hWnd == key)
			{
				return target;
			}

		}

		return NULL;
	}



	//
	//  関数: MyRegisterClass()
	//
	//  目的: ウィンドウ クラス登録します。
	//
	ATOM MyRegisterClass(HINSTANCE hInstance)
	{
		WNDCLASSEXW wcex;

		wcex.cbSize = sizeof(WNDCLASSEX);

		wcex.style = CS_HREDRAW | CS_VREDRAW;
		wcex.lpfnWndProc = WndProc;
		wcex.cbClsExtra = 0;
		wcex.cbWndExtra = 0;
		wcex.hInstance = hInstance;
		wcex.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_WINDOWSPROJECT7));
		wcex.hCursor = LoadCursor(nullptr, IDC_ARROW);
		wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
		wcex.lpszMenuName = MAKEINTRESOURCEW(IDC_WINDOWSPROJECT7);
		wcex.lpszClassName = szWindowClass;
		wcex.hIconSm = LoadIcon(wcex.hInstance, MAKEINTRESOURCE(IDI_SMALL));

		return RegisterClassExW(&wcex);
	}

	//
	//   関数: InitInstance(HINSTANCE, int)
	//
	//   目的: インスタンス ハンドルを保存して、メイン ウィンドウ作成します。
	//
	//   コメント:
	//
	//        この関数で、グローバル変数インスタンス ハンドルを保存し、
	//        メイン プログラム ウィンドウ作成および表示します。
	//
	BOOL InitInstance()
	{
		hInst = hInstance; // グローバル変数インスタンス処理を格納します。

		ATOM c = MyRegisterClass(hInstance);


		hWnd = CreateWindowW(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW,
			CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, nullptr, nullptr, hInstance, nullptr);

		if (!hWnd)
		{
			return FALSE;
		}

		return TRUE;
	}

	BOOL ShowWindow()
	{
		BOOL ret;
		ret = ::ShowWindow(hWnd, SW_SHOW);
		::UpdateWindow(hWnd);

		return ret;
	}


	HINSTANCE hInstance;
	MSG msg;

	BOOL Main()
	{

		HACCEL hAccelTable = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDC_WINDOWSPROJECT7));

		// メイン メッセージ ループ:
		while (GetMessage(&msg, nullptr, 0, 0))
		{
			if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
			{
				TranslateMessage(&msg);
				DispatchMessage(&msg);
			}
		}


		return TRUE;

	}

	BOOL OnPaint()
	{
		return TRUE;
	}


};


int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
                     _In_opt_ HINSTANCE hPrevInstance,
                     _In_ LPWSTR    lpCmdLine,
                     _In_ int       nCmdShow)
{
    UNREFERENCED_PARAMETER(hPrevInstance);
    UNREFERENCED_PARAMETER(lpCmdLine);

    // TODO: ここにコードを挿入してください。

    // グローバル文字列初期化しています。
    LoadStringW(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
    LoadStringW(hInstance, IDC_WINDOWSPROJECT7, szWindowClass, MAX_LOADSTRING);
    //MyRegisterClass(hInstance);



	MyWindow win;



	win.hInstance = hInstance;

	// アプリケーション初期化を実行します:
	if (!win.InitInstance())
	{
		return FALSE;
	}

	BOOL ret;

	win.ShowWindow();

	ret = win.Main();

	if (ret)
	{
		return 0;
	}else {
		return (int)win.msg.wParam;
	}



}






//
//  関数: WndProc(HWND, UINT, WPARAM, LPARAM)
//
//  目的:    メイン ウィンドウメッセージを処理します。
//
//  WM_COMMAND  - アプリケーション メニューの処理
//  WM_PAINT    - メイン ウィンドウの描画
//  WM_DESTROY  - 中止メッセージを表示して戻る
//
//
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
    switch (message)
    {
    case WM_COMMAND:
        {
            int wmId = LOWORD(wParam);
            // 選択されたメニューの解析:
            switch (wmId)
            {
            case IDM_ABOUT:
                DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, About);
                break;
            case IDM_EXIT:
                DestroyWindow(hWnd);
                break;
            default:
                return DefWindowProc(hWnd, message, wParam, lParam);
            }
        }
        break;
    case WM_PAINT:
        {
            PAINTSTRUCT ps;
            HDC hdc = BeginPaint(hWnd, &ps);

			MyWindow *target = MyWindow::find(hWnd);
			target->OnPaint();


            // TODO: HDC を使用する描画コードをここに追加してください...
            EndPaint(hWnd, &ps);
        }
        break;
    case WM_DESTROY:
        PostQuitMessage(0);
        break;
    default:
        return DefWindowProc(hWnd, message, wParam, lParam);
    }
    return 0;
}

// バージョン情報ボックスメッセージ ハンドラーです。
INT_PTR CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
    UNREFERENCED_PARAMETER(lParam);
    switch (message)
    {
    case WM_INITDIALOG:
        return (INT_PTR)TRUE;

    case WM_COMMAND:
        if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)
        {
            EndDialog(hDlg, LOWORD(wParam));
            return (INT_PTR)TRUE;
        }
        break;
    }
    return (INT_PTR)FALSE;
}


Windowsシステムは基本 グローバル関数なので

グローバル関数<>クラス化されたメソッド

ブリッジ関数を書いた

2018-12-31

anond:20181228211250

// WindowsProject7.cpp: アプリケーションエントリ ポイント定義します。
//

#include "stdafx.h"
#include "WindowsProject7.h"

#define MAX_LOADSTRING 100

// グローバル変数:
HINSTANCE hInst;                                // 現在インターフェイス
WCHAR szTitle[MAX_LOADSTRING];                  // タイトル バーテキスト
WCHAR szWindowClass[MAX_LOADSTRING];            // メイン ウィンドウ クラス名

// このコード モジュールに含まれ関数宣言転送します:
//ATOM                MyRegisterClass(HINSTANCE hInstance);
BOOL                InitInstance(HINSTANCE, int);
LRESULT CALLBACK    WndProc(HWND, UINT, WPARAM, LPARAM);
INT_PTR CALLBACK    About(HWND, UINT, WPARAM, LPARAM);


class MyWindow
{
public:

	HWND hWnd;

	MyWindow()
		:hWnd(NULL)
	{

	}


	//
	//  関数: MyRegisterClass()
	//
	//  目的: ウィンドウ クラス登録します。
	//
	ATOM MyRegisterClass(HINSTANCE hInstance)
	{
		WNDCLASSEXW wcex;

		wcex.cbSize = sizeof(WNDCLASSEX);

		wcex.style = CS_HREDRAW | CS_VREDRAW;
		wcex.lpfnWndProc = WndProc;
		wcex.cbClsExtra = 0;
		wcex.cbWndExtra = 0;
		wcex.hInstance = hInstance;
		wcex.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_WINDOWSPROJECT7));
		wcex.hCursor = LoadCursor(nullptr, IDC_ARROW);
		wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
		wcex.lpszMenuName = MAKEINTRESOURCEW(IDC_WINDOWSPROJECT7);
		wcex.lpszClassName = szWindowClass;
		wcex.hIconSm = LoadIcon(wcex.hInstance, MAKEINTRESOURCE(IDI_SMALL));

		return RegisterClassExW(&wcex);
	}

	//
	//   関数: InitInstance(HINSTANCE, int)
	//
	//   目的: インスタンス ハンドルを保存して、メイン ウィンドウ作成します。
	//
	//   コメント:
	//
	//        この関数で、グローバル変数インスタンス ハンドルを保存し、
	//        メイン プログラム ウィンドウ作成および表示します。
	//
	BOOL InitInstance()
	{
		hInst = hInstance; // グローバル変数インスタンス処理を格納します。

		ATOM c = MyRegisterClass(hInstance);


		hWnd = CreateWindowW(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW,
			CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, nullptr, nullptr, hInstance, nullptr);

		if (!hWnd)
		{
			return FALSE;
		}

		return TRUE;
	}

	BOOL ShowWindow()
	{
		BOOL ret;
		ret = ::ShowWindow(hWnd, SW_SHOW);
		::UpdateWindow(hWnd);

		return ret;
	}


	HINSTANCE hInstance;
	MSG msg;

	BOOL Main()
	{

		HACCEL hAccelTable = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDC_WINDOWSPROJECT7));

		// メイン メッセージ ループ:
		while (GetMessage(&msg, nullptr, 0, 0))
		{
			if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
			{
				TranslateMessage(&msg);
				DispatchMessage(&msg);
			}
		}


		return TRUE;

	}



};


int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
                     _In_opt_ HINSTANCE hPrevInstance,
                     _In_ LPWSTR    lpCmdLine,
                     _In_ int       nCmdShow)
{
    UNREFERENCED_PARAMETER(hPrevInstance);
    UNREFERENCED_PARAMETER(lpCmdLine);

    // TODO: ここにコードを挿入してください。

    // グローバル文字列初期化しています。
    LoadStringW(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
    LoadStringW(hInstance, IDC_WINDOWSPROJECT7, szWindowClass, MAX_LOADSTRING);
    //MyRegisterClass(hInstance);



	MyWindow win;



	win.hInstance = hInstance;

	// アプリケーション初期化を実行します:
	if (!win.InitInstance())
	{
		return FALSE;
	}

	BOOL ret;

	win.ShowWindow();

	ret = win.Main();

	if (ret)
	{
		return 0;
	}else {
		return (int)win.msg.wParam;
	}



}






//
//  関数: WndProc(HWND, UINT, WPARAM, LPARAM)
//
//  目的:    メイン ウィンドウメッセージを処理します。
//
//  WM_COMMAND  - アプリケーション メニューの処理
//  WM_PAINT    - メイン ウィンドウの描画
//  WM_DESTROY  - 中止メッセージを表示して戻る
//
//
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
    switch (message)
    {
    case WM_COMMAND:
        {
            int wmId = LOWORD(wParam);
            // 選択されたメニューの解析:
            switch (wmId)
            {
            case IDM_ABOUT:
                DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, About);
                break;
            case IDM_EXIT:
                DestroyWindow(hWnd);
                break;
            default:
                return DefWindowProc(hWnd, message, wParam, lParam);
            }
        }
        break;
    case WM_PAINT:
        {
            PAINTSTRUCT ps;
            HDC hdc = BeginPaint(hWnd, &ps);
            // TODO: HDC を使用する描画コードをここに追加してください...
            EndPaint(hWnd, &ps);
        }
        break;
    case WM_DESTROY:
        PostQuitMessage(0);
        break;
    default:
        return DefWindowProc(hWnd, message, wParam, lParam);
    }
    return 0;
}

// バージョン情報ボックスメッセージ ハンドラーです。
INT_PTR CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
    UNREFERENCED_PARAMETER(lParam);
    switch (message)
    {
    case WM_INITDIALOG:
        return (INT_PTR)TRUE;

    case WM_COMMAND:
        if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)
        {
            EndDialog(hDlg, LOWORD(wParam));
            return (INT_PTR)TRUE;
        }
        break;
    }
    return (INT_PTR)FALSE;
}

こんなかんじ。クラス化した

2018-12-28

とりあえず、Visual Studioが作ってくれるテンプレ

//
//  関数: MyRegisterClass()
//
//  目的: ウィンドウ クラス登録します。
//
ATOM MyRegisterClass(HINSTANCE hInstance)
{
    WNDCLASSEXW wcex;

    wcex.cbSize = sizeof(WNDCLASSEX);

    wcex.style          = CS_HREDRAW | CS_VREDRAW;
    wcex.lpfnWndProc    = WndProc;
    wcex.cbClsExtra     = 0;
    wcex.cbWndExtra     = 0;
    wcex.hInstance      = hInstance;
    wcex.hIcon          = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_WINDOWSPROJECT7));
    wcex.hCursor        = LoadCursor(nullptr, IDC_ARROW);
    wcex.hbrBackground  = (HBRUSH)(COLOR_WINDOW+1);
    wcex.lpszMenuName   = MAKEINTRESOURCEW(IDC_WINDOWSPROJECT7);
    wcex.lpszClassName  = szWindowClass;
    wcex.hIconSm        = LoadIcon(wcex.hInstance, MAKEINTRESOURCE(IDI_SMALL));

    return RegisterClassExW(&wcex);
}

これ意味がわからない人が多いと思うけど

Windowマネージャーに 自分アプリ登録とかおもっておけばいい。

必須

とはいえ自動コード生成だから 問題がない

2018-12-27

愚痴

テックウィンドのキーボードPC初代を持っているんだけど、これがとんでもない迷作機で、2年の間に2回だめ食らった。保証外だったし2回とも交換で1万6千円支払った。リカバリはなぜか修理センタでは出来たとのことなのだが、信用できないから新品交換を頼んだ。それが先月の話。

で、本題。また壊れやがった。windowsUpdateで止まりやがって、この野郎馬鹿野郎

HDMIでは表示できるということなんだが、うちのHDMI端子のあるモニタでは起動画面とかBIOSが表示されない。

解像度関係らしいがHDMI使わないのでよくわからない。

VGAは推奨しませんとかアホなことを言われたが新しくモニタを買えということか?と問うたら、ごにょごにょ。そりゃ言えないよな。

現に中古富士通Esprimo(パーツは取り替えたりしてる)では、VGAでもBIOSから見えるのだから問題モニタPCのどちらかに起因するのだが…正直PCが悪いのではないかと思う。

クイックスタートガイドかいう紙っペラ一枚入っているだけで、windows10ディスクも入っていない。光学機器いからだろうけど。

その説明書には、推奨解像度もあるけど…それ以上の解像度モニタ追従できないって事は、何かがおかしいとしか思えない。

ほんとにこんちくしょういくらかけてると思ってんだ発売時から考えたらそれなりのノート買えちゃうんだぞてめえ、という気分なのだ

ノートにしなかったのは、ノートより手が掛かるが、持ち運べて店を開いて、なんやかんや出来るというその一点なのだ。中身ショボいというか、まあゴミですね。

ストレージ32GB/メインメモリGBしか無いしAtomだし。やる事はネットブラウズ文章書きと編集作業なので、全然いいんだけど。

気に入ってるんだけど、なんというか、馬鹿な子ほど可愛い、というやつなのか…。

そんなわけで、エイヤッと力技で起動させたら、今度はBluetoothマウス認識しなくなりやがった。他の機械では認識するので…もうやだこのPC

2018-12-01

anond:20181201191008

いや、はてなーならRSS/Atomフェードリーダなんて常識だし、Googleアラートもあるし、Webクローラだって運用してるの珍しくないだろ

自動巡回で取り出したテキスト情報grepして絞り込み、欲しい情報フィルタリング、そして通知なんて今の時代GUIでできるわ

ログイン ユーザー登録
ようこそ ゲスト さん