Thanks for your reply, I found the error. When opening a file by rightclicking and "open with" the path to the file was enclosed by double quotes and my code didn't handle that.
Sorry for not...
Type: Posts; User: antex
Thanks for your reply, I found the error. When opening a file by rightclicking and "open with" the path to the file was enclosed by double quotes and my code didn't handle that.
Sorry for not...
Hello!
I'm making my own texteditor as a way to learn a bit about the win32 API. Most of it is working just fine, like opening and saving textfiles.
It's also working fine to open files from the...
Ah okey, thank you very much for this info! :D
So when the buffer is full send() blocks even when it's in non-blocking mode? What happens in a case like the one I described in my first post if the buffer doesn't get full, like if I try to send...
Hi, I'm having some trouble understanding non-blocking socket operations.
If I have a non-blocking server (select based) and use a non-blocking send from the client, select will "wake up" and the...
Oh, thank you very much! That's the thing I was looking for !
Yeah I guess that would work but in my opinion there should be an API for these kind of things. If there is no such thing I'll just have to try something else.
Thanks for replying!
Ok, but doesn't that code change only the row in the control which have text already? I think I tried something like that earlier but only one line was changed.
EDIT: The code is for a chat client...
Hi, I can't figure out how to handle the WM_CTLCOLORSTATIC message to change the background color of a read-only edit box. Anyone know how to do this? I would appreciate any help EXTREMELY much since...
Okey thank you very much for answering! I can't imagine there's a better forum on the net :D
Hopefully I'll be able to help people soon enough (as my knowledge grows) and not just ask questions...
Hello everyone!
In all tutorials I've read this far select is mainly used with non-blocking sockets. What I'm curious about is if there is something wrong about using select with blocking sockets...
I thought I did, but when I created a new project just for testing it all worked perfectly. The trouble is in a socket class I'm writing so I have to double check the class code it seems.
If it...
I find this kind of strange but when I use the FD_SET macro in my program everything compiles fine but when I run the executable it crashes.
SOCKET test;
fd_set read_check;
FD_SET(test,...
Ah okey, thank you all very much for replying, this saved me from (more) confusion.
The thing is, I have checked the taskmanager and it confirms that the entire process is terminated when I destroy the window. I can't understand why the loop quits.
As far as I know the GetMessage() function returns zero if it receives a WM_QUIT message. This is often used as a way to stop the message loop and terminate the program. Since I like to play around...
Well, I didn't think about that at all, but that seem to be a good option and far easier to program too. Thank you both for your replies! I really appreciate you help!
Thank you very very much!
Ok thanks. Is it a bad idea to let the first or first few bytes received from each call identify the type, or is that good enough for most purposes? But what if not all info gets extracted in one...
Hi, I'm having trouble figuring out how to do two things "simultaniously" over the same connection. Say I want to send 2 files to the same client or send 1 file and some text messages. The problem is...
Ok I see, but if I let it own the string, how can I let it have a dynamic size? I mean, there's no way to know the number of chars before the string have already been given as input. I don't feel...
I have a few questions about C-style strings. If I wanna change the string contained in my class as it is now I must make the pointer data point to another C-style string, but if I do this alot there...
Ok, I see. Thank you both very much for answering!
I have a question concerning what will happen to a string when I do like this:
int main()
{
char* text;
text = "hello world";
text = "this is a string";
return 0;
}
Does...
int main()
{
return 0;
// can't put the "}" here in the IDE
This is the problem, the IDE refuese to accept that input. I can never end my code blocks because it does not accept that...