Advertisement
Combreal

resource_FoDChat.h

Dec 1st, 2019
305
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.51 KB | None | 0 0
  1. #include <winsock2.h>
  2. #include <ws2tcpip.h>
  3. #pragma comment(lib, "ws2_32.lib")
  4. #include <windows.h>
  5. #include <string>
  6. #include <tchar.h>
  7. #include <stdio.h>
  8. #include <stdlib.h>
  9. #include <errno.h>
  10. #include <iostream>
  11. #include <thread>
  12. #pragma warning( disable : 4996)
  13. #define TRUE 1
  14. #define FALSE 0
  15. #define PORT 5555
  16. #define ID_BUTTONA 1
  17. #define ID_EDITA 2
  18. #define ID_EDITB 3
  19. #define IDC_STATICA 4
  20. #define IDM_ABOUT 5
  21. #define IDM_CONFIGURE 6
  22. #define IDC_STATICC 4
  23. #define IDC_STATICD 5
  24. #define IDC_STATICE 6
  25. #define ID_EDITC 7
  26. #define ID_EDITD 8
  27. #define ID_EDITE 9
  28. #define ID_BUTTONB 10
  29. #define IDI_MYICON 101
  30. using namespace std;
  31.  
  32.  
  33. LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
  34. LRESULT CALLBACK WndProcB(HWND, UINT, WPARAM, LPARAM);
  35. LPWSTR stringToLPWSTR(const std::string& instr);
  36. void *receiveMessage(void *sock_desc);
  37. void *sendMessage(void *sock_desc);
  38. void AddMenus(HWND);
  39. void CenterWindow(HWND);
  40. void SendText(HWND chatBox, HWND sendBox);
  41. HWND hWindowa, hWindowb;
  42. HWND hwndEditA, hwndEditB, hwndEditC, hwndEditD, hwndEditE;
  43. HWND hwndTextA, hwndTextB, hwndTextC, hwndTextD, hwndTextE;
  44. HWND hwndButtonA, hwndButtonB;
  45. bool showWindowB = false;
  46. bool sendCheck = false;
  47. //thread sendThread(sendMessage, (void *)newSocket);
  48. //thread receiveThread(receiveMessage, (void *)newSocket);
  49. thread sendThread;
  50. thread receiveThread;
  51. WSADATA WSAData;
  52. SOCKET server;
  53. int sock;
  54. SOCKADDR_IN addr;
  55. std::string address = "192.168.1.10", port = "5555", username = "Combre";
  56. std::string messageInABottle;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement