你好,我的问题不会特殊的问题,但笼统. 1)假设使用MFC的已编译代码,假设该代码定义了一个窗口对象.窗口对象本身是否已编译为应用程序的代码并作为程序的一部分驻留在该代码中,或者,因为任何对象都是Windows OS在运行时创建的,所以编译后的代码不包含任何WindowsOS对象?我想知道当真正单击应用程序时,这些对象和控件从何而来. 2)我看到一些第三方dll附带了头文件. dll在哪种情况下应带有头文件?当dll中的对象或函数需要程序员创建的对象作为参数?时,程序员使用给定标头中的结构或类来创建-传递他/她在设计时创建的对象以发送给dll函数的一个参数,就是为什么? 感谢您的时间.
Hi,My questions will not be spesific questions but general. 1) Assuming a compiled codethat utilizesMFC,let's say the code defines a window object. Is the window object itself compiled into the application's code and resides thereas a part of the program,or, the compiled code does notinclude any WindowsOS-object because any object is created at run-time by Windows OS ? I'd like to know where those objects and controlscome out fromwhenan application isclicked really. 2) I see that some third party dlls come with header files. In which situtations a dll should be accompanied by header files ? When an object or a function in the dll needs a programmer-created object as an argument ?,the programmer uses the structure or class in the headers given to create-pass the object he/she creates at design time to send todll function for a parameter, is that why ?Thanks for the time.
推荐答案1)GUI对象是在运行时创建的操作系统.该应用程序定义了所需的属性,并调用OS API函数来创建窗口. 2)DLL应该始终带有头文件.编译器需要头文件来定义DLL函数的功能和参数. 1) GUI objects are created at runtime by the OS. The application defines the properties it wants and calls OS API functions to have the windows created.2) A DLL should always come with a header file. The header file is needed by the compiler to define the functions and parameters of the DLL functions.
更多推荐
创建GUI对象...
发布评论