|
Hi,
Not really, I'm using various Shell Interfaces like IShellFolder etc. to enumerate
Shell objects and showing them in a ListView (List Control to be precise).
But the problem is that I can't determine which columns should be shown when a particular Folder (be it Normal File System Folder or Special Folder like Control Panel or Network Neighborhood) is selected, I'm able to enumerate all the columns for a particular Folder though.
How can I determine if they should be visible or not?
--------
You never forget anything... You just can't recall it....
|
|
|
|
|
According to Microsoft's documentation, this function prototype is the following:
BOOL QueryPerformanceCounter(
LARGE_INTEGER *lpPerformanceCount
);
My question is, what would be the range of values that *lpPerformanceCount would come out as? I'm curious to know if a value of 0 would be invalid or not, or if it might even be possible to go into the negatives. I'm guessing that accessing a hardware counter would mean that 0 is a valid performance count.
|
|
|
|
|
Cyrilix wrote: My question is, what would be the range of values that *lpPerformanceCount would come out as?
Hint: Have you looked to see what a LARGE_INTEGER is?
"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
|
|
|
|
|
From this site, it is a signed 64-bit integer, which means that it can have negative values, but just because it can have negative values does not mean that when passed into a given function, and querying a hardware counter, you will ever get negative values, and hence my question.
|
|
|
|
|
See here.
"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
|
|
|
|
|
I see -- I'll stick with being safe just to be sure nothing wrong happens in 95 years.
Thanks.
|
|
|
|
|
From the looks of DavidCrow's link, you can just add code to exit your app if it runs longer than
90 years and you won't have to worry about it!
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Actually, the only time I have to call for a check on QPC is when I'm running it for the first time, since I'm using a "last count" and "current count" variables to do timing differences between each frame. On the first timing, all it has to do is set the last count -- everything else will follow standard routine, so in this case, even if my uptime is 95 years, it'll still be OK (I would imagine something would go wrong before then).
|
|
|
|
|
Is there a better way to count files in a directory than by using ::FindFirstFile and ::FindNextFile?
In my code to determine the number of items to process in a progress meter, I can get the count using these methods but I was hoping there was a function that already wraps this somehow.
I noticed previous questions in this forum seem to indicate that the above functions are the best way but I thought I'd check, just in case.
|
|
|
|
|
bob16972 wrote: Is there a better way to count files in a directory than by using ::FindFirstFile and ::FindNextFile?
None that I'm aware of.
"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
|
|
|
|
|
|
|
|
Hi All!
I have a problem with MFC class CSocket, same times the OnReceive method is not called ...
Any idea for fix this issue...
Too many plans make the health badly!!
|
|
|
|
|
please be clear in your question?
how i can help you without any explanation?
|
|
|
|
|
Yes..
I have implemented a Client\Server application, the communication is created through the class CSocket MFC...
The server side send to client the information to visualize...and the client side visualize it on a display..( CDialog )
When server side send information to Client an OnReceive event is performe...and thats work fine..
But same times the event OnReceive not being called...because the underlying socket system did not give any notifications...i suppose
Excuse for my bad english...
Too many plans make the health badly!!
|
|
|
|
|
Do not use CSocket at all because it's filled with flaws. Use CAsyncSocket if any.
Read this[^] to get it right using CAsyncSocket .
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Thank you for the link....and for the help!
Too many plans make the health badly!!
|
|
|
|
|
AkiraOne wrote: I have a problem with MFC class CSocket, same times the OnReceive method is not called ...
Does the same thing happen with CAsyncSocket ?
"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
|
|
|
|
|
I have not still been able to try...
Today I will make some tests with the CAsynSocket...
Too many plans make the health badly!!
|
|
|
|
|
Yes..is the same...
Too many plans make the health badly!!
|
|
|
|
|
Kindly check this code for me please is give me an errors
A calendar in which u can use a mouse,simply enter the year and month and u will c the result by
#include<iostream.h>
#include<conio.h>
#include<graphics.h>
#include<stdlib.h>
#include<dos.h>
#include<string.h>
union REGS i,o;
initmouse();
showmouse();
hidemouse();
void restrictmouse(int x1,int y1,int x2,int y2);
void getmousestatus( int *button,int *x,int *y);
void findday();
void menu();
void cal();
void main()
{
clrscr();
int gd=EGA,gm=EGAHI;
initgraph(&gd,&gm,"c:\tc\bgi ");
menu();
getch();
closegraph();
}
void findday()
{
int k=1,m=11,mon,D,C,f,i,y,total=0,t,I,d,x1=115,y1=160,q,r,v;
static int s=0;
char st2[3],st3[9],st4[5];
int days[]={31,28,31,30,31,30,31,31,30,31,30,31};
char
*month[]={"JANUARY","FEBRUARY","MARCH","APRIL","MAY","JUNE","JULY","AUGUST
","SEPTEMBER","OCTOBER","NOVEMBER","DECEMEBER"};
restorecrtmode();
cout<<"Enter year : ";
cin>>y;
cout<<"Enter month : ";
cin>>mon;
if(mon>12)
|
|
|
|
|
Please:
1. Explain exactly what the problem is (so what exact errors do you have)
2. Format your message properly (using the pre or code tags above the emoticons)
3. Post a relevant piece of code (your code seems to be cut in the middle of a function). That also means not to paste ALL your code.
|
|
|
|
|
urbdos wrote: ...is give me an errors
Such as...being incomplete and unreadable.
"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
|
|
|
|
|
Use of pre when you want to post a code or click HTML tags in this message.
|
|
|
|