|
|
Thanks for the link to your blog Nish. I think I will implement your idea. Your blog looks very interesting, I will have to take some time and explore it some more.
I think I will have to take some time and rethink how I am approaching my problem. I will take your idea of the flag into consideration, as well as palbano's idea of using FindWindow (even though I do not really care for that idea, but FindWindow may be needed here.)
Thanks.
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
Hi PJ,
Tis early monday morning here and I've only had one cup of coffee.;) How about one thread that looks after the dialip etc. and it has a flag along the lines Nish mentioned. Other threads would query a flag back in the main app thread to test if the dialup is active.
TerminateThread() is bad as you indicate. Peter Hancock's article "An exception safe OO thread-pool framework" http://www.codeproject.com/threads/threadlibrary.asp[^] uses a neat trick of raising an exception in the thread to kill it. The thread pool itself is very good IMO.
Instead of a separate thread for each email, how about a single thread with a queue. Once an email has been successfully sent it would be removed from the queue. Iterate the queue untill all emails have been sent.
Hope that helps.
Neville Franks, Author of ED for Windows www.getsoft.com and coming soon: Surfulater www.surfulater.com
|
|
|
|
|
Thanks for the ideas, Neville.
This gives me some differnt ideas that I will have to think about.
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
I'm looking for a good built in bug tracker/reporter that can ship with the released product. It would give me detailed information on where the crashed happened (source level) and why, something like a C++ stack trace. Does anything like this exist ?
thanks
|
|
|
|
|
|
|
|
hi
i wrote an active x control with the microsoft visual studio .net
it handles the output from my webcam and lets it start and stop.
everything works fine, but just if I run the control on my computer.
on another maschine (also win xp) the control doesnt start in the
browser. (security settings allow it) i suppose i need to pack
some dlls into a cab file.
how do i find out which dll i need to pack into the cab file?
and how do i write the inf document.
beside the standard imports from an atl control project i just
added #include <Vfw.h> for the webcam functinality
these are the standard imports:
#include <afxctl.h> // MFC support for ActiveX Controls
#include <afxext.h> // MFC extensions
#include <afxdtctl.h> // MFC support for Internet Explorer 4 Comon Controls
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT
// Delete the two includes below if you do not wish to use the MFC
// database classes
#include <afxdb.h> // MFC database classes
#include <afxdao.h> // MFC DAO database classes
#include <windows.h>
|
|
|
|
|
Use Depends.Exe to see which other DLL you might need.
If you can not find Depends.Exe, then you can use Process Explorer from www.sysinternals.com to watch your program while it is running. Youc an see which DLL the EXE has loaded.
I am not sure about the INF document.
|
|
|
|
|
I am working on one project .for that i want to use different color and different size of static text on dailog box how can use such a customisez text on dailog box ?
|
|
|
|
|
|
Hi,
Is it possible to place a whole dialog resource in a DLL?
I am tring to place one of the message box dialogs in to a dll so I can use it in all my applications.
The problems I'm having is that I have to add a dialog resource to my application and that when DoModal is called on the dialog, -1 is returned and the dialog is not displayed.
Do anyone have any advice.
Cheers
Mark
|
|
|
|
|
Resources are normally loaded from the application, as you have noticed. But calling AfxSetResourceHandle , you can change this, however. Create a function in the DLL handling the DoModal of the dialog. You might also want to check the AFX_MANAGE_STATE on MSDN.
|
|
|
|
|
Thanks alot, got it working. Got one small problem left though. When I call AfxGetAppName() in the dll it generates an assert.
Is there any other way of getting the application name?
Again Thanks
Mark
|
|
|
|
|
GetModuleFileName with NULL for the hModule -parameter should do the trick.
|
|
|
|
|
Hi!
when your DLL is loaded, you have to store
the Handle of it somewhere in your DLL...
and then create something like this:
CDialog * CreateBox() {
HINSTANCE hMainRes = AfxSetResourceHandle(_SavedHinstance);
CMyBox pBox = new CMyBox();
AfxSetResourceHandle(hMainRes);
return pBox;
}
or somthing similar....
|
|
|
|
|
i don;t know why you facing the problem
i myself using the dialog box from MFC Ext DLL.
if you want some sample code i will give you
I Think It will Work
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
Hi,
I'm trying to draw an arrow in a DC. i have a line, consisting of the starting point(aa) and the ending point(bb). (CPoint variables) I do a Moveto (aa) and then a LineTo (bb).
What i want to do, is like a triangle, the end of an arrow (or just two lines), but i haven't came up with ideas. The problem is that the line can be in any direction, not just horizontal or vertical.
how could i do that with just aa and bb(the start and end of the line)??
thanks!!
|
|
|
|
|
If you want to use GDI+ you can use the Pen::SetStartCap() and Pen::SetEndCap() functions to have GDI+ draw the arrow heads for you. AFAIK, with GDI you have calculate and draw the arrow heads yourself.
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
I'm using visual c++ 6.0, can i use GDI+?
|
|
|
|
|
|
thanks!
i'm getting this error:
fatal error C1083: Cannot open include file: 'gdiplus.h': No such file or directory
should i download microsoft's latest sdk?
sorry for the questions, i'm kind of a beginner in this
|
|
|
|
|
yes, which is explained in this article on codeproject
http://www.codeproject.com/vcpp/gdiplus/startinggdiplus.asp[^]
which you can find by doing a Google search. You will find that productivity in software development is directly related to your ability to search for, read and understand documentation, articles and examples... even the bad ones
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|