본문 바로가기

VisualStudio.C++.C#   ( 290 )


Visual C++. C++ REST SDK. OpenSSL. libCurl 설치하기. - 쉽게. 개요. - Visual C++ 에서 제공되는 nuget 툴을 이용하면 Visual C++ 에서 즉시 사용가능한, C++ REST SDK, OpenSSL, libCurl 모두 5분안에 설치 완료되어 간편한 설치과정으로 즉시 구현작업 가능하다. - Visual C++ 버전은 2017 을 예로 한다. 최신 Visual Studio 버전은 2019 이나 nuget 으로 배포되는 libCurl 과 OpenSSL 이 Visual C++ 2017 에서는 완전하게 설치되지만 Visual C++ 2019 용은 아직 안정된 버전이 nuget 으로 배포안됨. 영상으로 전체 과정 모두 정리. - 과정 요약 : Visual C++ 에서 nuget 툴 이용하여 라이브러리 설치하려면 프로젝트가 열려있는 상태여야 한다. 본 영상에서.. 2020. 10. 27.
std::deque . std::deque std::vector 의 특성에 아래 특성이 추가된것. - push_front() ; 첫자리에 원소 추가. - pop_front() ; 첫자리의 원소 제거. - 헤더파일 : 생성 방법 및 기타 함수사용법은 vector 와 동일. deque 는 불연속 메모리 할당. - 메모리 에 연속적으로 할당되는 std::vector 와 크게 다른점임. 즉, std::vector 에서는 &my_vec[0] ; 으로 해당 배열의 첫주소를 받고 배열의 사이즈만큼 접근하여 모든 원소 확보 가능 그러나, deque 에서는 불연속 메모리 할당되기 때문에 &my_deque[0] 으로 시작 주소 받고 배열 사이즈만큼 접근해봤자 deque 에 기록했던 원소들 받지 못함에 주의. 연관. std::vector. STL.. 2020. 10. 21.
std::queue. std::queue - 헤더파일 : - 추가 : push() , 마지막에 요소추가. - 제거 : pop(), 첫번째 요소 제거. - front() , 첫번째 요소 받기. - back() , 마지막 요소 받기. 연관 std::deque . std::deque std::vector 의 특성에 아래 특성이 추가된것. - push_front() ; 첫자리에 원소 추가. - pop_front() ; 첫자리의 원소 제거. 생성 방법 및 기타 함수사용법은 vector 와 동일. 연관. std::vector. ST.. igotit.tistory.com std::vector. STL vector class. 사용법. 개요. - std::vector - 동적 배열이면서 배열의 마지막 지점에 엘리먼트 삽입 , 제거 에 최적.. 2020. 10. 17.
std::vector. STL vector class. 사용법. 개요. - std::vector - 동적 배열이면서 배열의 마지막 지점에 엘리먼트 삽입 , 제거 에 최적화 되어있음. - push_back() 마지막에 엘리먼트 삽입. - pop_back() 마지막 엘리먼트 삭제. - 마지막 아닌곳도 엘리먼트 삽입, 삭제 가능하긴 함. - vector 는 메모리에 연속 배치됨. 비교 - std::deque 마지막 과 앞 모두 엘리먼트 삽입제거 가능. 메모리에 불연속 배치됨. 헤더파일 : vector , #include 기본 문법. std::vector The STL vector class is a template class of sequence containers that arrange elements of a given type in a linear arrangemen.. 2020. 10. 14.
Visual C++. 구조체 얼라인먼트. 디폴트 설정. 구조체 얼라인먼트 설정 코드의 일부 부분적으로 적용 하려는 경우엔 , 아래처럼 #pragma 구문 적용한다. #pragam pack(push,얼라인 바이트 사이즈) // 1,2,4,8.16 중 택1. // 이 구간에 선언된 모든 구조체에 얼라인 바이트 수 적용됨. #pragam pack(pop) // 이것 이후는 프로젝트 설정에서 지정된 값이 적용됨. Visual C++ 프로젝트 속성창(아래그림)에서 설정가능하며, 통상 Default 로 되어있다. Visual Studio 에서 구조체 얼라인먼트 default 값 - 위 속성창에 보면 Defalt 가 의미하는게 단일하지 않으며 프로젝트에 적용된 플랫폼에 따라 다른 값이 적용된다. - 프로젝트가 x64 플랫폼인 경우 구조체 얼라인먼트 default 값 : .. 2020. 10. 5.
MFC. Extension DLL. 확장 DLL MFC extension dll - // dllmain.cpp : Defines the initialization routines for the DLL. static AFX_EXTENSION_MODULE CLibCyMetaTraderDLL = { false, nullptr }; extern "C" int APIENTRY DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved) { // Remove this if you use lpReserved UNREFERENCED_PARAMETER(lpReserved); if (dwReason == DLL_PROCESS_ATTACH) { // Extension DLL one-time initialization .. 2020. 10. 4.
MFC. CFileDialog . 파일열기, 쓰기 공통대화상자 CFileDialog 생성자 인자들. explicit CFileDialog( BOOL bOpenFileDialog, // TRUE 읽기, FALSE 쓰기. LPCTSTR lpszDefExt = NULL, // 파일확장자 LPCTSTR lpszFileName = NULL, // 파일명 DWORD dwFlags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, // 모드 LPCTSTR lpszFilter = NULL, // 파일형식. 예 _T("*.cfs") CWnd* pParentWnd = NULL, DWORD dwSize = 0, BOOL bVistaStyle = TRUE ); 코드예. void CCyManager_CyDiagram::File_SaveAs() { CFileDial.. 2020. 10. 2.
MFC. 스크롤바 제거 스크롤바 제거할려면 상황별로 다른 방식 적용해야함. 상황1. CView 나 CFormView 의 ChildFrame 에서 CSplitterWndEx 적용한 경우. - childframe 의 OnCreateClient 내부의 Create 의 dwStyle 에서 WS_HSCROLL, WS_VSCROLL 을 제외시켜야 함. // childframe 스크롤바 제거 BOOL CCyFinCreatorChildFrame::OnCreateClient(LPCREATESTRUCT /*lpcs*/, CCreateContext* pContext) { return m_wndSplitter.Create(this, //2, 2,// TODO: adjust the number of rows, columns 1, 1, CSize(10.. 2020. 10. 2.
MFC. CWnd::PreTranslateMessage . WM_KEYDOWN 핸들러로 수신못할 때. CWnd::PreTranslateMessage - CWnd 메시지 큐에서 메시지 정보 읽어들인 시점 호출됨. - CWnd 에 속한 다른 컨트롤러 들에 메시지 배포하기전에 메시지 정보 받을 수 있는것. - Used by class CWinApp to translate window messages before they are dispatched to the TranslateMessage and DispatchMessage Windows functions. virtual BOOL PreTranslateMessage(MSG* pMsg); typedef struct tagMSG { HWND hwnd; UINT message; WPARAM wParam; LPARAM lParam; DWORD time; POINT p.. 2020. 9. 30.
MFC. 드래그 드롭 시 텍스트 안보이는 문제 해결 . 폰트 설정 오류증상. - 트리컨롤에서 아이템 드래그 하는데 글자 안보임. (아래 그림) 오류해결코드 - 드래그 이미지 생성 CreateDragImage 전에 임시폰트 설정하고, 이미지 생성후 원래 폰트로 복구. CFont * m_pFontDrag = NULL; CFont * m_pFontDefault = NULL; m_pFontDrag = new CFont(); m_pFontDrag->CreateFont(9,0,0,0, FW_NORMAL, FALSE, FALSE, FALSE, DEFAULT_CHARSET , OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, FF_DONTCARE, _T("MS Sans Serif") ); m_pFontDefault = new CF.. 2020. 9. 26.
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 nMask, int nItem, LPCTSTR lpszItem, UIN.. 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 dialog.. 2020. 9. 15.


 

비트코인




암호화폐       외환/나스닥/골드       암호화폐/외환/나스닥/골드 암호화폐/외환/나스닥/골드   암호화폐/외환/나스닥/골드
     
현물 |선물 인버스 |선물 USDT       전략매니저(카피트레이딩)     롤오버 이자 없는 스왑프리계좌
( 스왑프리 암호화폐도 거래 가능 )    
MT4, MT5 , cTrader 모두 지원     FTMO 계좌 매매운용. MT4,MT5