|
I'd suggest that when the file hasn't changed, to then close your handle and try to delete. If it works, great, if it fails, check to see if its a share violation. When it is, then sleep and upon wakeup try the delete again. Repeat as required. This is polling oriented instead of notification oriented, but it should work. I don't think there is a notification event for a file handle being closed. (But I'm sure a wiser one will point this out )
Chris Meech
I am Canadian. [heard in a local bar]
When I want privacy, I'll close the bathroom door. [Stan Shannon]
BAD DAY FOR: Friendly competition, as Ford Motor Co. declared the employee parking lot at its truck plant in Dearborn, Mich., off limits to vehicles built by rival companies. Workers have to drive a Ford to work, or park across the street. [CNNMoney.com]
Nice sig! [Tim Deveaux on Matt Newman's sig with a quote from me]
|
|
|
|
|
I want to add the desktop folder in the treeview.For that I think ShGetDesktopFolder function should be used.I searched in online MSDN but no help for this function is given.
Please help me.
Thanks
|
|
|
|
|
there are too few informations in your question to understand well what you want.
however, why did you put VC.NET 1.1 in the title ? are you using managed C++ ? is so, ask your question in the Managed C++ forum[^]
|
|
|
|
|
|
I am writing a program in c++ and I want to use a struct to group together some information but I don't need to make a full class for it since it only has 4 primitive fields in it and doesn't need data hiding or methods. I was wondering if it would be more efficient to use C linkage rather than just declaring a struct in c++ because I don't want the overhead of constructors destructors, methods, etc. The two ways I could do this are listed below. can you tell me if the one with C linkage will be smaller. My program needs to be as efficient as possible.
extern "C" {<br />
typedef struct<br />
{<br />
float velX;<br />
float velY;<br />
float velZ;<br />
float b;<br />
} FluidInfo;<br />
}
or
struct FluidInfo<br />
{<br />
float velX;<br />
float velY;<br />
float velZ;<br />
float b;<br />
};
pplshero54 gives his most thanks
|
|
|
|
|
i doubt that C linkage will change anything to the size, but you could do the test by yourself using the operator sizeof()
FluidInfo fi;
int structSizeInBytes = sizeof(fi);
moreover, do you know that you can make a class without data hiding ?
just add a public declarator before declaring your data members...
|
|
|
|
|
|
hi,(sorry if this is in wrong forum)
i am from bangalore,india.
i am applying for steady job in different companies.they ask me my expectation.i dont know.
please help me.also please tell me what ctc means and also other jargons.
i have been freelance sw developer for 4 years in vc++ and have done around 4 software packages,for engineering applications, all alone, for govt orgs.
i am very good in sw development and know several languages.i also heve exp in embedded systems.
although i am be mech,i am equally good in all the 3 domains.
-thanx.
-vmmt
|
|
|
|
|
|
v2.0,
You're working too cheap :p
|
|
|
|
|
oh maybe it's because i'm not an exp developer yet...
(actually i am, but not for my office )
|
|
|
|
|
Er zit een korstje op mijn aars.
|
|
|
|
|
I'm not interested in that certain piece of your body
No hurries, no worries.
|
|
|
|
|
it wasn't for you though
|
|
|
|
|
Luckely ...
No hurries, no worries.
|
|
|
|
|
it itches like crazy
Er zit een korstje op mijn aars.
|
|
|
|
|
You could ask this on the Lounge.
Regards,
Nish
|
|
|
|
|
Hi,
Is there a function that stops the window from displaying every time a CD is inserted that asks,
"Windows can perform the same action each time you insert a disc or connect a device with this kind of file".
Many thanks.
|
|
|
|
|
|
Thanks for the reply Mike, but I need to be able to do this from within my program, so any code in C++ would be appreciated. I am writing a CD/DVD Burning application and I don't want to have this auto play dialog popping up every time the user inserts a blank disc and closes the drive.
Many thanks.
|
|
|
|
|
|
This should be helpful for you!Here[^]
|
|
|
|
|
I hope this is an easy question.
I have created code which will print a bmp full page. Since I don't have a printer I am unable to correctly test this code.
One thing I have noticed, when the page is sent to the printer it is very large, more than 60mb. When I print a bmp from a paint application the size is a mere 600kb. I can't understand what I might have done wrong.
The images I am trying to print are mainly white space, though to display the image on screen and for printing I am creating a bmp initially flood filled with white. I then draw my text, charts etc on top of this.
What can I do to decrease this file size? Most of this printing would be sent across networks, so the file size would be a problem.
|
|
|
|
|
Is it possible to print a document without invoking the print dialog each time?
I have created a global PRINTDLG pointer .In my print function, I check the size member of this struct to determin if the dialog box needs to be used, if so it calls it accordingly and globally stores the values. This works ok for the first call to print, but later fails when I try to create a compatibleDC from the printDC.
|
|
|
|
|
Hope I understood your question
You need to print a bmp file maybe it is some helpful to you
...
...
HDC m_hdcPrinter=CreateCompatibleDC(CreateDC(m_pPrinter->pDriverName,
(LPCTSTR)lpdevmode->dmDeviceName,m_pPrinter->pPortName,lpdevmode));
...
...
SelectObject(m_hdcPrinter,hBitmap);
StartDoc (pd.hDC, &di);
StartPage (pd.hDC);
BitBlt(pd.hDC,150,300,2100,1575,m_hdcPrinter,0,0,SRCCOPY);
EndPage (pd.hDC);
EndDoc (pd.hDC);
|
|
|
|