1.wsԴ?源码?
wsԴ??
呵呵,一年半前我和你一样,源码也处于这个状态,源码炮台源码如果你做windows的源码程序设计的话,编程像windows这样的源码免费的响应源码窗口化的软件,你必须接触VS,源码房源码如何获取旗下的源码VC++或VC#,你学完c和c++先接触VC++的源码MFC较为容易,使用MFC APP向导可以直接生成你所说的源码windows这样窗口程序,刚开始你是源码不知道如何生成的,为此你需要边学windows程序设计,源码建议使用《windows程序设计》,源码里面介绍了一个基本窗体生成的源码脸书系统源码原理和步骤。如果你要学VC#,源码那你得先学C#,源码app成品网站源码离做一个windows这样窗口程序比较远,而且也不知道它生成的原理,当然既然c和c++学的不错的话,c#入门也不难。如下是一个窗体生成的windows源码:
/*--------------------------------------
CLOCK.C -- Analog Clock Program
(c) Charles Petzold,
--------------------------------------*/
#include <windows.h>
#include <math.h>
LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM) ;
int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
PSTR szCmdLine, int iCmdShow)
{
static TCHAR szAppName[] = TEXT ("Clock") ;
HWND hwnd;
MSG msg;
WNDCLASS wndclass ;
wndclass.style = CS_HREDRAW | CS_VREDRAW ;
wndclass.lpfnWndProc = WndProc ;
wndclass.cbClsExtra = 0 ;
wndclass.cbWndExtra = 0 ;
wndclass.hInstance = hInstance ;
wndclass.hIcon = NULL ;
wndclass.hCursor = LoadCursor (NULL, IDC_ARROW) ;
wndclass.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH) ;
wndclass.lpszMenuName = NULL ;
wndclass.lpszClassName = szAppName ;
if (!RegisterClass (&wndclass))
{
MessageBox (NULL, TEXT ("Program requires Windows NT!"),
szAppName, MB_ICONERROR) ;
return 0 ;
}
hwnd = CreateWindow (szAppName, TEXT ("GDI Test"),
WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
NULL, NULL, hInstance, NULL) ;
ShowWindow (hwnd, iCmdShow) ;
UpdateWindow (hwnd) ;
while (GetMessage (&msg, NULL, 0, 0))
{
TranslateMessage (&msg) ;
DispatchMessage (&msg) ;
}
return msg.wParam ;
}
LRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
static HDC hdc;
static PAINTSTRUCT ps;
static COLORREF color;
static UINT ixClient,iyClient;
static RECT rtWindow , rtClient;
switch (message)
{
case WM_CREATE :
GetWindowRect( hwnd , &rtWindow );
GetClientRect( hwnd , &rtClient );
return 0 ;
case WM_NCPAINT:
hdc = GetWindowDC( hwnd );
color = GetPixel( hdc , , 5 );
SetBkColor( hdc , color );
SetTextColor( hdc , RGB(,0,0) );
TextOut( hdc , , ,
"Editor : CM" , strlen("Editor : CM") );
ReleaseDC( hwnd , hdc );
return 0;
case WM_SIZE :
ixClient = LOWORD( wParam );
iyClient = HIWORD( wParam );
return 0 ;
case WM_TIMER :
return 0 ;
case WM_PAINT :
hdc = BeginPaint (hwnd, &ps) ;
TextOut( hdc , , , "Editor : CM" , strlen("Editor : CM") );
EndPaint (hwnd, &ps) ;
return 0 ;
case WM_DESTROY :
PostQuitMessage(0);
return 0 ;
}
return DefWindowProc (hwnd, message, wParam, lParam) ;
}