|
I have designed a program that acts like the oscilloscope. it uses Direct3D.
the problem is when the window of the program is deactivated or loses the focus, the program takes a big amount of cpu time. I don't know whats the problem.
Microsoft DirectX SDK samples also have this behavior.
|
|
|
|
|
most of the DirectX SDK samples have a Game Loop, a while loop for rendering scene, getting input, ... this loop tries to achieve maximum framerate (can be 500 fps) by repeating the task (rendering scene) in a loop, this can consume significant amount of CPU usage, you may try to avoid that processing to a reasonable framerate like 25 fps by inspecting correct framerate and do rendering when necessary. Even when the application is active, you may find significant CPU usage, when deactivate may be you are not rendering the scene making the Game Loop even tighter can cause more cpu usage. I suggest you to inspect the Game Loop and modify it.
|
|
|
|
|
Hello,
I have an application wherin there are a few classes in a dll and when I assemble the code I am getting this linker error.
TableFrame.obj : error LNK2001: unresolved external symbol "public: static struct CRuntimeClass const BaseFrame::classBaseFrame" (?classBaseFrame@BaseFrame@@2UCRuntimeClass@@B)
What must be the problem?
Pritha
|
|
|
|
|
are you trying to use runtime calss macros or related functions with class which does not support RTTI (means calss which is not derived from CObject)
|
|
|
|
|
|
Hi,
I have an activeX control which is similar to a List control. When I rightclick on ActiveX control a popup menu appears with menu items suppress and unsuppress. When I press suppress the data in ActiveX control disappears and unsuppress will show the data in ActiveX control.. I am facing a problem.. When user presses Suppress and even before the data gets hidden from ActiveX control if user again presses the Unsuppress menu item then a error message is logged.. I want to handle this situation.. I think of setting a Waitcursor immediately after user presses SuppressAll.. But when I am unable to Set Wait cursor with the following code snippet.
HCURSOR hWaitCursor;
LoadCursor(NULL,IDC_WAIT);
SetCursor(hWaitCursor);
ShowCursor(TRUE);
or
AfxGetApp()->DoWaitCursor(1);
Can anyone suggest me how to set wait cursor in the above scenario..
Thanks
Venkat
|
|
|
|
|
May be you can try by passing AfxGetInstanceHandle() to LoadCursor Instead of NULL??
|
|
|
|
|
I have tried with AfxGetInstanceHandle( ) to LoadCursor.. return value of LoadCursor is coming NULL.
|
|
|
|
|
Why are you calling ShowCursor Again you dont need to rite when you just changing the cursor?? OR are you hiding cursor before some where??
If you are hiding then try Showing cursor first and then set Wait cursor.
|
|
|
|
|
Cursor is not hidden anywhere.. I tried removing SetCursor also.. Cursor is not changing its shape.
|
|
|
|
|
Have you tried by removing ShowCursor() ??
|
|
|
|
|
Have you tried BeginWaitCursor() and EndWaitCursor() ?
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Thanks Rajesh.. It works now... Thanks a lot.
|
|
|
|
|
venkat.kupunaram wrote: Thanks Rajesh.. It works now... Thanks a lot.
You're welcome.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Hi all,
I want to use a static variable in a method. So I do it as follows.
class temp{
private:
static int count;
};
#include temp.h;
int temp::count = 10;
Is that ok, at the time it's working fine. I just want to know the way I tried is ok or not.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
Look Okay.
Regards,
Paresh.
|
|
|
|
|
Thanks a lot.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
Hello!
I want to program OpenGL with Visual C++ 2008.
How do I get the correct GL/glut.h files en library files installed on my pc? Where can I download the OpenGL library which belongs with the IDE?
Does Windows Vista already have this installed?
Please send me some hints.
Thank you, Ranger
|
|
|
|
|
GLUT is utility library provides windowing API for openGL, i believe it is not distributed with windows or platform SDK. you may need to download the latest distributable, can be from [GLUT download^]. if you mean open GL not GLUT, windows vista by default provides layered openGL over direct3D, it is not the fastest and supports upto openGL 1.4 only, but vista provides support to incorporate Vista-compatible ICDs(Installable Client Driver) to support latest advancements in openGL and those ICDs are provided by the hardware vendors. With platform SDK openGL headers are provided not GLUT. I believe OpenGL doesnot relate to VS IDE, if you installed or set the path to GL sdk you should be able to compile, for more info go to openGL.org.
|
|
|
|
|
Rajkumar R wrote: i believe it is not distributed with windows or platform SDK. you may need to download the latest distributable, can be from [GLUT download^].
I did download GLUT and put a headerfile and a DLL file in my Visual C++ folder with the other headerfiles and dll-files. And it works.
But what if I want to switch to DirectX it shouldn't be a problem I added two or three files to the programming environment? I mean I didn't delete anything!
I did notice that on my Vista PC there were already two OpenGL headerfiles present but it didn´t do what I wanted, and since I am a newbe in this matter I figured if I add the GLUT headerfile I can get the examples from the book I bought about computer graphics to work.
Thanks for your help...
|
|
|
|
|
Ranger49 wrote: But what if I want to switch to DirectX it shouldn't be a problem I added two or three files to the programming environment? I mean I didn't delete anything!
DirectX and OpenGL has no dependency, you need to use DirectX SDK headers, lib ... that works independently of OpenGL and vice versa
|
|
|
|
|
ClassVizard is an interface to add messge handler and variable in VC6.
I have used VC2005 for several days, but I still can not find the interface in VC2005.
Could you tell me how to display the dialog in VC2005?
VC2005 is really bad in use, I think Ms products become worse and worse because Microsoft has many funny developers now, they don't know differences between important and unimportant, just made VC inconvenient.
|
|
|
|
|
includeh10 wrote: I have used VC2005 for several days, but I still can not find the interface in VC2005.
See here.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I have a C++ application with a C++ DLL and a C# DLL. Both C++ modules can call methods in the C# DLL.
The C++ app tells the C# DLL to perform graphical operations. I then want the C++ DLL to read the results from the C# DLL. Unfortunately, it looks like the two C++ modules are communicating with separate instances of the C# DLL.
How can I make both C++ modules communicate with a single instance of the C# DLL? Thanks!
|
|
|
|
|
Alan Balkany wrote: Both C++ modules can call methods in the C# DLL.
It is difficult to understand the architecture from your post. Are these C# methods static and they read/write static C# variables?
led mike
|
|
|
|