【漢直】T-Code/TUT-Codeスレ Lesson2【連習】at UNIX【漢直】T-Code/TUT-Codeスレ Lesson2【連習】 - 暇つぶし2ch■コピペモード□スレを通常表示□オプションモード□このスレッドのURL■項目テキスト911:871 04/03/20 20:16 >>906 わざわざチェックして頂いて有難うございます。 912:871 04/03/20 20:38 >>910 じゃあ、漢直winのをパクっちゃいましょう。 //この辺の数字をいじる。 #define CHAR_SIZE (12) // 文字の大きさ #define LARGE_CHAR_SIZE (16) // 大きい文字の大きさ #define BLOCK_SIZE (18) // 仮想鍵盤のキーの大きさ #define MARGIN_SIZE (4) // 仮想鍵盤の天地左右の余白 #define WIDTH (MARGIN_SIZE * 2 + BLOCK_SIZE * 11 + 1) // 仮想鍵盤の横幅 #define HEIGHT (MARGIN_SIZE * 2 + BLOCK_SIZE * 5 + 1) // 仮想鍵盤の縦幅 //これをWM_PAINTを処理している所にいれる。 // 外枠の大きさを取得 RECT winRect; GetWindowRect(hwnd, &winRect); // 中身の大きさを取得 RECT clientRect; GetClientRect(hwnd, &clientRect); // 外枠と中身の差を取得 int dX = (winRect.right - winRect.left) - (clientRect.right - clientRect.left); int dY = (winRect.bottom - winRect.top) - (clientRect.bottom - clientRect.top); int sX = ptCaret.x - (winRect.right - winRect.left) / 2; int sY = ptCaret.y + (winRect.bottom - winRect.top) / 5; MoveWindow(hwnd, sX, sY, WIDTH + dX, HEIGHT + dY, TRUE); 次ページ最新レス表示レスジャンプ類似スレ一覧スレッドの検索話題のニュースおまかせリストオプションしおりを挟むスレッドに書込スレッドの一覧暇つぶし2ch