|
You'll be able to debug programs with the VS7 debugger still, it just won't pop up as the just in time debugger when a program crashes (a program that's not running in a debugger that is).
Chris Richardson
|
|
|
|
|
John Robbins' book Debugging Applications for Microsoft .NET and Microsoft Windows (MS Press, 2003) includes a sample called DBGCHOOSER, which enables you to pick a debugger for the current debugging session.
There was a previous version in his MSDN Magazine Bugslayer columns, but that version doesn't work properly with VS.NET. The Visual Studio .NET just-in-time launcher, VS7JIT.EXE, requires that it is the entry in the AeDebug key's Debugger value in order to work.
|
|
|
|
|
I want to have my applications be alerted when the network status changes (connected/unconnected). What library do I need to look at for these functions?
As a related note I would like to be able to be notified of PCMCIA events. Mainly a card being plugged in or unplugged.
Can anybody point me in the right direction on these issues? Thanks
Jared
jparsons@jparsons.org
www.prism.gatech.edu/~gte477n
|
|
|
|
|
How do I detect the drive a program is currently running on??
|
|
|
|
|
Use GetModuleFileName(NULL, ...) .
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Hi,
I'm having problems with the UpdateDriverForPlugAndPlayDevices() service in the DDK. For example the driver installation sample \2600.1106\src\setup\install works fine in WinXP Pro and the output is (xxx = correct hw id):
<br />
...<br />
Found! [xxx]<br />
Driver Installed successfully.<br />
But in W2000 SP3 it fails:
<br />
...<br />
Found! [xxx]<br />
UpdateDriverForPlugAndPlayDevices FAILURE: (0xe0000203)<br />
So it finds the device matching the given hardware id but fails to install the drivers. That error code means ERROR_NO_DRIVER_SELECTED but this information doesn't help much. What could be causing this behavior?
According to the DDK documentation this feature should be supported in ME, 2000 and XP but I'm able to use it only in XP Pro and Home. I compile with VC++6.0EE in Win Xp Pro.
- Jussi
|
|
|
|
|
I created a COM dll and inside one of the methods I create a thread(A) that creates a modeless dialog and a second thread(B)(Not from Thread A) that does some background work. My question is whenever I try to cancel(DestroyWindow()) the dialog I get an assertion error, I assuming it has to do with the second thread(B) updating the dialog box controls. I tried killing the threads(A and B), but still the same problem. I'm using AfxBeginThread and AfxEndThread. Is this approach good as I described above, or is there a better way of doing this.
Thanks
|
|
|
|
|
What is the assertion?
Thread B should NOT be updating anything that belongs to thread A. At most, thread B should post a message to thread A. Read these two articles for thread communication:
http://www.flounder.com/uithreads.htm
http://www.flounder.com/workerthreads.htm
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
DavidCrow wrote:
Thread B should NOT be updating anything that belongs to thread A
Unless these data are protected, with a mutex, for example.
New, what do you own the world?
How do you own disorder?
|
|
|
|
|
How can I get a simple line onto my dialog? I want a line just like HTML's [hr] tag.
Also, any links to tutorials on using the VS.NET dialog editor would be much appreciated.
Thanks,
Adam
My code isn't buggy. Those are all fleatures.
|
|
|
|
|
One way I've found is to create a button that's one dialog unit in height. Normally the dialog editor won't let you create a button this small, but you can press Alt while dragging to override its minimum size requirements (VC 6, eVC 3 - not attempted in VS.NET).
|
|
|
|
|
That did the trick! Thanks!
My code isn't buggy. Those are all fleatures.
|
|
|
|
|
I want to update a list control (that already contain images) and change the image from x to y.
Can I do that without delete the item and insert new with the y image.
Can someone help with this?
CanopenR
CanopenR@dtu.cc
|
|
|
|
|
LVITEM lvi;
lvi.mask = LVIF_IMAGE;
lvi.iImage = ?????;
SetItem(&lvi);
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Thank you, it worked liek a charm, after i filled it...
CanopenR
|
|
|
|
|
Hi everybody
I found an expression to print the real height of a font
-MulDiv(font.GetHeight(),GetDeviceCaps(GetDC()->GetSafeHdc(),LOGPIXELSY),72));
but when I print a text, the font height is not the real height, is smaller. I compare it with microsoft word height font.
The question is, What can I do to print the real height font?
|
|
|
|
|
This is a method in a CWnd derived class, I guess.
The call to GetDC() is getting the DC of the window, not the DC of the printer, so you need to use that HDC instead.
If you're using MFC Document/View, then a CDC* is passed into OnBeginPrinting(), and you can plug that in, in place of GetDC() in your code.
Incidentally, are you doing a corresponding call to ReleaseDC() somewhere?
Steve S
|
|
|
|
|
Yes, I use MFC document/view, and I use the CDC* passed into OnPrint(), GetDeviceCaps(pDC->GetSafeHdc(),LOGPIXELSY), but doesn't work.
|
|
|
|
|
OK, then in that case, when you say it's the wrong height, what exactly does that mean?
Here are some examples;
(a) the text is slightly smaller than the same text in Word
(b) The text is slightly larger than the same text in Word
(c) the text is way too small to read
(d) /* other option here! */
If (c), it's a mapping mode/device resolution issue.
If (a) or (b), then the definition of height is important.
Height = ascent+descent, with leading added between subsequent lines.
Steve S
|
|
|
|
|
for example in arial facefont
Word 12 points = 3mm height
My application 12 points = less than 1mm height
word 28 points = 7mm height
my application 28 points = 2mm height
I use MM_TEXT mapmode, so if you tell me
MulDiv(fh,72,GetDeviceCaps(pDC->GetSafeHdc(),LOGPIXELSY));
this function is the way to print the real height font, then I try found an error in my source code, I just want be sure about this function.
Thankyou!!
|
|
|
|
|
Ah. That explains it.
try
-MulDiv( fh, pDC->GetDeviceCaps(LOGPIXELSY), 72)
instead. I realised while I was driving home from the office that you have the params to MulDiv in the wrong order.
MulDiv(x,y,z) = (x*y)/z,
and font height in points is
(ht * dpi) / pts_per_inch
not
(ht * pts_per_inch) / dpi
Steve S
|
|
|
|
|
Can someone help me using function "IsDestinationReachable".
When I try to build my application, I got folowing error message:
OPFB error LNK2019: unresolved external symbol _IsDestinationReachableA@8 referenced in function "public: virtual int __thiscall MYPRGApp::InitInstance(void)" (?InitInstance@COPFBApp@@UAEHXZ)
If someone have some code examle how to use this function, please send me.
I include "Sensapi.h" and use library "Sensapi.lib".
Thank yoou !
|
|
|
|
|
u need have dll linked.
from help to find which dll file associated with the function.
includeh10
|
|
|
|
|
It's as simple as that. I don't know what else you've got in place that is causing this linker error. If I omit the Sensapi.lib, I get an LNK2001 error.
I was unable to find LNK2019. Is this a .NET project?
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Can you show me how (few lines) including how to create some LPQOCINFO ?
This is my source part that generate this error.
if ( IsDestinationReachable("www.google.com", NULL) == TRUE)
AfxMessageBox("Google ok !");
|
|
|
|