|
How about a link?
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
the application sends this error when compiling, I am not using MFC, I use the Win Api 32 with #include <windows.h>, but the ping classe is designed for MFC, somebody has another solution for monitor a ping to a device?
c:\archivos de programa\microsoft visual studio\vc98\mfc\include\afxv_w32.h(14) : fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h>
thanks
|
|
|
|
|
So you want a solution that does not use MFC. Is that correct? You could take what you already have and redirect it to a temporary file and then parse the contents of that file. Something like:
ShellExecute("ping a.b.c.d > ping.out", ...);
I don't know if this would actually work as I've not tried it, nor would I opt for this type of solution.
A more preferred solution would be to use the ICM protocol directly. Examples are plentiful.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
A numpty question I think
I declare a CList in my header (VC6)
public:
CList (less than)CString, CString&(greater than) wordList;
Compiles fine but when I go to use it in a helper function I get an error.
if (!AfxIsValidAddress(pOb, sizeof(CObject)))
{
TRACE0("ASSERT_VALID fails with illegal pointer.\n");
if (AfxAssertFailedLine(lpszFileName, nLine))
AfxDebugBreak();
return; // quick escape
}
If I then go and add the CList declaration into the helper function and comment
out the header declaration it all works fine.
Any Ideas?????
Confused!!!!
Dave
|
|
|
|
|
Why not just use the CStringList class?
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Last time I just built my own linked lists using CStrings, I just thought this time I'd try one of the in built templates. The question is more why cant I use this when it is declared in my header but can if declared in the function it's being used in.
I'll have a look at CStringList though!!
Thanks, Dave.
Dave
|
|
|
|
|
Hi.
I need help for create in vc++.net/vc++6 .
When I create template class in vc++ it gives error.
My code is like this :
template <class t="">
class p : public q
....
(I already write it in c++5 , it worked right)
Thank you
|
|
|
|
|
What is the error?
- Mike
|
|
|
|
|
Is there any way of setting toolbar buttons text NOT TO ALL buttons? I mean, buttons which do have text, should have proper size, and buttons which DO NOT have text should be of standard size (something like 24x23 etc.) All my attempts to set button info via CToolbarCtrl::SetButtonInfo() were doomed to failure .
|
|
|
|
|
Sure, if you can group your large an small buttons. Just add another toolbar with the larger buttons. Also if you wish to do it programatically you must leave MFC and build a win32 app.
Best Wishes,
ez_way
|
|
|
|
|
Hi All...
Do any one of you know how to get the MAC address of a system... using SNMP...?
If so, Can u say me the OID that is to be used other than 1.3.6.1.2.1.2.2.1.6
can u pls help if u know...?
Regards,
A.Ilamparithi
|
|
|
|
|
Have you looked at this?
http://www.codeproject.com/internet/getmac.asp
Best Wishes,
ez_way
|
|
|
|
|
Hi Baldwin
Thanks for reply..
I had already seen the getting MAC address using Netbios.
But,i need to get MAC Address using SNMP.
Thanks.
Best Regards,
A.Ilamparithi
|
|
|
|
|
Look at P.J. Naughter class on sntp and see if that might work.
Best Wishes,
ez_way
|
|
|
|
|
Does GetAdaptersInfo() help?
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
I have problem with sizeof() function in my VC++ 6.0 compiled project
struct A
{
short b;
char c;
}a;
int t = sizeof(a); gives me t=4;
----------------------------------------
I think it have to be 3
struct A
{
char c;
}a;
int t = sizeof(a); gives me t=1; all right
struct A
{
short b;
}a;
int t = sizeof(a); gives me t=2; all right
I think that I have some problem with my project settings but I do not what.
In some other projct the sizeof() works in way a want it gives 3 for the structure above.
Can someoen explan the reason of the sizeof() function behavier.
Thank you in advance,
Seval YILMAZ
|
|
|
|
|
struct elements are aligned to boundaries (particularly word boundaries) to improve performance. Use #pragma pack(push,1) and #pragma pack(pop) to align a struct on byte boundaries:
#pragma pack(push,1)
struct A
{
short b;
char c;
}a;
#pragma pack(pop)
- Mike
|
|
|
|
|
In a program I'm making, a call to StretchBlt seems to take a very long time. But when I run Windows Media Player (or Real One Player) and play a movie file, and then run my program, StretchBlt works great. But then when I close the media player and run my program again, StretchBlt takes a very long time again. Anyone know what's going on?
-any help is appreciated...
|
|
|
|
|
???
Are you sure that that is what is happening???
|
|
|
|
|
Yep. It's driving me crazy! I just tried it again: I run my program, it draws slowly. I run Window Media Player, it still draws slowly. I play an .AVI file in Window Media Player, it draws very quickly. I close Window Media Player, it still draws very quickly. I reload the image after Window Media Player is closed, it draws slowly again!!! (BitBlt works fine, just StretchBlt is slow)
When I use a program called Process Explorer from Sysinternals, it shows Window Media Player loading a bunch of .dlls when it opens a movie file. I was thinking one one those dll somehow makes StretchBlt run faster. I know that sounds weird. I have no idea really...
|
|
|
|
|
Is the problem occuring while your progam is running?
(1) Run Media Player, (2) Run my program.
(2) Run my program, (2) Run Media Player.
The idea here is to determine if the DLL is loaded into memory, if it is loaded in memory some where then the time to load it into your memory space may have been reduced. If it has not been previously loaded by another program then it may take longer.
I recommend that you do not use StretchBlt(), but create a DIB section and then select it into a memory device context. Once it is in a memory device context then you can treat it the same as any other bitmap.
I am in the process of developing a bitmap editor and have found no reason to use StretchBlt().
INTP
|
|
|
|
|
If I have a CWnd pointer - or a handle - how can I determine the type of the control (button, static, etc.)?
|
|
|
|
|
You could try using the GetClassName() API function, it returns the name of the windows class, then you could check for it in a switch for the names of common controls (check MSDN for them).
Another approach for MFC might be using the IsKindOf() function.
Hope this helps.
|
|
|
|
|
Thanx (especially, because it was quick). I just tried GetClassName; it's beauty is, that I don't have to know the class name; I can get it from a known control and compare it later with the unknown (not as if it would be a problem to remember "Button").
|
|
|
|
|
Glad it worked 4 U
|
|
|
|