c语言能编出具有windows的界面吗?高手请进来!
来源:百度知道 编辑:UC知道 时间:2024/06/02 01:00:43
双点安装的时候具有Windows界面吗?
哪位高手能解答一下吗?
你把以下的代码用C语言编译器编译执行一下,就会出来Windows那种窗口……
别用TC……因为TC是16位的。用Dev-CPP或者其它的32位编译器。
#include <windows.h>
/* Declare Windows procedure */
LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);
/* Make the class name into a global variable */
char szClassName[ ] = "WindowsApp";
int WINAPI WinMain (HINSTANCE hThisInstance,
HINSTANCE hPrevInstance,
LPSTR lpszArgument,
int nFunsterStil)
{
HWND hwnd; /* This is the handle for our window */
MSG messages; /* Here messages to the application are saved */
WNDCLASSEX wincl; /* Data structure for the windowclass */
/* The Window structure */
wincl.hInstance = hThisInstance;
wincl.lpszClassName = szClassName;
wincl.lpfnWndProc = WindowProcedure; /* This function is called by windows */