C++Builder中使用dll的问题

老魏2006 2000-05-23 07:43:00
求助:
在C++Builder使用自己建立的动态链接库的程序,每一个窗口,都在任务条中显示,如何避免这种现象?
即:程序中只有主窗口才出现在任务条中。





...全文
195 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
deng_deng 2000-06-05
  • 打赏
  • 举报
回复
我使用LoadLibrary然后显示对话框,好象没出现您所描述的现象,不妨强制消除消除任务栏图标,使用SetWindowLong(Handle, GWL_EXSTYLE, WS_EX_TOOLWINDOW and GetWindowLong(Handle, GWL_EXSTYLE));

这个BBS有问题,单目“或”运算变成了“and”~~~~~~~~~~~~`

and 应该为单目“或”运算!!
老魏2006 2000-05-27
  • 打赏
  • 举报
回复
但是,我发现Parent属性只针对两个窗口合并是有用,其它时候,它通常是0。
老魏2006 2000-05-25
  • 打赏
  • 举报
回复
C++Builder程序,如果使用了自己用C++Builder制作的Dll,那么,程序中所有的窗口(即TForom派生出的窗体),在Windows任务栏中,都能找到。即:如果程序中同时出现类两个窗口,入一个主窗口和一个对话框,那么。这两个窗口,在任务栏上都可以看到它们的标题,既可以通过任务栏切换这两个窗口,但正常情况下,是不能出现这个问题的,即:一个程序在任务栏上,只能有一个标题(一个按钮)。
请问:如何解决?
Wingsun 2000-05-25
  • 打赏
  • 举报
回复
每一个窗口都有一个Parent的属性,指明它可以使窗口附属于不同的父窗口。出现在任务条中表示他附属于桌面。
halfdream 2000-05-25
  • 打赏
  • 举报
回复
不明白你的意思。
1)VsDll为vs2010工程,编译生成动态库。 2)BCBCall为bcb工程,调用动态库 3)Viewdll.exe为查看DLL导出文件的工具。 注意事项一: VSDll里面有一个 KpHttps.def LIBRARY "KpHttps" EXPORTS InitKpHttp Project > Properties... > Linker > Input > Module Definition File 里面加入你刚才的KpHttps.def文件,重新编译就行了。出来的InitKpHttp函数前面没有下划线,后面没有@8或者@ABCDEF之类的。 注意事项二: 用C++Builder的implib工具生成DLL对应的lib文件。如:implib xx.lib xxx.dll。 生成lib文件之后,C++Builder便可以使用这个lib文件了。 注意事项三: 文件头的声明应该完全一样,否则(呵呵),会出现链接错误。 #ifdef DLL_API #define DLL_API extern "C" _declspec(dllexport) #else #define DLL_API extern "C" _declspec(dllimport) #endif #ifdef __cplusplus extern "C" { #endif DECLDIR int __stdcall InitKpHttp(void); DECLDIR int UnInitKpHttp(void); DECLDIR int KpHttpRequest(char *strurl,char *strhost,char *strresult,int &resultle;); DECLDIR int KpHttpsRequest(char *strurl,char *strhost,char *strresult,int &resultle;); DECLDIR int KpHttpPost(char *strurl,char *strhost,char *strPost,int postlen,char *strresult,int &resultle;); DECLDIR int KpHttpsPost(char *strurl,char *strhost,char *strPost,int postlen,char *strresult,int &resultle;); DECLDIR int KpUpLoadFile(char *strurl,char *strhost,char *filebuf,int filelen,char *strresult,int &resultle;); DECLDIR int KpDownLoadFile(char *strurl,char *strhost,char *filebuf,int &filelen;,char *strresult,int &resultle;); #ifdef __cplusplus } #endif

13,825

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder相关内容讨论区
社区管理员
  • 基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧