|
same as atan2f. didn't time it but you can tell by looking at it.
|
|
|
|
|
I'd be interested in seeing the results of a native C++ and managed C++ test programs. Just a simple loop calling atan2 in C++ or the dotNET version for the managed version. Having two seperate simple apps would take a lot of potential causes out of the mix. I thinking perhaps its related to the mixed mode assembly.
Steve
|
|
|
|
|
hi
i need to change the Language (in language bar) every time i set the focus on my Window ( like English to German ). my program is in c#. I thought i should use API to do this. so anybody know such an api Function? or is there another way to do it?
thanks
|
|
|
|
|
hamidreza_buddy wrote: my program is in c#.
So what kept you from here?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I said i thought i have to use API. so this is why i asked my question here. i dont think there is a direct way to do such a thing in c#.
|
|
|
|
|
A C# question on the C++ forum
|
|
|
|
|
i must do robot simulation with opengl.i m senior student of electric-electronic engineering and in my greduation work i must control robot arm and its simulation.i dont know anything about opengl if anyone can help me about opengl so i ll be very pleasure.
http://www.pololu.com/products/elenco/0325/
this is my robot arm.
|
|
|
|
|
This[^] is an excellent guide to learn about OpenGL.
|
|
|
|
|
I used a splitter window in my app, which split mainframe into two views (left and right). But I found that CSplitterWnd modifies the right view's size while remains the left one's in default when I drag the left edge of mainframe.
What I need is remaining of the right view's size. I implemented the OnSize func of mainframe, in which I call the SetColumnInfo to fix the right view. However the effect is not so good that you can see the right view flash because MFC modified the size of right view first then you alter it back to the original size in turn. That's bad.
And also I have tried handling WM_SIZE in SplitterWnd. It doesn't work either. The point is that MFC would do it before you receive WM_SIZE.
So, hope you can help me, thanks.
|
|
|
|
|
YUNAJAPAN wrote: However the effect is not so good that you can see the right view flash because MFC modified the size of right view first then you alter it back to the original size in turn.
Are you calling CSplitterWnd::RecalcLayout() on the splitter wnd after using SetColumnInfo() ?
If you are doing the SetColumnInfo/RecalcLayout in the frame's OnSize() then the view pane
shouldn't flash because it doesn't get resized.
|
|
|
|
|
Yes, I did called RecalcLayout.
I placed AfxMessage in SplitterWnd, so you can see what MFC did before it sent WM_SIZE because the GUI would be sticked until the message box return. I found that the view's size has been changed when the box show. Then after your clicking of OK button, the size of view is restored to the original due to SetColumnInfo/RecalcLayout.
I want to find the first place where MFC change the view's size.
Thank you for replying.;)
|
|
|
|
|
You should only need to respond to WM_SIZE in the frame window class of the window containing the
splitter wnd, something like
void CMyFrameWnd::OnSize(UINT nType, int cx, int cy)
{
CFrameWnd::OnSize(nType, cx, cy);
pSplitterWnd->SetColumnInfo(...);
pSplitterWnd->RecalcLayout();
}
RecalcLayout() will change the view sizes - you don't need to do that (it happens in
CSplitterWnd::OnSize(), where RecalcLayout() is called again).
You shouldn't be handling WM_SIZE in SplitterWnd unless you are sure to call the base class.
You can also try (in the above example code) getting the client rect and calculating the width
of column 0 (clientrect.Width() - desiredwidthofcolumn1) and using SetColumnInfo() on column 0
instead of column 1. That works for me no problems.
|
|
|
|
|
Perhaps only responding to WM_SIZE in frame is not enough, friend.
I have tried the code above at first (certainly in framewnd), but it flash. If you don't believe that, try this code:
void CMyFrameWnd::OnSize(UINT nType, int cx, int cy)
{
CFrameWnd::OnSize(nType,cx,cy);
AfxMessageBox("I am a good man");
pSplitterWnd->SetColumnInfo(...);
pSplitterWnd->RecalcLayout();
}
You will see what happened to the splitter bar. It likes these steps:
1. move from right to left;
2. I am a good man;
3. move back to right(the original position).
So step 1 and 3 made it flash. I want to find out a method that MFC don't move the splitter bar.
|
|
|
|
|
Something else is going on then. I use many splitters and have no problem.
Maybe the flash is the way you are redrawing the view?
Having a message box in the WM_SIZE handler is a bad idea
|
|
|
|
|
The things are like this: I make an MFC program in Visual Studio 2005, and the program_name.exe doesn't work on a computer that doesn't have the Visual Studio 2005 installed on it (but it does have Visual Studio .NET 2003). How can I make the program_name.exe work on every computer? How do I make an install file for my program?
Thanks
|
|
|
|
|
I am having the same problem.
I have a program created by VS 2003 and then upgraded to VS2005.
There is an error when running on computer that doesnt' have the VS2005.
One thing that I did to solved that problem was downloading DotNet FrameWork 2.0 and its SDK.
http://www.microsoft.com/downloads/details.aspx?familyid=0856eacb-4362-4b0d-8edd-aab15c5e04f5&displaylang=en[^]
Try it to see if it works for you.
I have the other application using VS C++ 6.0 then I upgraded to VS 2003. Everything is working well on any computer until I upgraded to VS 2005. I am getting the following error message:
"This application has failed to start because the application configuration is incorrect. Reinstalling the application may fixt this problem. "
Same like you.. all the computer has VS2003 but not VS 2005 but I have FrameWork 2.0 installed on those machines. Don't know how to solve that problem yet..
If anybody knows, pls tell me what I should do.
Thanks.
|
|
|
|
|
You need to install the VC2005 redistributables on other computers. Look in %VCDIR%\sdk\v2.0\bootstrapper\packages and you'll see vcredist dirs for the various CPUs. Run the appropriate installer on the other computer.
|
|
|
|
|
You probably compiled with MFC DLLs instead of statically linking. You have two choices:
1) Provide the MFC redistributable files with your app
2) Re-compile your application with MFC statically linked.
If you're not using MFC extension DLLs, there's really no reason to link dynamically.
Consider this
- linking statically to MFC with a basic (minimal) app generates an EXE file of about 250k, but that's the only file you have to ship.
- linking the same app to MFC DLLs generates an app of about 128k, but you have to include additional DLLs that are several megabytes in size.
As the app grows and you use more of the MFC library, it really doesn't matter how you link, but IMHO, the best practice is to avoid dynamic linking if at all possible.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Hi,
I have a c++ project created by VS 2003 and VB project. They are on intranel network. The application runs OK on network. However, once I upgraded them to VS2005, the application (.exe) doesn't run on the machine that doesn't have VS2005 anymore and I got the error messages saying
Error message for application created by C++
==============================================
"This applicatino has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem."
Error message for application created by VB
============================================
"Ojbect can't create"
I made the research and found out that in order to run any application, created by VS 2005, on the machine that doesn't have VS 2005 installed, I need Framework 2.0
So I downloaded
Dot Net Framework 2.0 and SDK (setup.exe) (http://www.microsoft.com/downloads/details.aspx?familyid=0856eacb-4362-4b0d-8edd-aab15c5e04f5&displaylang=en[^])
The problem solved for application created using VB but not for C++.
What am I missing? I rearch again.. and found out I need WindowsInstaller 3.1 so I downloaded again and still not working.
Could you please help me what do I need to do so the C++ application will also run on the machine that doesn't have VS 2005 installed.
Thank You.
-- modified at 13:04 Thursday 8th February, 2007
|
|
|
|
|
|
|
What's the exact error message you see now?
|
|
|
|
|
Hi Mark,
I'm getting this error message. My proj was first created in VS 2002, then upgraded to VS2003. No problem on running on any machine. but once I upgraded to VS2005, I got following error message.
Error message for application created by C++
==============================================
"This applicatino has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem."
|
|
|
|
|
I don't know if this helps. From the docs for the error message:
If a manifest is present in your application but a required Visual C++ library is not installed
in the WinSxS folder, you may get one of the following error messages depending on the version of
Windows on which you try to run your application
|
|
|
|
|
Oh any information is really helpful for me.
And I just looked at it. I think this is it.
I'll try to work out with it and see if I can get it.
^_^ if I stil can't get it, I'll come to to GURUS like you.
Thank you so much Mark.
|
|
|
|