|
Do you know which header files they're declared in?
|
|
|
|
|
Well the main header file for GDI+ is obviously gdiplus.h. There are then other GDI+ header files which are used, however I believe that they are all included from gdiplus.h anyway, so that shouldn't be a problem.. What happens at compile time with your project?
Hope this helps!
--PerspX
|
|
|
|
|
Perspx wrote: Well the main header file for GDI+ is obviously gdiplus.h. There are then other GDI+ header files which are used, however I believe that they are all included from gdiplus.h anyway, so that shouldn't be a problem.. What happens at compile time with your project?
The compiler's not finding the declarations (compiler error). I'm using Dev-C++ as a compiler (mingw - its gnu or something). I downloaded the PlatformSDK a couple of weeks ago, and have compiled and ran GDI+ code using The Bitmap, Font, and TextureBrush classes, etc. with no problem. I have numerous GDI+ headers, none of them contain the Effect classes. If you can do a "Find in File HueSaturationLightness *.h", I'd appreciate it.
|
|
|
|
|
Hmm.. It is pretty odd.. I have looked through the VS header files and there doesn't appear to be any reference to any of the effects classes as previously mentioned (I am using VS 2005 Professional). I have used GDI+ on several occasions, but I have not used any of the effects classes.
I'm very sorry I cannot help you any further.
--PerspX
|
|
|
|
|
GDI+ is included with the operating system, not a part of Visual Studio.
As stated by Perspx, according to the docs for the Effect class: "Declared in Gdipluseffects.h, include gdiplus.h"
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Odd.. my copy of Visual Studio doesn't seem to have Gdipluseffects.dll :S sorry about that.. I would have been able to help you sooner otherwise.. Thanks for clearing that up Mark
--PerspX
|
|
|
|
|
I didn't clear anything up (well, maybe the part about GDI+ not being part of Visual
Studio ).
AFAIK you had it right - include gdiplus.h should be all the OP needs to do.
Cheers!
Mark
Mark Salsbery
Microsoft MVP - Visual C++
"Go that way, really fast. If something gets in your way, turn."
|
|
|
|
|
Hello,
I am working on an application that streams uncompressed data from high resolution video cameras directly to a hard drive. The amount of data that I am writing is very high, and if I start to write while the drive is idle, I lose a significant number of initial video frames.
Does anyone know a simple way using c++ (on Windows XP) to keep a drive ready to go?
My first thought is to open a file, write some bits, close it and delete it every so often, but I worry that it might just sit in the hard drive buffer without spinning up the drive (and if the data doesn't sit in the HD buffer, it seems like a bit of overkill anyway).
And I guess I also have a follow up question, is it possible to check the drive to see if it is idle, or if it is spun up? I've looked in the windows SDK, but the disk managment functions in the Platform SDK are a little light.
Thanks for the help,
Adam
|
|
|
|
|
TragicComic wrote: ...if I start to write while the drive is idle, I lose a significant number of initial video frames.
I would be more concerned with data loss than I would with drive speed/idling. Think about it -- even if the data to be written was not very much, if you happened to write to the HD when it was not spinning and it lost that data, you've got much bigger problems.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Put your ear on it.....
Steve
|
|
|
|
|
This is more about Power Management than Disk Management.
So (assuming that the disk doesn't have inbuilt smartness to act on power management and completely relies on OS for power mgt),
1. You could set the power management policy in windows (Control Panel!!!) so that it doesn't put the HD in sleep. This doesn't require coding but than needs human intervention in every PC where you run your app.
2. Play with power management API ( SetSystemPowerState(..) or alike) so that your app can notify the OS to not step in and do power management. Don't forget to revert system state on application exit (if required).
But must say, above are from my concept rather than any real work relating to such situation. But I know for sure that there exists some API where a app can tell OS to not kick in power mgnt policy.
|
|
|
|
|
Hi all, im having trouble with the following code:
<br />
void read(void){<br />
const int buffer4=900;<br />
char buffer[BUFSIZ]={'\0'};<br />
char sysfolder4[buffer4];<br />
ifstream file;<br />
ExpandEnvironmentStrings("%systemroot%\\file.txt", sysfolder4, buffer4);<br />
file.open(sysfolder4, ios::in);<br />
if(file.fail()){<br />
msg = "PRIVMSG " + chan1 + " file is not detected..\n";<br />
SendToServer(msg.c_str());<br />
}<br />
else{<br />
msg = "PRIVMSG " + chan1 + " Listing file..\n";<br />
SendToServer(msg.c_str());<br />
while(file.getline(buffer, BUFSIZ)){<br />
Sleep(500);<br />
msg = "\r\nPRIVMSG " + chan1 + " :" + buffer;
SendToServer(msg.c_str());<br />
}<br />
file.close();<br />
msg = "\nPRIVMSG " + chan1 + " :End of file.";<br />
SendToServer(msg.c_str());<br />
}<br />
}<br />
Its suppose to read a file, and close when its done reading the file. However it reads the file, and finishes at the very last line, but stops until another command is entered and prints something un-wanted.
Here's what i'd like to happen.
<quote>
[master] list sample
[ client ] sample random text file.
[ client ] test file reading.
[ client ] read.
[ client ] End of file.
And here's what happens instead.
<quote>
[master] list sample
[ client ] sample random text file.
[ client ] test file reading.
[ client ] read.
[ master ] test
[ client ] End of file.PRIVMSG #chan :This is only a test
Can anyone tell me what could be wrong?? I've tried escape characters but they dont seem to do much, what could be wrong with the string buffer? Any help would be appreciated, thanx in advance!
|
|
|
|
|
in side the while loop put an if statement to break the loop.
the if statement should come before sending to server. in your case before Sleep
like
if( eof() )
{
break;
}
Regards
Anil
|
|
|
|
|
Hi there,
I has a variable that needs to be accessed by multiple threads. To avoid multiple accesses by different threads at the same time, I want to use EnterCriticalSection to enable the exclusive access. However, MSDN instructs that "The process is responsible for allocating the memory used by a critical section object, which it can do by declaring a variable of type CRITICAL_SECTION." I wonder how I should declare a critical section object.
Thanks a lot,
zipliu
|
|
|
|
|
I mean, for example, I want to make a integer to be a critial section object. Thanks.
|
|
|
|
|
zipliu wrote: I wonder how I should declare a critical section object.
CRITICAL_SECTION cs;
EnterCriticalSection(&cs);
...
LeaveCriticalSection(&cs);
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
To add to DavidCrow's reply...
You can put the CRITICAL_SECTION object anywhere it's accessible by ALL threads that need it.
All threads that need to synchronize need to use the same CRITICAL_SECTION object.
Also, InitializeCriticalSection() (or InitializeCriticalSectionAndSpinCount()) should be called
by one of your threads before using the critical section.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
What is the significance of using Variants data type. Is it sufficient that they only have a union of various data types and that they can be used by dispatch clients.
|
|
|
|
|
Here is a brief explanation.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
How does the frame gets destroyed in MFC? Why is the frame window created on the heap as opposed to other windows which should created on the stack?
|
|
|
|
|
The Windows object (HWND) gets destroyed like any other window, when DestroyWindow() is called.
The MFC CFrameWnd object is destroyed in response to the WM_NCDESTROY message (see
CFrameWnd::PostNcDestroy()).
tom groezer wrote: as opposed to other windows which should created on the stack?
Not necessarily true - The same scope rules apply as always. If you want a window to exist after
a function/method returns, the stack might not be a good place for the object.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
AfxRegisterWndClass or AfxRegisterClass or RegisterClass. What is the difference between the three and when should be used what?
|
|
|
|
|
tom groezer wrote: What is the difference between the three...
The first two are MFC. AfxRegisterClass() is a thin wrapper around RegisterClass() , and is a bit more sophisticated than AfxRegisterWndClass() .
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
RegisterClass[^] is a Windows API, and is used internally by AfxRegisterClass and
AfxRegisterWndClass.
The documentation for AfxRegisterClass and AfxRegisterWndClass (in the remarks section) describes
their usage:
AfxRegisterClass[^]
AfxRegisterWndClass[^]
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
http://msdn2.microsoft.com/en-us/library/ms786690.aspx
It says :
Include Qedit.h. This header file is not compatible with Microsoft® Direct3D® headers later than version 7.
My application must do both VMR9 rendering and sample grabbing.
But there are many problems when i include d3d9.h+vmr9.h with qedit.h at the same time , it gives lots of errors when trying to build
how can i use vmr9 filter and samplegrabber filter at the same time ?
|
|
|
|