C/C++±à³ÌGUI¿â±È½Ï
×îÇ¿µÄGUI¿âµ±ÊôQt£¬±Ï¾¹ÊÇÉÌÒµ»¯µÄ¶«Î÷£¬¹¦ÄÜ×îÍêÕû£¬Ê²Ã´¶¼ºÃ£¬°üÀ¨ÀàËÆjava´úÂë·ç¸ñ£¬Á¼ºÃµÄ¿ò¼ÜÉè¼Æ£¬µ«Óм¸µãÖµµÄÒ»Ì᣺
1.ËüûÓÐʹÓÃSTL£¬¶øÊÇ×Ô¼ºÊµÏÖÁËÒ»Ì×Ìæ´ú·½°¸QTL£»
2.ʼþÄ£ÐÍʹÓÃ×Ô´´µÄsignal/slot»úÖÆ£¬ËùÒÔÐèÒªmoc.exeÀ´Ô¤´¦ÀíÍ·Îļþ£»
3.¶ÔƤ·ôµÄÖ§³Ö²»ÊǺܺã¬ÐèÒª×Ô¼ºÐ´StyleÀàÀ´¶¨Òå¸÷ÖֿؼþµÄPaint£»
ËùÒÔÕ¾ÔÚQtµÄÊÓ½ÇÈ¥±È½ÏËùÓÐÆäËûµÄ¿ªÔ´¿â£¬ÏàÐÅÕâÑùÄÜΪÄã×÷³öÕýÈ·µÄÑ¡Ôñ¡£
1. GTK+
gtk+ÓÃCÓïÑÔµÄÃæÏò¶ÔÏóµÄÉè¼Æ·½·¨£¬¿ò¼ÜÉè¼ÆÁ¼ºÃ£¬Ëü¿ÉÄÜ»á±ÈQtÐÔÄܺá£LGPLÐÒ飬¿ÉÒÔ×÷ÉÌÒµÓÃ;£¬Ö§³ÖƤ·ô(theme/GtkStyle)£¬Ö§³ÖXML¶¨Òå½çÃ棬ÓÐÉè¼ÆÆ÷Ö§³Ö(glade)£¬Ö§³Ö¹ú¼Ê»¯(gettext)£¬µ«Ã»ÓÐQt·½±ã£¬±àÒëµÄ¿â´óС3M×óÓÒ(Debug°æ±¾ËãÉÏËùÓеÄlib)±ÈQtС£»ÓÐÀàËÆQtµÄsignal»úÖÆ£¬µ«²»ÐèÒªÔ¤±àÒë´¦Àí¡£¶ÔopenglºÍͼÐÎͼÏñÖ§³ÖÁ¼ºÃ¡£
gtk+»ùÓÚÈý¸ö¿â£ºglib£¬pangoºÍatk¡£glibÊǵײã¿â£¬·â×°ÁËcµÄÊý¾Ý½á¹¹´¦Àí£¬¿ÉÒÆÖ²ÐÔ£¬thread£¬¶¯Ì¬ÔØÈëÒÔ¼°Ò»¸ö¶ÔÏóϵͳ¡£pangoÊÇÒ»¸ö²¼¾ÖºÍÎı¾äÖȾ¿â£¬´¦Àí
×ÖÌåºÍ¹ú¼Ê»¯¡£atkÊÇÒ»¸öÓ¦ÓóÌÐò×é¼þ½Ó¿Ú¿â£¬ÀïÃæÓÐÀàËÆQtµÄactionÖ®ÀàµÄ¡£ÁíÍâcarioÊÇÒ»¸öʸÁ¿Í¼µÄ´¦Àí¿â¡£
ÒòΪÊÇC£¬µ«´úÂëÖбÜÃâ²»Á˺êºÍÏ»®Ïߣ¬²»ÊÇÄÇôÌÖÈËϲ»¶£¬¹À¼ÆC³ÌÐòÔ±±È½ÏÏ°¹ß¡£
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
g_signal_connect (window, “destroy”, G_CALLBACK (gtk_widget_destroyed), &window);
µ«ÓÐÆäËûÓïÑԵİ󶨣¬c++µÄÊÇgtkmm£¬pythonµÄÊÇPyGtk£¬adaµÄÊÇAdaGtk¡£ÆäÖÐgtkmmµÄ´úÂë·ç¸ñ±È½ÏºÃ£¬Ã»ÓÐÁËÏ»®ÏߺÍÖî¶àºê¡£
gtk+µÄ×îÖøÃûµÄ³É¹¦°¸ÀýÊÇgimpͼÏñ´¦Àí¹¤¾ßºÍgnome×ÀÃæ¡£
GIMP (http://www.gimp.org/), an image manipulation program
AbiWord (http://www.abiword.com/), a professional word processor
Dia (http://www.lysator.liu.se/~alla/dia/dia.html), a diagram creation program
GnuCash (http://www.gnucash.org/), a personal finance manager
Gnumeric (http://www.gnome.org/projects/gnumeric/), the GNOME spreadsheet application
Glade (http://glade.gnome.org/), a GTK+ based RAD tool which produces GTK+ an
Ïà¹ØÎĵµ£º
ǰһƪÎÒÃǽéÉÜÁËÒ»¸ö¼òµ¥²»¹ýµÄhelloworld³ÌÐòÒý³öÏà¹ØÎÊÌâ¡£³Ã×Å»¹Ã»ÓÐÍüµôÄÇЩ˼¿¼·½Ê½µÄ¼ÇÒ䣬±¾Æª¼ÌÐøÑÓÐøÕâÖÖ˼ά·½Ê½µÄÀíÄ½éÉÜÒ»ÏÂCC++ÖеĻù±¾Êý¾ÝÀàÐÍ¡£Êý¾ÝÀàÐͲ»Çå³þµÄ»°ÔÚÒÔºóµÄ±à³ÌÖлáÓкܶàÃÕÍźÍÎÊÌâ¡£ÉõÖÁÒ»¸ö³ÌÐòµÄBUGÕÒ°ëÌìҲûÓÐÕÒ³öÀ´Ê±ÎªÊ²Ã´£¬½á¹û²Å·¢ÏÖÊǼӼõÒç³öÁË¡£¸ü¼ÓÑÏÖصĻ¹ÓÐдԽ½ç¡¢¶ÁÔ ......
C£¬C++ÍøÂç±à³Ìѧϰ¼òÃ÷Ö¸ÄÏ
1. ÔúʵµÄC£¬C++»ù´¡ÖªÊ¶
²Î¿¼×ÊÁÏ¡¶C³ÌÐòÉè¼Æ¡·£¬¡¶C++ primer¡·¡£
2. TCP/IPÐÒé
¾µäÊéÊÇ£ºW.Richard Stevens Öø¡¶TCP/IPÏê½â¡·Èý¾íÊ飬¾í1ÊÇÐÒ飬¾í2ÊÇʵÏÖ£¬¾í3ÊÇTCPÊÂÎñÐÒéµÈ¡£»¹Óйٷ½µÄÐÒéÎĵµ£ºRFC
µ±È»Ò²¿ÉÒÔÔÚÍøÉÏÏÂÔصç×ÓÊé¡£
¾µäµÄ¿ªÔ´ÐÒé·ÖÎö¹¤¾ß£ºWireshark.
......
#include <Windows.h>
#include <math.h>
#include "resource.h"
#define PI 3.1415976/180
int dwCenterX,dwCenterY,dwRadius;
const TCHAR *szAppName=TEXT("Clock");
LRESULT CALLBACK ProcWinMain(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
void ShowTime(HWND hwnd,HDC hdc);
void ......
Ò»¸ö¼òµ¥µÄC/S¶àÏß³ÌÓ¦ÓÃ,ÉÔ΢À©Õ¹¾Í¿ÉÒÔÓÃÁË
/*socketÊÇÍøÂçÓ¦ÓóÌÐòµÄºËÐÄ£¬ÔÚ·þÎñÆ÷¶Ë»ò¿Í»§¶ËÍøÂçÓ¦ÓóÌÐòÖУ¬socket½ÔΪ²»¿ÉȱÉÙµÄÒªËØ
*ÔÚ·þÎñÆ÷³£¼ûµÄÓ¦ÓÃÓУºFTP·þÎñÆ÷£¬MAIL·þÎñÆ÷£¨SMTP£¬POP3£¬IMAP4ÐÒ飩£¬WEB£¨HTTPÐÒ飩
*½¨Á¢·þÎñÆ÷¶ËSOCKETµÄÓ¦ÓóÌÐò²½ÖèÈçÏ£º
*1¡£½¨Á¢·þÎñÆ÷¶ËµÄSOCKET£¬²¢ÇÒÒÔ´ ......