Delphi启动过程追踪

摘要:
指针;内联;右:布尔值;内联;终止应用程序初始化;Application.Run;=WndProc;】T控制。WndProcprocedureTCustomForm。WndProc(varMessage:基于多态性调用父TControl的WndProcDispatch->

第一步:

_InitExe windows调用Exe的入口

_StartExe

InitUnits

第二步:

InitControls的initialization部分

TApplication.Create

AllocateHWnd

AllocateHWnd

MakeObjectInstance

StdWndProc

Instance^.FMethod := TMethod(AMethod);

AMethod==首次创建App时对应PopupControlProc

PMethod = ^TMethod;
``TMethod = recordCode, Data: Pointer;publicclass operator Equal(const Left, Right: TMethod): Boolean; inline;class operator NotEqual(const Left, Right: TMethod): Boolean; inline;class operator GreaterThan(const Left, Right: TMethod): Boolean; inline;class operator GreaterThanOrEqual(const Left, Right: TMethod): Boolean; inline;class operator LessThan(const Left, Right: TMethod): Boolean; inline;class operator LessThanOrEqual(const Left, Right: TMethod): Boolean; inline; end;

第三部:

  • Application.Initialize;
  • Application.Run;

第四步:

  • HandleMessage

  • TApplication.ProcessMessage

  • PeekMessage

  • TranslateMessage

  • DispatchMessageWi->

  • StdWndProc

  • TWinControl.MainWndProc

  • WindowProc: TWndMethod【TControl】

  • TControl.WndProc【初始化时指定FWindowProc := WndProc;】

  • TControl.WndProc

  • procedure TCustomForm.WndProc(var Message: TMessage);

  • 基于多态性调用父类TControl的WndProc

  • Dispatch->TObject.Dispath->消息回调函数

  • DefaultHandler

项目编译时,跳过资源编译的编译选项

<SkipResGeneration>true</SkipResGeneration>

免责声明:文章转载自《Delphi启动过程追踪》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇file控件change事件触发问题python笔记(一)获取当前目录路径和文件下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

网页仿 Office 2003 的工具条

网页仿 Office 2003 的工具条   [ 日期:2005-01-27 ]   [ 来自:网上摘录 ]<html><head><meta http-equiv="Content-Language" content="zh-cn"><meta http-equiv="Content-Type" content=...

JS 页面弹窗,弹出DIV并使整个页面背景变暗的功能的实现代码

首先写一个遮罩层div,然后再写一个弹窗的div <!-- 遮罩层 --><div style="background: #000; position: absolute; left: 0px; top: 0px; 100%; filter: alpha(opacity=30); opacity: 0.3; display: non...

(笔记)Linux下C语言实现静态IP地址,掩码,网关的设置

#include <sys/ioctl.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <net/if.h> #inclu...

php中处理换一换的简单实例

微博中,有很多标签供用户选择,点击换一换的时候,都会不断切换。 php程序的简单实现如下: //查询所有标签 $labels = Labels::find()->setColumns('id,w_name,w_uid')->order('w_time desc')->group('w_name')->getAll(); $label...

vue+element-ui el-table表格(含表头)内容溢出省略,鼠标悬浮提示

第一种:参考:https://my.oschina.net/u/3455362/blog/4674804 <template> <div class="test"> <el-table :data="gridData" border stripe style=" 100%"> &...

vant上传文件到后端

最近在做手机版页面,采用的vant框架,这个上传控件和以前用iview、element有点不一样,iview、element都是直接提供后端接口文件会自动发送到后端,vant需要自己负责发送文件到后端,对于我这种面向百度编程人员还是有点难度。特意记一下,能帮到其他面向百度编程人员 代码 很简单,基本是使用文件构建FormData参数,如下: html代...