|
The result is supposed to be Π/4 because the result is in radians, not in degrees.
|
|
|
|
|
Hi wavk;
atan(1) is 45, as long as 1 is in degrees.
All the trig functions in C are in radians which give you 0.785...
This might be your problem.
|
|
|
|
|
i've recently installed win2k. now, when i use class wizard to add a message handler, when i hit OK, i get a message about how VC was unable to copy this or that temp file, or that the file CW was working on was unable to be written, etc..
has anyone else seen this?
could it be related to NAV?
-c
Smaller Animals Software, Inc.
http://www.smalleranimals.com
|
|
|
|
|
I don't have any problems (not running NAV, though). Are the resource files resource.h and app.res) read-only?
To hell with those thin-skinned pillow-biters. - Me, 10/03/2001
|
|
|
|
|
nope....
it usually happens on the .CPP for the window i'm working on. more than once, it's told me that it can't write the CPP (after adding the new message handler) and that my only chance of recovering the .CPP is to go out and look inside a particular temp file. scary sh*t.
-c
Smaller Animals Software, Inc.
http://www.smalleranimals.com
|
|
|
|
|
Chris
I am using VC++ 6 SP5 on Win 2000 SP2 with NAV Corporate. I won't lie and say I do heaps of development but I have not run into this problem.
Did you upgrade to Windows 2000 over some earlier operating system? Or did you mean upgrade as in new machine and OS?
When you say message handlers you mean like ON_CLICK for a buton (as a weak example)?
If you give a little more detail I will try to reproduce on my installation.
Michael Martin
Pegasystems Pty Ltd
Australia
martm@pegasystems.com
+61 413-004-018
"Don't belong. Never join. Think for yourself. Peace"
- Victor Stone
|
|
|
|
|
new machine with Win2K pre installed, vc 6 (sp 5, i think), new Dell P-4 1.7.
When you say message handlers you mean like ON_CLICK for a buton (as a weak example)?
yep. it seems to happen pretty much any time CW has to write into a .CPP file - message handler, Afx* override, etc.. it looks like CW copies the original .CPP to a temp file, modifies the temp, deletes the original then copies the temp to the original's place. only, on my system, it sometimes fails to delete the original, or fails to copy the temp onto the original. sometimes it tells me it can't write the .CPP because some other app is using the file.
i've got NAV set so that it doesn't scan .CPP or .H files, so i'm not sure it's the problem. but, NAV is the only other app i can think of that would be opening files without consent.
-c
Smaller Animals Software, Inc.
http://www.smalleranimals.com
|
|
|
|
|
I am using MFC without the Doc/View architeture, its a dialog based WinCE application. Anyhow, I use Structured Exception Handling, if any exception occurs the software reports out the exception information, I then want to kill the software as cleanily and quickily as possible.
Best way of doing this pls ?
Regards
Ray
"Je Suis Mort De Rire"
|
|
|
|
|
Ray
Try PostQuitMessage(0); , that should do the trick.
Norm Almond
Chief Technical Architect
FS Walker Hughes Limited
|
|
|
|
|
I can't remember how to get a Program to play a sound, It was like playSound("ss.wav.") somthing like that .
One more thing, I need a way to change the titel(Caption) In a dialog window, in the program while it is running, how?
Thank you
|
|
|
|
|
>I can't remember how to get a Program to play a sound, It was like playSound("ss.wav.") somthing like that
PlaySound defined in Winmm.lib MMSystem.h
>One more thing, I need a way to change the titel(Caption) In a dialog >window, in the program while it is running, how?
SetWindowText
Michael
|
|
|
|
|
you are chasing PlaySound(LPCTSTR) ...
Regards
Ray
"Je Suis Mort De Rire"
|
|
|
|
|
Thanks, that infomation was just what I needed...
|
|
|
|
|
Can you show me how to make the background transparant of a CDialog?
I preferably want code example!
|
|
|
|
|
check out some examples here at codeproject in the Windows 2000 section
regards
|
|
|
|
|
How VC processes the internal "divide" process ( I mean at the "bit" level)?
My project at hand is to simulate the "divide" process that VC does.
Is there any suggestions or articles about this topic?
Thanks,
Maer
|
|
|
|
|
If I use the function "LoadLibrary" to load a DLL, shall I release it after using?
How can I release it?
Thanks,
Maer
|
|
|
|
|
Yes, use FreeLibrary(HINST).
Unless you use it for the duration of your app. It will be released automatically when the process terminates.
Cheers
Steen.
"To claim that computer games influence children is rediculous. If Pacman had influenced children born in the 80'ies we would see a lot of youngsters running around in dark rooms eating pills while listening to monotonous music"
|
|
|
|
|
Thanks Steen!
You have resolved my trouble, thanks pal!
Best regards,
Maer
|
|
|
|
|
|
A VB ActiveX control.
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
I'd like to show a unactivated dialog without disturbing the the user. So I want to move this dialog to a position where the neither the caret nor the mouse possesses. What should I do? Thanks a lot.
Tiny Flying Elephant
I love flying...
|
|
|
|
|
GetCaretPos will return caret position using client coordinates. You'll have to convert that into screen coordinates with ClientToScreen.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Suppose i know the name of a computer of my network...how do i find shared resources belonging that computer (like those which appears in Network neighborhood)?
I also mention that FindFirstFile("\\\\comp_name\\directory_name\\*.*",...) WORKS.IN COMMAND PROMPT DIR \\comp_name\\directory_name WORKS TOO.
But FindFirstFile("\\\\comp_name\\*.*",....) fails. IN COMMAND PROMPT dir \\comp_name FAILS TOO. IN EXCHANGE, NET VIEW \\comp_name RETURN EXACTLY WHAT I NEED.
My conclusion is FindFirstFile doesn't solve my problem. I tried WNet but i failed...
Thank you all.
|
|
|
|
|
Hi,
you can do it using this functions:
WNetOpenEnum
WNetEnumResource
You'll find all the information on MSDN.
I wrote a little program that walks through all machines in the local network looking for shared directories (it was 3 or 4 years ago), this is a snippet:
void CNetScanDlg::StartScan()
{
ULONG ulDataSize = 16000;
NETRESOURCE* pData = new NETRESOURCE[ulDataSize];
DWORD dwEntries = 0xFFFFFFFF;
OpenContainer(NULL);
delete [] pData;
}
BOOL CNetScanDlg::OpenContainer(NETRESOURCE* pNetRes)
{
//Datos necesarios para la API de NetWorking
ULONG ulDataSize = 16000;
NETRESOURCE* pData = new NETRESOURCE[ulDataSize];
DWORD dwEntries = 0xFFFFFFFF;
DWORD dwResult;
HANDLE handle;
//
dwResult = WNetOpenEnum(RESOURCE_GLOBALNET, RESOURCETYPE_ANY, 0, pNetRes, &handle);
if( dwResult == NO_ERROR )
{
dwResult = WNetEnumResource( handle, &dwEntries, pData, &ulDataSize);
if( dwResult == NO_ERROR )
{
for( DWORD i = 0; i < dwEntries; i++)
{
AddItem( pData[i] );
if(RESOURCEUSAGE_CONTAINER == (pData[i].dwUsage & RESOURCEUSAGE_CONTAINER))
{
OpenContainer( &pData[i] ); //Recursividad
}
}
}
}
delete [] pData;
return FALSE;
}
Andres Manggini.
Buenos Aires - Argentina.
|
|
|
|