C语言黑底白字问题

来源:百度知道 编辑:UC知道 时间:2024/06/07 10:07:29
我初学编程,学了C语言 谭浩强编的 我是学生,在同学中我C学得算是好的了。

可是来来回回都是进行一些运算或一些数的处理。最出后出来一个黑底白字的界面下运行。

比如我编一下最最简单的做加法运算的软件。要怎样才能出一个 计算器的界面。而不是老是那种黑底白字的。
我只学了C,没学过别的

那需要用WINDOWS程序,比如VC写出的带窗口和程序。下面是一个简单的源码,要用VC++编译,如果感觉不晕的话说明你很有天赋
#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 */
wincl.s