|
Anthony Appleyard wrote: Please how do I put _CRT_SECURE_NO_WARNINGS in to suppress those warnings?
I put this in Project Properties --> C/C++ --> Preprocessor definitions.
Maxwell Chen
|
|
|
|
|
|
I got a "Database Timeout" error.
I m using an MFC application with MSDE database.
What can be the reason(s) for this??
|
|
|
|
|
wrong coding?
Greetings.
--------
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
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
yashveer wrote: What can be the reason(s) for this??
I suspect there is a problem with your code. I could be wrong, though.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
|
Hi all,
I am trying to work with video files larger than 6GB. The MFC file classes use DWORD's for position and length, which limits them to 4GB. I knwo there are equivalents for routines like CFileFind::GetLength or CFile::GetPosition, etc. but I can't seem to find them. Does anyone have an idea?
Thanks in advance.
William
|
|
|
|
|
William Engberts wrote: CFileFind::GetLength or CFile::GetPosition, etc
U can use the API's directly.
GetFileSizeEx()<br />
SetFilePointerEx()
|
|
|
|
|
Not sure what version of VS you are using, but the file handing classes in the MFC (CFile etc) were updated to handle large file sizes. So the CFile::GetPosition() now returns a ULONGLONG, Seek() has a LONGLONG parameter...and so forth.
I now about the file limitation for VS6, but for the MFC 7.0 (VS7.1), these were updated.
I Dream of Absolute Zero
|
|
|
|
|
you may use CreateFileMapping and ViewMapOfFile to map such files into your process address,__int64 will be ok.
DWORD dwFileLo = ::GetFileSize(hFile,dwFileHi);
ASSERT(dwFileLo != INVALID_FILE_SIZE);
__int64 qwFileSize = dwFileHi << 32 | (dwFileLo & 0XFFFFFFFF);
Later buggers harm more.
|
|
|
|
|
|
Dude! Information overflow!!
Condense your code sample and ask again, else I doubt anyone would consider wading through all of that.
I Dream of Absolute Zero
|
|
|
|
|
|
are you kidding ?
you don't even formt your questions
reported as abusive dude !
|
|
|
|
|
I'm all curious now what his second question was.
I know the first was... "Here's 500 lines of my code, not even using the pre tag. What's wrong with it?".
Iain.
|
|
|
|
|
How to programmatically make the dotted-line rectangle show on the focused button when a dialog based application is just launched? Thanks!
In VC++6, the dotted-line rectangle displays automatically for dialog based applications. But latter versions of Visual C++ do not unless user press the ALT key.
Maxwell Chen
|
|
|
|
|
Erm, I'm pretty sure this is an OS settings. You haven't upgraded your PC too..?
Iain.
|
|
|
|
|
Iain Clarke wrote: Erm, I'm pretty sure this is an OS settings. You haven't upgraded your PC too..?
I am still using WinXP with SP2.
Maxwell Chen
|
|
|
|
|
If you look up SystemParametersInfo and SPI_GETKEYBOARDCUES , they're the parameters that govern whether keyboard shortcuts show up.
But you're more interested in the focus rectangle on a dialog... I'm assuming that's related. But if not, just make sure you have a tab stop order set appropriately, and that your buttons have the WS_TABSTOP set. Beyond that, I have no idea...
Iain.
|
|
|
|
|
Iain Clarke wrote: just make sure you have a tab stop order set appropriately, and that your buttons have the WS_TABSTOP set.
Yes, tab order of the button is set, and WS_TABSTOP is set for the button (therefore when ATL is pressed the rectangle show up on that button).
Iain Clarke wrote: SystemParametersInfo and SPI_GETKEYBOARDCUES
And I added the below in MyDlg::OnInitDialog(), but I don't even see the menu-access key underlined... (unless ALT is pressed)
SystemParametersInfo(SPI_SETKEYBOADRCUES, TRUE, NULL, 0);
(Weird?! It does not allow copy and paste when editing this post? )
Maxwell Chen
|
|
|
|
|
Doesn't it have to be...
BOOL bOn = TRUE;
SystemParametersInfo(SPI_SETKEYBOADRCUES, 0, &bOn, 0);
?
Iain.
|
|
|
|
|
Iain Clarke wrote: Doesn't it have to be...
BOOL bOn = TRUE;SystemParametersInfo(SPI_SETKEYBOADRCUES, 0, &bOn, 0);
Oh I made a mistake. This solution works! Thanks.
Maxwell Chen
|
|
|
|
|
Maxwell Chen
|
|
|
|
|
Maxwell Chen wrote: In VC++6, the dotted-line rectangle displays automatically for dialog based applications
Not in my machine. In both vc6 and vc8 I checked, for displaying the focus rectangle, either you have to press tab or ALT key.
Maxwell Chen wrote: But latter versions of Visual C++ do not unless user press the ALT key.
A difference between the apllicaton created in vc6 and later are, by default the applications will be using version 5 of comctl32.dll, where as in later version of vc, it will be using version 6 of comctl32.dll ( that y u get the XP look and feel for the application created in vc7 or vc8 ).
|
|
|
|
|
Naveen wrote: Not in my machine. In both vc6 and vc8 I checked, for displaying the focus rectangle, either you have to press tab or ALT key.
You are right! I doublechecked again with VC6, and it does not under WinXP. (It might be in Win2K / WinNT4 time ...)
Maxwell Chen
|
|
|
|