|
If i am correct then you ran into the same misunderstanding i did long long time ago. You don't show or hide a window by sending it WM_SHOWWINDOW . It geta this message when it is shown or hidden, but not to show or hide it. As far as i know ShowWindow basically sets the WS_BISIBLE style of the given window, it might also perform some additonal tasks like redrawing, sending messages, don't know the rest.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> If it doesn't matter, it's antimatter.<
|
|
|
|
|
Hi.
I will try this. I think that is what I have been mixed up about. Thanks for the insight.
Stan the man
|
|
|
|
|
I find one empty struct. I donot know what effect it make.
struct nat{};
modified 2-Apr-12 12:46pm.
|
|
|
|
|
Its a simple way to tell the compiler that a structure exists. Just like we define function. In case of function we define the function name in the header file and write the body in the source file. but in case of struct the situation is little different.
here is an example:
struct A
{
int a, b;
struct B *Point_to_B;
}
struct B
{
int a;
int b;
struct A *Point_to_A;
}
in the above example you will found a trouble. The trouble is including header file. No matter how you organize either struct A or struct B will be undefined. So if you do just like below it will solve your problem
struct A;
struct A
{
int a, b;
struct B *Point_to_B;
}
struct A;
struct B
{
int a;
int b;
struct A *Point_to_A;
}
|
|
|
|
|
If you look again, it's
struct nat{};
and not
struct nat;
it isn't a forward declaration.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> If it doesn't matter, it's antimatter.<
|
|
|
|
|
I checked out this[^] file, it has this in it (as you said):
struct nat{};
then later on in this file i see things like:
template<class T>
struct add_reference<T&>
{
typedef T& type;
}; and
template<>
struct add_reference<void>
{
typedef nat &type;
};
As you see this last template specialization is a specialization for the add_reference template with void . Thus, i would say, nat is used to make template instantiation available with void . Just think about it, e.g. this:
add_reference<int> x;
Without the specialization with void and nat :
add_reference<void> x;
this obviously won't work, you can't have reference to void, you wouln't be able to instantiate this template using void. So they substitute the void & reference with nat & , the compiler will be happy and the programmer will be happy:
add_reference<void> x;
So i supose nat simply stands for something like: not a type, or somesuch.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> If it doesn't matter, it's antimatter.<
|
|
|
|
|
+5
Regards.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpfull answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
Thank you very much.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> If it doesn't matter, it's antimatter.<
|
|
|
|
|
|
Yourwelcome.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> If it doesn't matter, it's antimatter.<
|
|
|
|
|
Can someone help me with the getting my ParseExact working? Though following guidance from MSDN site I am still incorrect with my syntax. The error I am receiving is the following:
Error C2665: 'System::DateTime::ParseExact' : none of the 3 overloads could convert all the argument types.
C2665- Error Description: 'function' : none of the number1 overloads can convert parameter number2 from type 'type'
#include <stdio.h>
#include <vcclr.h>
#include <windows.h>
#include <string>
#using <mscorlib.dll>
using namespace std;
using namespace System;
using namespace System::Globalization;
using namespace System::Collections;
void main()
{
std::string dateString = "MAY_03_2010";
std::string format = "MMM_dd_yyyy";
DateTime dateTime = DateTime::ParseExact(dateString,format,nullptr);
system("pause");
}
|
|
|
|
|
Could it be that there is a function (or type or whatever) called "format" somewhere declared in one of those namespaces and the compiler thinks you are trying to pass that to ParseExact? Try renaming your format variable to something else, like date_format or somesuch and see if it changes anything.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> If it doesn't matter, it's antimatter.<
|
|
|
|
|
You do not mention which version of the compiler you are using; are you sure that it recognises nullptr as a NULL value?
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
You might have slightly more luck by asking this question in the proper forum.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
Does anyone know how to disable USB port access in Window XP? I don't mean simply for USB storage devices, but other things as well.
Ideally, I would like to prevent Windows from installing the drivers when a USB device is plugged.
Is there a registry entry I can change?
Thanks
|
|
|
|
|
softwaremonkey wrote: Is there a registry entry I can change?
Have a look at HKLM\SYSTEM\CurrentControlSet\services\USBSTOR\Start.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
Thanks Michael, that was very useful. I found that if I set this to 4 (it was set to 3) it ignores usb memory sticks.
However, Windows still tries to install drivers when other USB devices are plugged in. Do you know if I can stop this happeining?
|
|
|
|
|
|
I was suggested to replace in few places passing const shared_ptr by value to passing by reference (e.g. change const std::shared_ptr<t> param to const std::shared_ptr<t>& param) when I was checking my project with PVS-Studio, the static code analysis tool.
I understand that for performance hot-spots it might be a good optimization as creating a temporary copy of shared_ptr requires updating reference counter which is a interlocked operation.
So the question is - how safe is this optimization? Are there any cases when it could not be used?
Any thoughts on this would be appreciated.
|
|
|
|
|
Hello Friends
I want to draw a hermite curve. I am having set of 2D points[x,y].
I googled also but didnt get the clear idea how can i draw a curve.
As Idea is about using two tangents and two points. But How do we can get tangents. And then can draw a curve.
If anybody use that,Please share with me any idea to explore it more.
I will be very thankful to you.
Regards
Yogesh
|
|
|
|
|
See here[^] for full details of the functions you need.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Hello Sir
Thanks for the link but it doesnt provide any ifo about Hermite Curves.
Thanks
Yogesh
|
|
|
|
|
Drawing curves in Windows is the same whatever type of curve it is; it's just a matter of plotting the different points correctly. I leave the mathematics up to you.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Ok,Thanks.
I will go through it again.
Yogesh
|
|
|
|
|
HI
When i use SetOneShot(TRUE) and Run() in DS to capture one frame, i need to call StopWhenReady ()before i can capture again one image SetOneShot and Run.
Does anybody knows how i can keep one capturing one frame with SetOneShot without stopping the graph (just pausing) ? because restarting the stream is slow.
thx
Stefan
|
|
|
|