본문 바로가기
반응형

『 C 』Languege11

C++. 배열 길이 출력하기 1차원, 2차원 C++. 배열 길이 출력하기 1차원, 2차원 나중에 설명을 추가할 것입니다. 간단하게 하단 코드를 보고 이해하길 바랍니다. #include using namespace std; int main(void){ int len_col, len_row; int arr[2][2] = {{0,0},{0,0}}; cout 2021. 6. 21.
Windows 10 에서 SCP : SL 서버 열기 1. mono 설치하기 Windows 10에서 SCP : SL 서버를 설정하는 방법 음성 채팅의 문제가 발생할수 있기에 설치해줍니다. www.mono-project.com 2. SteamCMD 설치하기 https://steamcdn-a.akamaihd.net/client/installer/steamcmd.zip zip 파일안에 있는 steamcmd.exe를 원하는 위치에 새폴더를 만들어서 넣어줍니다. 예 ) C:\steamcmd 라는 폴더를 만들어 주고 exe파일을 넣어 실행해 줍시다. 실행하면 steamcmd가 자동으로 설치되며 steam> 표시가 나타날때까지 기다려줍시다. 3. 이제 steamcmd.exe을 실행하고 다음과 같은 명령어를 적어줍니다. - Login anonymous - force_in.. 2020. 9. 1.
Visual Studio Code 가벼운 프로그래밍 툴 https://code.visualstudio.com/ Visual Studio Code - Code Editing. Redefined Visual Studio Code is a code editor redefined and optimized for building and debugging modern web and cloud applications. Visual Studio Code is free and available on your favorite platform - Linux, macOS, and Windows. code.visualstudio.com 절대 귀찮아서 사이트만 올린게 아님 http://wjradburn.com/software/ WJR Software - PEview (PE/COFF .. 2019. 8. 8.
unity 1장 움직이기 예제 using System.Collections; using System.Collections.Generic; using UnityEngine; public class PlayerController : MonoBehaviour { [SerializeField] //인스펙터창에서 수정할수 있게 해준다. private float walkSpeed; [SerializeField] private Rigidbody myRigid; //보이는 것 이상의 물체 역할을 한다. // Start is called before the first frame update void Start() { myRigid = GetComponent(); // 시리얼필드와 비슷하다. } // Update is called once per fr.. 2019. 6. 9.
winapi 흰창띄우기 기본예제 #include LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); HINSTANCE g_hlnst; LPCTSTR lpszClass = TEXT("First"); int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevlnstance, LPSTR lpszCmdParam, int nCmdShow) { HWND hWnd; MSG Message; WNDCLASS WndClass; g_hlnst = hInstance; WndClass.cbClsExtra = 0; WndClass.cbWndExtra = 0; WndClass.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH); Wn.. 2019. 6. 2.
winapi 공부하는 게시글 while (TRUE) { BlockInput(TRUE); } #include #include #define IDR_ACCELERATOR1 #define ID_Dont LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); HINSTANCE g_hlnst; LPCTSTR lpszClass = TEXT("제목"); int APIENTRY WinMain(HINSTANCE hlnstance, HINSTANCE hPrevlnstance, LPSTR lpszCmdParam, int nCmdShow) { HWND hWnd; MSG Message; WNDCLASS WndClass; g_hlnst = hlnstance; HACCEL hAccel; WndClass.cbClsExt.. 2019. 5. 27.
winapi 키보드 입력 VK_ Constant/valueDescription VK_LBUTTON0x01 Left mouse button VK_RBUTTON0x02 Right mouse button VK_CANCEL0x03 Control-break processing VK_MBUTTON0x04 Middle mouse button (three-button mouse) VK_XBUTTON10x05 X1 mouse button VK_XBUTTON20x06 X2 mouse button -0x07 Undefined VK_BACK0x08 BACKSPACE key VK_TAB0x09 TAB key -0x0A-0B Reserved VK_CLEAR0x0C CLEAR key VK_RETURN0x0D ENTER key -0x0E-0F Undefined V.. 2019. 5. 27.
winapi 마우스를 창안에 가두기 LRESULT CALLBACK WndProc(HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam) { HDC hdc; PAINTSTRUCT ps; RECT rc; POINT p1, p2; GetClientRect(hWnd, &rc); p1.x = rc.left; p1.y = rc.top; p2.x = rc.right; p2.y = rc.bottom; ClientToScreen(hWnd, &p1); ClientToScreen(hWnd, &p2); rc.left = p1.x; rc.top = p1.y; rc.right = p2.x; rc.bottom = p2.y; ClipCursor(&rc); switch (iMessage) { case WM_DESTROY: P.. 2019. 5. 27.
winapi 최상위 윈도우로 설정하기 1.BringWindowToTop을 쓰기위해 아래를 사용해야한다. if(::GetForegroundWindow() != this->m_hWnd){ HWND h_active_wnd = ::GetForegroundWindow(); if(h_active_wnd != NULL){ DWORD thread_id = GetWindowThreadProcessId(h_active_wnd, NULL); DWORD current_thread_id = GetCurrentThreadId(); if(current_thread_id != thread_id){ if(AttachThreadInput(current_thread_id, thread_id, TRUE)){ BringWindowToTop(); AttachThreadInput(.. 2019. 5. 27.
반응형