- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
mfc socket编程(mfc socket编程)
mfc socket编程(mfc socket编程)
This article is contributed by Li Huiliang
MFC socket programming
Network Gobang detailed explanation
I. Preface
Senior, and this semester is no class, really boring, this all day in the bedroom, it is really boring ah, so I think of the realization of a network of backgammon,
Also count four, in their own VC++ programming in a skilled, at the same time, socket programming is not very understanding before, but also through this opportunity to learn to deepen
In the process, I have encountered some problems, but also through the network and books to solve their own, and finally through this article and share some experience, hope for the beginning
Learning socket programming helpful
Two, Gobang design
We are actually using our single document to complete our program in MFC
(1), we define a two-dimensional array to store pieces: Node[20][20], 0,1 and initialize representation is black, said -1 is white, 0 said not to play chess.
(2) define a class: MySocket, which inherits from CSocket and is used to implement communication between the server and the client
(3) there are other variables that need to be added during the development process
Three, the concrete realization
Now well do it step by step
1, build the project
Start Visual C++6.0 and build a single document MFC project in IDE (specifically how to do it, believe it, not everyone knows it), but remember to build the project
Be sure to select Windows Socket, assuming that the project we have built is called FiveNodeChess
2, complete the window
In the ResourceView Dialog in the right key insert dialog, then right-click to create the Dialog- class wizard -create new established class, determined for the new dialog
To create a class, this Dialog will be our login window. The class name is LandDialog, as shown in figure (Figure -3)
Then add the controls we want to use on our Dialog, as shown in figure (-4):
The comb box control is the m_combox that is chosen as a server or client
The Edit
您可能关注的文档
- 50个面试问题,无答案(50 interview questions, no answer).doc
- 50最佳产品公司综合评分表(50 best product company composite score sheet).doc
- 50部最伟大的喜剧电影排行榜(50 of the greatest comedy films).doc
- 51-一级注册建造师变更注册申请表(3-1)编号(51- level 1 registered architect change registration form (3-1) number).doc
- 50个你不知道的桂小太郎的秘密(The secret of 50 little GUI you don't know).doc
- 34-中联航常旅客入会须知(34- frequent flyer admission notice).doc
- 51-企业报表年度审计暂行办法(Interim Measures for annual audit of enterprise reports of 51-).doc
- 512周年盘点 那些被误解的跨国公司(512th anniversary check out the misunderstood multinational companies).doc
- 51程序设计技巧(51 programming skills).doc
- 5730参数(5730 parameter).doc
- mba面试企业考官提问很严很职业(MBA interview enterprise examiner questions very strict, very professional.).doc
- mfc做界面时常用代码((MFC interface code commonly used ().doc
- mfc绘图教程(MFC drawing tutorial).doc
- mastercam8.0在四轴五轴铣床加工中的应用与技巧(Application and skill of MasterCAM8.0 in four axis five axis milling machine).doc
- mis人机界面的设计原则(Design principles of MIS man-machine interface).doc
- mi制作(Mi production).doc
- mmt故事翻译0211(MMT story translation 0211).doc
- matlab代码(matlab代码).doc
- mm定理(MM theorem).doc
- mp-1000型手动天调(MP-1000 manual weather regulation).doc
文档评论(0)