vc++6.0 老是错误,改得快疯了,希望大神帮我改下让它成为可以运行的..

来源:百度知道 编辑:UC知道 时间:2024/05/06 02:18:14
#include <windows.h>

LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM) ;

int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
PSTR szCmdLine, int iCmdShow)
{
static TCHAR szAppName[] = TEXT("LOVELETTER") ;
HWND hwnd ;
MSG msg ;
WNDCLASSEX wndclass ;
wndclass.cbSize = sizeof(WNDCLASSEX);
wndclass.style = CS_HREDRAW | CS_VREDRAW ;
wndclass.lpfnWndProc = WndProc ;
wndclass.cbClsExtra = 0 ;
wndclass.cbWndExtra = 0 ;
wndclass.hInstance = hInstance ;
wndclass.hIcon = LoadIcon (NULL, IDI_APPLICATION) ;
wndclass.hCursor = LoadCursor (NULL, IDC_ARROW) ;
wndclass.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH) ;
wndclass.lpszMenuName = (LPCSTR)LOVELETTER;
wndclass.lpszClassName = szAppName ;
wndclass.hIconSm = LoadIcon(NULL,IDI_APPLICATION);

if (!RegisterClassEx (&wndclass))
{
MessageBox ( NULL, TEXT ("This program requir

//程序中错误确实很多, 另缺少资源文件
//经过修改, 已经可以运行 用 VC++6.0 编译通过.

#include "stdafx.h"
#include <windows.h>

LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM) ;

int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
PSTR szCmdLine, int iCmdShow)
{
static TCHAR szAppName[] = TEXT("LOVELETTER") ;
HWND hwnd ;
MSG msg ;
WNDCLASSEX wndclass ;
wndclass.cbSize = sizeof(WNDCLASSEX);
wndclass.style = CS_HREDRAW | CS_VREDRAW ;
wndclass.lpfnWndProc = WndProc ;
wndclass.cbClsExtra = 0 ;
wndclass.cbWndExtra = 0 ;
wndclass.hInstance = hInstance ;
wndclass.hIcon = 0;//LoadIcon (NULL, IDI_APPLICATION) ; 无图标
wndclass.hCursor = 0;//LoadCursor (NULL, IDC_ARROW) ; 无光标
wndclass.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH) ;
wndclass.lpszMenuName = 0;//(LPCSTR)LOVELETTER; 无菜单
wndclass.lpszClassName = szAppName ;
wndcl