DELPHI盒子
!实时搜索: 盒子论坛 | 注册用户 | 修改信息 | 退出
检举帖 | 全文检索 | 关闭广告 | 捐赠
技术论坛
 用户名
 密  码
自动登陆(30天有效)
忘了密码
≡技术区≡
DELPHI技术
lazarus/fpc/Free Pascal
移动应用开发
Web应用开发
数据库专区
报表专区
网络通讯
开源项目
论坛精华贴
≡发布区≡
发布代码
发布控件
文档资料
经典工具
≡事务区≡
网站意见
盒子之家
招聘应聘
信息交换
论坛信息
最新加入: wjy13061029975
今日帖子: 1
在线用户: 2
导航: 论坛 -> 经典工具 斑竹:liumazi,ruralboy  
作者:
男 itsense (itsense) ▲▲▲△△ -
普通会员
2018/5/20 19:12:07
标题:
PwrDev 3 浏览:1587
加入我的收藏
楼主: PwrDev Developer

Description 
 PwrDev is a great tool to create applications with, it needs a 32-bit PowerBASIC PB/WIN or PB/CC compiler. 

With PwrDev you can create applications without concerning too much about form details like preparing a window class and such. 
At the other hand, some intermediate knowledge about the windows API is required, novice will experience using PwrDev not an easy tool to start with. 
This is because transparency is the keyword here, we'll discuss transparency later. 

Modules 
 One great feature is that a project is stored in a single file; this makes a backup an easy task. 
Remember the endless count of BAS files with odd names, well PwrDev supports so called internal modules, give the module a desired name and insert code. 
Of course there are exceptions, truly modularly written include files are not useful to embed as code in a project file. 
You would not be able to share the code between projects, you can simply include them using the #include statement. 
So by making use of internal modules, your project directory will show itself less cluttered and you'll be able to distinguish project modules and shared modules. 
Oh and let's not forget the resource modules, these work the same. 
Once a resource module was added or some kind of part requires that a resource added, PwrDev will invoke the rersource compiler for you and will include it in the target application or library. 

Forms 
 What about form design? 
You can add as much forms as the compiler can handle, forms can be reused or can serve as child form similar to a Visual Basic's picturebox except that forms will give you a much greater deal of message interception and handling. 
One cool part is the Designer property for a tab control; this will let you select the forms for tab pages. 
PwrDev aligns the forms on top of the tab control and again, since each form has its own window procedure you can respond to messages easily. 

Events 
 PwrDev can prepare events for you; these are not equal PB/WIN's DDT callback feature. 
Almost any control has a list of events you can use but also a single message can be routed to a single procedure, yes this means you can route a button's click event to a single procedure by using a simple call. 
Didn't we mention transparency earlier? 
Well here comes the good part, PwrDev can even prepare events for unknown custom controls! 
A rather exceptional technique is used, no ordinary hooking but real interceptions. 
For example, an "owner-drawn" listbox's WM_DRAWITEM message will normally appear in the control's parent window procedure. 
This could be a serious issue and eventually prevents you from using a control like this. 
With a single call, during control creation for example, you simply set WM_DRAWITEM for this control to a custom procedure. 
To be clear, not every message can be routed but at least all of the messages in WM_COMMAND as WM_NOTIFY will. 
Some others will be handled fine as well but these messages are the most important ones.
 
Extras 
 PwrDev is not a Visual Basic, it appears similar but it is not. A truly poor aspect of Visual Basic was it's lack of support for windows API, each and every part needed to be copied and pasted into your code, daunting! 
The PowerBASIC compilers accept this fine by using one or more include files you extend the functionality significantly. 
In PwrDev the most common includes are added for you depending on the controls used and a few more aspects. 
Besides PwrDev supports control events, it was never a goal to write so called wrapper functions around the WinApi, there are a few like the VD_Text() and VD_GetText() calls, it set's or obtains text for controls or can be used to add items in a combo and more. 
For forms there is only a single window procedure, no events. 
But if your compiler supports DDT, you could use (control) callbacks etc as well. 

Speaking about extra's, in the project settings you'll find a tab with a large code base, for example having support for databases is just a click away! 
There are about 20 custom controls available, just drop them on a form. 

Conclusion 
 As you might have read by now, ordinary coding and handling can all be done as you did before, you don't need to use events, you don't have to use internal modules, frankly there are only a few parts which PwrDev handles for you but for most it's the same as before. 
In this help the compile logic will be explained like what to do with a main module and so. 
To understand PwrDev you should use it; in the end it's not difficult but that is similar to many things isn't it?
此帖子包含附件:itsense_2018520191822.rar 大小:4.37M
----------------------------------------------
-
信息
登陆以后才能回复
Copyright © 2CCC.Com 盒子论坛 v3.0.1 版权所有 页面执行75.68359毫秒 RSS