编译通过但是显示不出来
多字节字符集
#define _CRT_SECURE_NO_WARNINGS
#include<Windows.h>
#include<stdio.h>
#include<time.h>
#include"resource.h"
#define edit_hour 8101
#define edit_min 8102
#define edit_sec 8103
#define static_currenttime 8201
#define button_ok 8301
#define button_about 8302
#define WS_CANTSIZE (WS_OVERLAPPED | \
WS_CAPTION | \
WS_SYSMENU | \
WS_MINIMIZEBOX)
#define voidstr ""
LRESULT CALLBACK WndExample(
HWND hwnd,
UINT message,
WPARAM wparam,
LPARAM lparam);
int WINAPI WinMain(
_In_ HINSTANCE hinstance,
_In_opt_ HINSTANCE hpervinstance,
_In_ LPSTR lpcmdline,
_In_ int cmdshow)
{
WNDCLASS wndclass;
HWND hwnd;//主窗口句柄
MSG msg;
char lpszclassname[] = "WINDOW";
wndclass.style = CS_HREDRAW | CS_VREDRAW;
wndclass.lpfnWndProc = WndExample;
wndclass.cbClsExtra = NULL;
wndclass.cbWndExtra = NULL;
wndclass.hInstance = hinstance;
wndclass.hIcon = LoadIcon(hinstance, MAKEINTRESOURCE(IDI_ICON1));
wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
wndclass.hbrBackground = CreateSolidBrush(RGB(230, 230, 250));
wndclass.lpszMenuName = 0;
wndclass.lpszClassName = lpszclassname;
if (!RegisterClass(&wndclass))
{
int err = GetLastError();
char errc[10] = { 0 };
_itoa(err, errc, 10);
MessageBox(NULL, errc, "注册窗口类失败", 0);
return 0;
}
hwnd = CreateWindow(lpszclassname, lpszclassname, WS_VISIBLE|WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, 330, 400, NULL, NULL, hinstance, NULL);
ShowWindow(hwnd, SW_SHOWNORMAL);
UpdateWindow(hwnd);
while (GetMessage(&msg, NULL, 0, 0))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return msg.wParam;
}
LRESULT CALLBACK WndExample(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)
{
switch (message)
{
case WM_CREATE: {
}
default:
return DefWindowProc(hwnd, message, wparam, lparam);
}
return 0;
}