|
Could you send me your app source? I'm cofused.
|
|
|
|
|
There is no SetCapture?
Could you send me the whole project in an attachment? I want to try it. Thanks.
|
|
|
|
|
There is no SetCapture in the fragment.
Could send the whole project to me? I want to try it. Thank you.
|
|
|
|
|
|
Might be it is stored in the registery
have u tried to search that .
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
How to show File properties dialog and delete to recycle bin dialog(Confirm file delete dlg)?
I want to do these just from the full file path.
And how to rename a file using system method?
Thank you.
|
|
|
|
|
use GetFileAttributesEx to obtains special attributes.
d
|
|
|
|
|
Thank you for your reply.
I mean that I just want to show the peoperty dialog. I don't need to get the file property .
|
|
|
|
|
SHMultiFileProperties
My blogs:
http://blog.joycode.com/jiangsheng
http://blog.csdn.net/jiangsheng
http://bloglines.com/public/jiangsheng
Command what is yours
Conquer what is not
---Kane
|
|
|
|
|
I need to display a dialog box in the default desktop in windows XP with multiple desktops.
Could anybody help me?
- NS -
|
|
|
|
|
I create a big file, using the SetEndofFile, then i Seek the filepointer and write some data in it, but i found the func WriteFile take a long time, Why?
HANDLE hFile = CreateFile(_T("D:\\writetest.dat"),
GENERIC_WRITE,
FILE_SHARE_WRITE|FILE_SHARE_READ,
NULL,
CREATE_ALWAYS,
FILE_ATTRIBUTE_NORMAL|FILE_FLAG_RANDOM_ACCESS,
NULL);
LARGE_INTEGER llPos, llNew;
llPos.QuadPart = 2000*1024;
llPos.QuadPart *= 1024;
SetFilePointerEx(hFile, llPos, &llNew, FILE_BEGIN);
SetEndOfFile(hFile);
llPos.QuadPart = 1800*1024;
llPos.QuadPart *= 1024;
SetFilePointerEx(hFile, llPos, &llNew, FILE_BEGIN);
DWORD dwBytes = 256 * 1024;
BYTE * pBuffer = new BYTE[dwBytes];
DWORD dwBytesWritten;
DWORD dwBegin = GetTickCount();
WriteFile(hFile, pBuffer, dwBytes, &dwBytesWritten, NULL);
DWORD dwTime = GetTickCount() - dwBegin;
CString strTime;
strTime.Format(_T("Time: %d"), dwTime);
AfxMessageBox(strTime);
delete []pBuffer;
CloseHandle(hFile);
|
|
|
|
|
Thats' a big file alright. So it will take it's time to handle.
But you might speed it up by replacing FILE_FLAG_RANDOM_ACCESS with FILE_FLAG_SEQUENTIAL_SCAN or FILE_FLAG_WRITE_THROUGH.
I suspect FILE_FLAG_SEQUENTIAL_SCAN will give the most performance gain. (You aren't really doing random access of the file, just sequential writing).
|
|
|
|
|
I tried to use the flag, but unfortunately, it's no effect.
|
|
|
|
|
OK, then I'm out of ideas.
Except for the usual: Get a faster machine and a faster hard disk.
|
|
|
|
|
I need to extract the appointments from Outllok calendar using a MFC application...
pls help me..
|
|
|
|
|
|
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
I am trying to use MessageBox in .NET but I keep getting an error.
Code I am using:
MessageBox( NULL, "This is the text", "MessageBox", MB_OK );
Error I am recieving:
error C2065: 'MB_OK' : undeclared identifier
I get this error, however, when I mouse over MB_OK it gives me a tooltip saying "#define MB_OK 0x00000000L". Anyone know what I can use in it's place or how to fix this?
Thanks,
Tom Sapp
http://www.sappsworld.com
|
|
|
|
|
I just use 0.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Well, that resolved that issue. Now I have this issue:
error C2514: 'System::Windows::Forms::MessageBox' : class has no constructors
Guess I am not doing something right!
Thanks,
Tom Sapp
http://www.sappsworld.com
|
|
|
|
|
Oh, this is a managed C++ message box. In that case - MessageBox has no constructors. Instead, it has a static method called Show. In that case, you need to pass in the managed enum, you can't pass in a MB value or a number.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I create a big file, using the SetEndofFile, then i Seek the filepointer and write some data in it, but i found the func WriteFile take a long time, Why?
HANDLE hFile = CreateFile(_T("D:\\writetest.dat"),
GENERIC_WRITE,
FILE_SHARE_WRITE|FILE_SHARE_READ,
NULL,
CREATE_ALWAYS,
FILE_ATTRIBUTE_NORMAL|FILE_FLAG_RANDOM_ACCESS,
NULL);
LARGE_INTEGER llPos, llNew;
llPos.QuadPart = 2000*1024;
llPos.QuadPart *= 1024;
SetFilePointerEx(hFile, llPos, &llNew, FILE_BEGIN);
SetEndOfFile(hFile);
llPos.QuadPart = 1800*1024;
llPos.QuadPart *= 1024;
SetFilePointerEx(hFile, llPos, &llNew, FILE_BEGIN);
DWORD dwBytes = 256 * 1024;
BYTE * pBuffer = new BYTE[dwBytes];
DWORD dwBytesWritten;
DWORD dwBegin = GetTickCount();
WriteFile(hFile, pBuffer, dwBytes, &dwBytesWritten, NULL);
DWORD dwTime = GetTickCount() - dwBegin;
CString strTime;
strTime.Format(_T("Time: %d"), dwTime);
AfxMessageBox(strTime);
delete []pBuffer;
CloseHandle(hFile);
-- ed. Sent to the C++ forum at 10:08 Friday 4th November, 2005
-- modified at 10:09 Friday 4th November, 2005
|
|
|
|
|
You need to structure your code like this. Now you'll need to derive the correct values for the constants. I think you can manage that though.
for(int i = 0; i < NO_PROGRAMMING_QUESTIONS_IN_LOUNGE; i++)
cout << POST_UNDER_CORRECT_PROGRAMMING_FORUM << endl;
Some assembly required.
Code-frog System Architects, Inc.
|
|
|
|
|
you forget he is writing to a file.... In context it should be this:
<br />
html_open("message in Visual C++ Forum");<br />
html_write("question");<br />
while (!answerfound)<br />
{<br />
Sleep(1);<br />
}<br />
if (tryPostingInLounge) throw(MassiveSarcasticResponse);<br />
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
So I really come across as MassivelySarcastic eh? Tsk*, Tsk*... I need to tone down I suppose. How though... Guess I need to quit working out and feeling so healthy. Maybe more 125 hour work weeks would tone me down...
Some assembly required.
Code-frog System Architects, Inc.
|
|
|
|