1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
case WM_CREATE:
{
TCHAR Path_BG [MAX_PATH]; // Background image buffer
TCHAR Path_Siel [MAX_PATH]; // Siel banner
TCHAR Path_Lumiel [MAX_PATH]; // Lumiel banner
GetModuleFileName(NULL, Path_BG, MAX_PATH);
GetModuleFileName(NULL, Path_Siel, MAX_PATH);
GetModuleFileName(NULL, Path_Lumiel, MAX_PATH);
PathRemoveFileSpec(Path_BG);
PathRemoveFileSpec(Path_Siel);
PathRemoveFileSpec(Path_Lumiel);
_tcscat(Path_BG, TEXT("\\bg.jpg"));
_tcscat(Path_Siel, TEXT("\\Siel.jpg"));
_tcscat(Path_Lumiel, TEXT("\\Lumiel.jpg"));
HWND hwnd_bg = CreateWindowEx(0, WC_IMAGEBOX, TEXT(""), WS_CHILD | WS_VISIBLE, 0, 0, 500, 263, hwnd, NULL, (HMODULE) GetWindowLongPtr(hwnd, GWLP_HINSTANCE), NULL);
HWND hwnd_Siel = CreateWindowEx(0, WC_IMAGEBOX, TEXT(""), WS_CHILD | WS_VISIBLE, 5, 50, 40, 40, hwnd, NULL, (HMODULE) GetWindowLongPtr(hwnd, GWLP_HINSTANCE), NULL);
HWND hwnd_Lumiel = CreateWindowEx(0, WC_IMAGEBOX, TEXT(""), WS_CHILD | WS_VISIBLE, 5, 95, 40, 40, hwnd, NULL, (HMODULE) GetWindowLongPtr(hwnd, GWLP_HINSTANCE), NULL);
ImageBox_SetImage(hwnd_Siel ,Path_Siel);
ImageBox_SetImage(hwnd_Lumiel, Path_Lumiel);
ImageBox_SetImage(hwnd_bg , Path_BG);
SendMessage(NULL,WM_PAINT,0,0);
return 0;
}
| |