Despite your previous comment, the above does not use SM_CXSCREEN/SM_CYSCREEN, thus the final values you are using to create your window may not be the full screen size. I also cannot see the point of your call to AdjustWindowRect() in the above. Nor do you show what are the values of width and height. Also what are the initial values of x and y?
It is an inline function; x, y, width, and height are values passed to it.
In the case this thread refers to: x = 0, y = 0, width = GetSystemMetrics(SM_CXSCREEN), height = GetSystemMetrics(SM_CYSCREEN).
AdjustWindowRect causes the bottom and right member variables to be adjusted such that if you create a window using them, the height and width of the client area will be equal to the original values of those variables. This is simpler and less error prone than figuring it out myself.
Do to the nature of the redraw code as it stood at the time I was doing this, everywhere that was not drawn to would be filled with black. I know this because I am doing the drawing with OpenGL and when I had a matrix out of place (it was the default matrix, so only the upper right was being drawn). So that is not an issue.
I suspect this may have something to do with your values of x and y which look like they may be negative. As I said earlier using values of x=0, y=0, cx=SM_CXSCREEN, cy=SM_CYSCREEN the window will fill the monitor. The values you are using are different from this, thus your results are different.
Yes and no, I am doing this because I had once tried to create a fullscreen window and I found an upper limit on the size of a window. This was to see if I had found how to work around that, which I seem to have done. The question is about the possible cause of an oddity I noticed in the process.
Thanks for the links, I think they will be useful soon.
Some files are not 0kb in size, but appear to be corrupted and some files appear to have 0kb in size.
It's more file extension related.
I started thinking if it might be a Windows Firewall related problem, but if it connects I think everything is ok with the Windows Firewall. Or if Windows Firewall abrupt's connection pathway during recv, well need an opinion.
First without a protocol you don't know if the complete content data was transferred or the connection was interrupted. Second you do not have any error handling in the loop, recv() can return -1 in error cases. Third your receive buffer TCPrecv is used to insert data with ostream::operator<< but the text data is never null terminated (or otherwise indicated how long it is). Could that be a problem?
I have been tracing the problem all night, and I even started adding MessageBox functions to help me get to the roots of the problem. It seems the problem is in the wide-char to multi-byte conversion!?
After the conversion I used MessageBox to return the new string and it's all jebrish.
Check out RFC 2616 too. You are defaulting to HTTP 1.0 so you could be having problems with the target machine not being compliant.
Always test the command you want to use by using Telnet to issue the command to the web server. If it works then you will see and us Wireshark/Microsoft Network Monitor (both are free) to check what is on the wire.
3.1 HTTP Version<br />
Applications sending Request or Response messages, as defined by this<br />
specification, MUST include an HTTP-Version of "HTTP/1.1". Use of<br />
this version number indicates that the sending application is at<br />
least conditionally compliant with this specification.<br />
The snippet you posted does not contain this which means the request will be treated as if it is HTTP 1.0.
i love for some help with my project in C++ BUILDER
i have a previous and next button and a form for my images above with a starting image
i want when a click on the next button to show the next image
and for the previous the previous image
something like a slide show
thanks a lot it's really urgent!!
I assume you should have documentation and/or course texts to help you do that ?
depending on how you images are stored, you need an array of something (image path, bitmap data, ...), and an index that will be increased/decreased with the next/previous button and that the index will loop back when at the first/last valid value so you will not access the array out-of-bound
anyway, think a little bit about it and come back to us with specific questions.