As I told you previously, I can't use any Afx or similiar VC++ things, I use Dev-C++, so please suggest me some solution for the code i posted previously.