Windows application | c program

1)windows 子集

kernel:kernel32.dll    platform SDK/windows base services

user:user32.dll     platform SDK/user interface services

gdi:gdi32.dll      platform SDK/graphics and multimedia services/gdi

      MFC:在一组c++对象类别中封装了许多windows程序设计中的琐碎细节       《programming windows with MFC》  Jeff prosise

  Java:图形应用程序开发      《programming visual J++ 6.0》 stephen r.davis

 2) windows application  & internet (support FTP协议)

  windows sockets API(winsock) :socker as TCP/IP 通讯端点,socket define IP address and port number.

windows internet(wininet) API 

3)Visual c++ IDE | 4 major aspect

                  the ways c++ programming to objects

                  Functions  MFC class libary support

                   the completly windows programming

               向导所建立的应用程序框架的透明性 

 第二章 c/c++ syntax and concept

4)参数传递方式

值传递:单向

按地址传递:双向

引用传递:双向

 

5)static and extern functions

     functions from other documents is defined as extern(default) functions

     外部函数需要声明方可使用  sample : function: int YourFun(int x, int y)

                    declare: extern int YourFun(int x, int y)

 

6)interesting point about declare function

            declare     void myfun(int val=10)   // define 10 as a formal parameter default value

            call          myfun();  == myfun(10); //formal para has default value should align at the right side

 

7)&r=i   means r == i all the time   作用和指针基本相同,都是双向传递

                       sample |   void swap(int& x,int& y)

 

8)variants and  property

              作用域:可以被引用的区域(局部作用域 | 函数内有用;全局作用域 | 源文件内)

              生存期:程序执行期使用时间

             数据类型:

             存储类型(内存分配方式):1、静态分配(extern\static) :(编译分配,运行占用,结束释放);全局变量

                                                 2、自动分配(auto):(运行开辟“栈”,作用域内分配,作用域外释放);局部变量

                                                 3、动态分配:(运行开辟“堆”,使用静态和自动分配之外的内存,new和delete自主分配)

                                                  4、register:   存放在寄存器中

 

8.1)作用域限定符::

::a  全局变量a   ;  a 局部变量a

8.2)int*pi; pi= new int;  *pi=555   ==  int*pi=new int(555)

 

9)编译预处理

  #include    #define   条件编译指令

       #include < >  系统目录include子目录

       #include“”   优先当前子目录

第三章 c++ objects

 1)c++面向对象: 类定义--头文件.h      

                             类实体--源文件.cpp

                             #include预编译

2)构造函数&析构函数:input/output函数(与之前自己vb写的dll输入输出一样,原来这早就有现成的...)终于明白各大公司为什么总要推出自己的语言了..

3)winmain 包括 函数声明,初始化,消息循环

            初始化包括:窗口类定义、注册、创建、显示4部分。

4)API函数和C++类提供windows application 标准部件

5)windows消息来源

          输入消息   控件消息  系统消息 用户消息

6)系统资源要通过windows api函数来实现访问

   每个窗口程序都有1)winmain(); 2)winproc()

 7)windows.h 数据类型 和数据结构

8)预处理命令:1、宏定义命令;2、文件包含命令;3、条件编译命令。

 9)c++ 中文件操作使用fstream类完成;

10)类是逻辑上有关的函数及其数据的集合,不是用于执行,而是提供所需的资源

11)类的变量在C++中就称为对象。

 

posted on 2013-02-13 18:36  song2013  阅读(217)  评论(0编辑  收藏  举报

导航