执行Dll期间进度条不显示 [英] Progress bar increament during execution of Dll

查看:172
本文介绍了执行Dll期间进度条不显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
使用dll进行大型项目实施的出色技术,但很难实施,但存在很多里程碑式的问题.

新的早晨,我的新DLL问题!!!!
__________________________________________________________________________________

当我通过编译实现dll时,出现了一些代码.
就像我根据用户选择创建一个.cpp和.h文件,然后使用GNUIM g ++和c ++编译器进行编译. 一切都很棒!
但是当我考虑到Progressbar时出现了问题.
那就是随着编译进度,我会根据编译文件增加进度栏.
但是编译会保留maitain dll,因此我如何根据DLL项目中的文件编译来增加主调用项目的进度栏.
___________________________________________________________________________________
欢迎所有相关的帮助,链接,代码块

Hello All,
Greate techonology using dll for big project implementation but so hard to implement with lots of milestone problem.

New morning my new DLL problem!!!!
__________________________________________________________________________________

As i implemented dll fro compilation some code.
Like i create a .cpp and .h file as per user selection and compile i with GNUIM g++ and c++ compiler.
Things work greate!!!
but problem arised when i consern Progressbar.
That is As compilation progress i increase progressbar as per compilation files.
but compilation has saparate maitain dll so how i increase progress bar of main calling project as per compilation of files in DLL project.
___________________________________________________________________________________
ALL related HELPS ,LINKS,CODE BLOCK are welcomes

推荐答案

也许有帮助吗?

http://www.eggheadcafe.com/software/aspnet/33631809 /progress-bar-in-dll--thread.aspx [
maybe this help ?

http://www.eggheadcafe.com/software/aspnet/33631809/progress-bar-in-dll--thread.aspx[^]


这是控制反转的问题,请参见http://en.wikipedia.org/wiki/Inversion_of_control [ ^ ].

就您而言,问题是:您的DLL提供了一些要在主机应用程序中使用的资源.如果您的应用程序是唯一的因果关系来源,那么您将无法解决问题,因为只有您的主机应用程序会触发呼叫.您需要倒转情况:您的DLL需要调用某些东西来触发事件,从而在主机的UI中呈现一个步骤.解决方案是回调方法. DLL中的类应接受回调并调用此回调(让我们说"OnProgressStep");主机应用程序应提供回调代码.

—SA
This is a problem of inversion of control, see http://en.wikipedia.org/wiki/Inversion_of_control[^].

In your case the problem is: you DLL provides some resource to be used in a host application. If your application is the only source of causality, you cannot solve your problem, because only your host application triggers a call. You need inverted situation: your DLL needs to call something which triggers the event presenting a step in the host''s UI. The solution is a callback method. A class in a DLL should accept callback and call this callback (let''s say "OnProgressStep"); a host application should provide a callback code.

—SA


这篇关于执行Dll期间进度条不显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆