C / C++ / MFC
|
|
 |

|
CScrollView::OnInitialUpdate() ... works only in scroll view. I have tried that in plain CView derivative. VC complier said so. As far as starting maximized – that was not the question. I said using wizard created default view. Sorry.
|
|
|
|

|
Perhaps I don't give a reasonable ideea, but you can look where MFC implement CScrollView::ResizeParentToFit(..) and reproduce the code ...
|
|
|
|

|
Vaclav_Sal wrote: So why does GetClientRect comes up with lesser top/ bottom values?
Aside from the top value always being 0, lesser than what? Unless the window is borderless (e.g., desktop), it can't occupy the entire screen. Things like borders, scroll bars, captions, etc take up room.
"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
|
|
|
|

|
Sorry, that was suppose to be right dimension. I know about the frame / border, what I am asking are the right / bottom dimesions not being SAME as the actual view screen client dimensions. For example - when I build a new window, with frame, in the default view ( parent frame) and use the view client rectange ( of the default view area) to size it - these dimesions are not the same as the actual view area. They are smaller. I suppose I should get the new window dimesions AFTER it is maximized. Than it should show larger size than when originally sized to the client area. Vaclav
|
|
|
|

|
Another ideea is to send to the view a menu->window->tile message, and your view will spreadsheet along mainframe ...
|
|
|
|

|
Good idea, but still does not answer the original questio. SOrry.
|
|
|
|

|
It needs to write string to the file.
But it Open file return FALSE, GetLastError() = 3.
m_File2Write.Open(webRes.strLocalFile, CFile::modeCreate | CFile::modeWrite | CFile::shareDenyWrite))
{
DWORD error = GetLastError();
return -1L;
}
The file does not exists, but I think it will create a file. I do not know why Open file falied.
-----------------------------
Now I know why. Because there is the chararcter '-' in the file name. Such as 12-444.html
But if use the explorer to create file 12-444.html, it is ok. Why use CFile, it error?
modified 16 May '12 - 9:03.
|
|
|
|

|
WinError.h:
OK the file does not exist and you want to create it, but what about its folder?
Veni, vidi, vici.
|
|
|
|

|
I know 3 means can not find the path, but I donot know why.
|
|
|
|

|
I would check with the debugger the runtime value of webRes.strLocalFile.
Veni, vidi, vici.
|
|
|
|
 |
|
|
General
News
Suggestion
Question
Bug
Answer
Joke
Rant
Admin