在delphi的dialog页下有很多各种各样的dialog控件,有openfiledialog,openpicturedialog,等等 他们的共同属性就是 excute 比如下面就是一个打开文件对话框的代码 if openfiledialog1.excute then memo1.loadformfile:=openfiledialog1.filename;这是将一个文本文件读到memo的过程,因为是随手写的,可能会有问题,请自己看help文档
大家注意啦,贴主说的是: int DialogBox( HINSTANCE hInstance, // handle to application instance LPCTSTR lpTemplate, // identifies dialog box template HWND hWndParent, // handle to owner window DLGPROC lpDialogFunc // pointer to dialog box procedure ); 不是Dialog Box
他们的共同属性就是
excute
比如下面就是一个打开文件对话框的代码
if openfiledialog1.excute then
memo1.loadformfile:=openfiledialog1.filename;这是将一个文本文件读到memo的过程,因为是随手写的,可能会有问题,请自己看help文档
int DialogBox( HINSTANCE hInstance, // handle to application instance
LPCTSTR lpTemplate, // identifies dialog box template
HWND hWndParent, // handle to owner window
DLGPROC lpDialogFunc // pointer to dialog box procedure
);
不是Dialog Box