#include <windows.h>
#include <stdio.h>LRESULT CALLBACK WinRacProc(
HWND hwnd, // handle to window
UINT uMsg, // message identifier
WPARAM wParam, // first message parameter
LPARAM lParam // second message parameter
);int WINAPI WinMain(
HINSTANCE hInstance, // handle to current instance
HINSTANCE hPrevInstance, // handle to previous instance
LPSTR lpCmdLine, // pointer to command line
int nCmdShow // show state of window
)
{
WNDCLASS ra;
ra.cbClsExtra = 0;
ra.cbWndExtra = 0;
ra.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
ra.hCursor = LoadCursor(NULL,IDC_CROSS);
ra.hIcon = LoadIcon(NULL,IDI_ERROR);
ra.hInstance = hInstance;
ra.lpfnWndProc = WinRacProc;
ra.lpszClassName = "rach";
ra.lpszMenuName = NULL;
ra.style = CS_HREDRAW | CS_VREDRAW; RegisterClass(&ra);
HWND hwnd;
hwnd = CreateWindow("rach","racWin",WS_OVERLAPPEDWINDOW,
0,0,600,500,NULL,NULL,hInstance,NULL); ShowWindow(hwnd,SW_SHOWNORMAL);
UpdateWindow(hwnd); MSG msg;
while(GetMessage(&msg,NULL,0,0)){
TranslateMessage(&msg);
DispatchMessage(&msg);
} return 0;
}
用的是VC6.0编译后出现不了窗口,是什么问题
#include <stdio.h>LRESULT CALLBACK WinRacProc(
HWND hwnd, // handle to window
UINT uMsg, // message identifier
WPARAM wParam, // first message parameter
LPARAM lParam // second message parameter
);int WINAPI WinMain(
HINSTANCE hInstance, // handle to current instance
HINSTANCE hPrevInstance, // handle to previous instance
LPSTR lpCmdLine, // pointer to command line
int nCmdShow // show state of window
)
{
WNDCLASS ra;
ra.cbClsExtra = 0;
ra.cbWndExtra = 0;
ra.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
ra.hCursor = LoadCursor(NULL,IDC_CROSS);
ra.hIcon = LoadIcon(NULL,IDI_ERROR);
ra.hInstance = hInstance;
ra.lpfnWndProc = WinRacProc;
ra.lpszClassName = "rach";
ra.lpszMenuName = NULL;
ra.style = CS_HREDRAW | CS_VREDRAW; RegisterClass(&ra);
HWND hwnd;
hwnd = CreateWindow("rach","racWin",WS_OVERLAPPEDWINDOW,
0,0,600,500,NULL,NULL,hInstance,NULL); ShowWindow(hwnd,SW_SHOWNORMAL);
UpdateWindow(hwnd); MSG msg;
while(GetMessage(&msg,NULL,0,0)){
TranslateMessage(&msg);
DispatchMessage(&msg);
} return 0;
}
用的是VC6.0编译后出现不了窗口,是什么问题
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货