본문 바로가기

VisualStudio.C++.C#   ( 298 )


C++. Win32 API. MFC. SetCapture(), ReleaseCapture() SetCapture() , ReleaseCapture()는 win32 api , MFC CWnd 멤버함수 모두 제공됨. 기능 : 마우스가 활성 윈도우 영역을 벗어난 경우에도 마우스 이벤트 받을 수 있게 하는것. HWND SetCapture( HWND hWnd ); Sets the mouse capture to the specified window belonging to the current thread.SetCapture captures mouse input either when the mouse is over the capturing window, or when the mouse button was pressed while the mouse was over the capturing window and .. 2020. 9. 25.
CWnd::OnNotify, OnCommand CWnd::OnNotify virtual BOOL OnNotify( WPARAM wParam, LPARAM lParam, LRESULT* pResult ); Parameters wParam Identifies the control that sends the message if the message is from a control. Otherwise, wParam is 0. lParam Pointer to a notification message (NMHDR) structure that contains the notification code and additional information. For some notification messages, this parameter points to a larger.. 2020. 9. 24.
MFC. 컨트롤 동적 생성시 이벤트 핸들링 MFC 의 컨트롤을 동적 생성한 경우 버튼 클릭등의 이벤트핸들링은 정적 생성한 경우와는 달리, OnCommand 와 OnNotify 에서 수신하며, 이를 위한 컨트롤 생성시 동적 생성한 컨트롤의 owner 가 이벤트 수신할 CWnd* 로 설정되어야 한다. OnCommand, OnNotify 의 wParam 으로 Create 시 기록한 nID 가 전달된다. OnNotify 인 경우에는 nID가 wParam 과 동시에 lParam 으로 전달되는 구조체 NMHDR 의 멤버 idFrom에도 nID가 기록되어 전달된다. 아래 코드는 CListCtrl 의 경우의 동적 생성시 이벤트 핸들링을 위한 코드 예를보인다. CTreeCtrl 뿐만 아니라 모든 컨트롤의 동적 생성한 것들은 이와 동일한 방식으로 이벤트 핸들링한다.. 2020. 9. 24.
MFC. CListCtrl. 리스트 컨트롤. InsertColumn int InsertColumn( int nCol, const LVCOLUMN* pColumn);int InsertColumn( int nCol, LPCTSTR lpszColumnHeading, int nFormat = LVCFMT_LEFT, int nWidth = -1, int nSubItem = -1);   InsertItem int InsertItem(const LVITEM* pItem);int InsertItem( int nItem, LPCTSTR lpszItem);int InsertItem( int nItem, LPCTSTR lpszItem, int nImage);int InsertItem( UINT nM.. 2020. 9. 24.
MFC. Understanding CDockablePane. 최고의 설명글. 아래 링크에서 설명하는 CDockablePane 설명글 구글 검색에서 보이는 최고의 정보 품질. Understanding CDockablePane A good reference for CDockablePane www.codeproject.com 연관 MS 사 설명글. CDockablePane Class CDockablePane 클래스에 대해 자세히 알아보기 docs.microsoft.com MFC. CDockablePane 에 CDialog 표현하기. CDockablePane 에서 CDialog m_pDlg; CDockablePane::OnCreate() { m_pDlg.Create(IDD_DLG, this); m_pDlg.ShowWindow(SW_SHOW); } CDockablePane::OnPaint.. 2020. 9. 20.
VC++2019. MFC Class From ActiveX Control.. 기능 제거됨. VC++2017 버전에서 클래스 위저드에서 클래스 추가시 아래처럼 MFC Class.. 외에 3개의 선택이 가능하다. VC++ 2019 부터는 붉은박스 부분의 3종의 클래스 추가 기능이 제거되어 사용불가함. 사유 MS사에서 VC++2019 부터는 해당 기능을 제거하기로 했다고 함. Add a class from an ActiveX control Add a class from an ActiveX control In this article --> Use this wizard to create an MFC class from an interface in an available ActiveX control. You can add an MFC class to an MFC application, an MFC DLL.. 2020. 9. 18.
C++ template (템플릿), 변수, 함수, 클래스 템플릿. 제네릭 타입. 개요. C++ template C++ template C++ 언어의 기본 요소. 클래스, 함수, 변수가 제네릭타입 (Generic Type) 으로 동작하게 하는것. - 클래스 템플릿 : 클래의 멤버변수를 template 로 선언했다는 의미. - 함수 템플릿 : 함수의 인자, 반환값을 template 으로 선언 했다는 의미. - 변수 템플릿 : 변수를 template 로 선언했다는 의미. 제네릭타입으로 선언된 것이 실제 사용될 자료형으로 되는것은 컴파일 시점에 이뤄진다. 즉, 컴파일러가 코드에서 사용된 특정 자료형별로 지가 알아서 추가 코드 작성해주는 것. 유용성. 자료형이 달라진 것은 추가 코드 작성하지 않아도 된다. 연산자오버로딩,다중상속시 간편하다. 추가정보. 1. 위키백과 : 템플릿(C++) tem.. 2020. 9. 15.
Visual C++. 사용자 정의 매크로 만들기. Include Directories, Library Directories VS 2019 . Property Manager 창 열기   메뉴 : View -> Other Windows -> Property Manager 클릭    Open the Property Manager window. (On the menu bar, choose View > Property Manager or View > Other Windows > Property Manager.) Open the shortcut menu for a property sheet (its name ends in .user) and then choose Properties. The Property Pages dialog box for that property sheet opens.In the left pane of the di.. 2020. 9. 15.
MFC. 컴파일 경고 무시 #pragma, 속성설정. #pragma warning(disable: 번호) - 해당 소스파일 에 번호 에 해당하는것은 컴파일시 경고 발생하지 않는다. 예. 컴파일시 경고 아이디 C26812 가 있다면 #pragma warning(disable: 26812) - 1개의 소스파일에서 무시하려면 해당파일의 최상단 에 기록. - 헤더파일에 의 최상단에 기록하면 헤더파일 모든 소스파일에 경고무시 적용됨. 속성창에서 Disable Specific Warnings 설정. - 설정방법 : 프로젝트 속성창 : C/C++ -> Advanced -> Disable Specific Warnungs 란에 경고 번호 추가. - 프로젝트 전체에서 해당 경고 무시됨. 첫 등록 : 2020.09.14 최종 수정 : 단축 주소 : https://igotit... 2020. 9. 14.
Visual C++ 64bit, 32bit 프로젝트 개발 환경 셋팅. 개요 Visual C++ 프로젝트에서 만들어지는 실행파일을 32bit/ 64bit 모두 가능하게 하기위한 프로젝트 환경 설정법. 기본 사전 지식. 1. 32비트용/ 64비트용 프로젝트를 따로 만들 필요 없고 1개의 프로젝트에서 플랫폼을 32비트 혹은 64비트 선택하여 컴파일 함.2. Visual C++ 2015, 2017, 2019 에서 프로젝트 생성하면 기본 64비트/32비트 플랫폼 선택가능하게 되어있으나, Visual C++ 2010 에서는 64비트 플랫폼 선택가능하게 사용자가 설정해줘야 함. 방법 보기 -> http://igotit.tistory.com/1473. Visual C++ 컴파일과정에서 윈도우 , MFC 라이브러리들은 자동으로 선택된 플랫폼에 해당하는것이 임포팅되어 컴파일되므로 사용자가 .. 2020. 9. 14.
Visual C++. 솔루션 하위 폴더 . 프로젝트 하위 필터. 아이템 컨테이너 첫 등록 : 2020.09.14 최종 수정 : 단축 주소 : https://igotit.tistory.com/2588 2020. 9. 14.
MFC. pch.h precompiled header 사용하지 않음 설정 프로젝트 속성 에서 C/C++ -> Precompiled Header 의 오른쪽 리스트 항목중 Precompiled Header 를 Not Using Precompiled Headers 를 선택. 아래그림. 2020. 9. 13.
Visual C++ 2019 . WebSocket 구현 골격. cpprestsdk 기반. 개요 Visual C++ 2019 에서 웹소켓 구현하기 위한 라이브러리로 4종( cpprestsdk , libwebsocket, websocket++ , boost websocket) 정도의 후보가 있다. websocket ++ : www.zaphoyd.com/projects/websocketpp/ boost의 beast::websocket : www.boost.org/doc/libs/1_70_0/libs/beast/doc/html/beast/using_websocket.html 예제 : www.boost.org/doc/libs/1_70_0/libs/beast/doc/html/beast/quick_start/websocket_client.html stackoverflow.com/questions/9528.. 2020. 9. 9.
std::function<R(Args...)>::target std::function::target Returns a pointer to the stored callable function target. Return value A pointer to the stored function if target_type() == typeid(T), otherwise a null pointer. #include #include int f(int, int) { return 1; } int g(int, int) { return 2; } void test(std::function const& arg) { std::cout const T* target() const noexcept; (2) (since C++11) Returns a pointer to the stored calla.. 2020. 9. 8.
Fixed width integer types C99표준. stdint.h 에 정의 있음. uint8_t, uint64_t 등. Fixed width integer types (since C99) Types Defined in header int8_t int16_t int32_t int64_t signed integer type with width of exactly 8, 16, 32 and 64 bits respectively with no padding bits and using 2's complement for negative values (provided only if the implementation directly supports the type) int_fast8_t int_fast16_t int_fast32_t int_fast64_t fastest signed integer type with width of at l.. 2020. 9. 7.
win API . FindWindow , FindWindowEx // activate an application with a window with a specific class name BOOL CMyApp::FirstInstance() { CWnd *pWndPrev, *pWndChild; // Determine if a window with the class name exists... pWndPrev = CWnd::FindWindow(_T("MyNewClass"), NULL); if (NULL != pWndPrev) { // If so, does it have any popups? pWndChild = pWndPrev->GetLastActivePopup(); // If iconic, restore the main window if (pWndPrev->IsIconic.. 2020. 9. 5.
MFC.대화상자. x버튼 그레이처리 BOOL CCyFinMetaMain_UITDlg::OnInitDialog() { CDialogEx::OnInitDialog(); ModifyStyle(WS_SYSMENU, 0);// 우상단 최소화, 최대화, x 3개 모두 안보이게 하는것 // x버튼 그레이 처리하는것. CMenu *p_menu = this->GetSystemMenu(FALSE); p_menu->EnableMenuItem(SC_CLOSE, MF_BYCOMMAND | MF_GRAYED); return TRUE; } 첫 등록 : 2020.08.31 최종 수정 : 단축 주소 : https://igotit.tistory.com/2561 2020. 8. 31.
WM_COPYDATA . OnCopyData . CWnd * pWnd . WPARAM 개요2개의 프로세스 사이에 SendMessage 함수로 메시지 송/수신과 동시에 구조체자료형 COPYDATASTRUCT 를 전송가능한 것. 즉 메시지 송신측에서 SendMessage 함수인자를 아래처럼 호출하면 HWND(윈도우핸들) 에 해당하는 다른 프로세스에서 COPYDATASTRUCT 로 정의된 데이터 myCDS 를 수신가능하다.  SendMessage (HWND, WM_COPYDATA, 0,(LPARAM)&myCDS); // 메시지 전송.myCDS 로 전송하기 위한 간단한 예.typedef struct { int a; int b;} MySTData; MySTData my_stdata; // 이 구조체를 COPYDATASTRUCT 의 lpData 로 송신하고자한다.COPYDATASTRUCT myCD.. 2020. 8. 31.


비트코인




            암호화폐/외환/나스닥/골드          
       
현물 |선물 인버스 |선물 USDT , bybit MT5               프랍 트레이딩. MT4,MT5