본문 바로가기

VisualStudio.C++.C#/코딩팁,함수활용,단편   ( 155 )


SetWindowTheme. 사용예. - 윈도우 탐색기 와 동일한 표현형식으로 설정. - m_hwnd 에는 CListCtrl, CTreeCtrl 등의 윈도우 핸들. SetWindowTheme(m_hWnd, L"Explorer", NULL); 상세. SetWindowTheme function (uxtheme.h) - Win32 apps Causes a window to use a different set of visual style information than its class normally uses. docs.microsoft.com slaner.tistory.com/65 2020. 11. 19.
MFC. CHeaderCtrl. from : MS CHeaderCtrl Class In this article --> Provides the functionality of the Windows common header control. Syntax class CHeaderCtrl : public CWnd Members Public Constructors Public Methods A header control is a window that is usually positioned above a set of columns of text or docs.microsoft.com 첫 등록 : 2020.11.18 최종 수정 : 단축 주소 : https://igotit.tistory.com/2711 2020. 11. 18.
MFC. Tree Control with Columns. 개요 - CTreeCtrl 과 CListCtrl 특성이 모두 있는 컨트롤. - 코드 프로젝트에서 유사한것들 5~6개 있는 것 중에서 도입 구현 작업시 가장 간결해 보여서 선택함. - 다른 소스코드들은 다들 VC++6.0 에서 작업된 오래된것인데 이 소스는 Visual C++2005에서 작업된 소스 배포중. 2019 변환 하여 작업시 디버깅 량이 적을것으로 여겨짐. - 컨트롤의 코아부분이 소스로 배포되므로 64비트 컴파일 가능. Known Issues These issues were reported so far: There is a problem with tooltips for now, so TVS_NOTOOLTIPS style is enabled for child tree control. Do not d.. 2020. 11. 17.
MFC. DAPFOR. MFC Grid. 트리 리스트 컨트롤. 개요 -트리 와 리스트 동시 구현된 MFC컨트롤. -무료버전 DLL 은 32비트만 지원됨. 64비트에서 활용하려면 유료 소스제공되는것을 구매하여 64비트로 컴파일 해야함. 소스 가격 800달러 수준. Main features: Event-drven object model C++ objects in rows. In cells - values, returned by methods of these objects. Hierarchical data presentation. Real-time sorting of dynamically updated C++ objects. Real-time filtering of updated objects. Real-time cell highlighting. Single and mu.. 2020. 11. 17.
MFC. Tree List Control 모음. 개요 VC++ 에서 기본 제공되는 컨트롤인 CTreeCtrl, CListCtrl 의 특징이 모두 구비된 컨트롤 모음. 여러 종 있음. A Tree List Control A Tree List Control www.codeproject.com 실행샷 CTreeGridCtrl - A Grid Control with Tree Like Functionalities Chris Maunder's grid control enhanced to have tree like features www.codeproject.com Tree control and Buttons for MFC Grid control A set of classes derived from CGridCtrl that embed a tree control,.. 2020. 11. 17.
MFC. 리소스 파일 관련 . Using Multiple Resource Files and Header Files with Visual C++ 리소스 파일에 있는 마크로부분 의미. #define _APS_NEXT_RESOURCE_VALUE 101 #define _APS_NEXT_COMMAND_VALUE 40001 #define _APS_NEXT_CONTROL_VALUE 1000 #define _APS_NEXT_SYMED_VALUE 101 _APS_NEXT_RESOURCE_VALUE is the next symbol value that will be used for a dialog resource, menu resource, and so on. The valid range for resource symbol values is 1 to 0x6FFF. _APS_NEXT_COMMAND_VALUE is the next symbol value that w.. 2020. 11. 15.
MFC. resource ID 네이밍 , 넘버링 컨벤션. TN020: ID Naming and Numbering Conventions 11/04/2016 This note describes the ID naming and numbering conventions that MFC 2.0 uses for resources, commands, strings, controls, and child windows. The MFC ID naming and numbering conventions are intended to meet the following requirements: Provide a consistent ID-naming standard used across the MFC library and MFC applications that are supported by.. 2020. 11. 15.
jsoncpp. 라이브러리 설치 jsoncpp 라이브러리 설치 - 가장 쉬운 방법. 1. vcpkg 에서 jsoncpp 다운받고 이것을 NuGet 패기지로 출력하고, 방법 상세 2. Visual C++ 프로젝트의 NuGet 툴로 상기1의 jsoncpp 를 프로젝트에 적용. jsoncpp - from vcpkg - jsoncpp는 vcpkg 형식으로도 배포되고 있기에 최신버전의 jsoncpp 구하기 가장편리. - 현재 (2020.11.04) 최신버전 : 1.9.2 - vcpkg Vcpkg. 개요 . 설치 Vcpkg - 윈도우, 리눅스, 맥 에서의 C, C++ 라이브러리 매니징 도구. - 배포처 : https://github.com/Microsoft/vcpkg microsoft/vcpkg C++ Library Manager for Wind.. 2020. 11. 4.
C#. 자료형 바이트 사이즈 , C/C++ 대응 C# C/C++ ( C99표준 ) Byte sbyte int8_t 1 byte uint8_t 1 short int16_t 2 ushort uint16_t 2 int int32_t 4 uint uint32_t 4 long int64_t 8 ulong uint64_t 8 * C99 표준정수형 C# C/C++ Byte float float 4 double double 8 decimal 16 연관 Fixed width integer types C99표준. VC++에서는 stdint.h 에 정의 있음. uint8_t, uint64_t 등. Fixed width integer types (since C99) Types Defined in header int8_t int16_t int32_t int64_t signe.. 2020. 10. 29.
C#. FindWindow. SendMessage. WM_COPYDATA C# 에서 FindWindow [DllImport("user32.dll")] public static extern IntPtr FindWindow(string lpClassName, string lpWindowName); IntPtr h_wnd = FindWindow(null, "target window name"); if (h_wnd != IntPtr.Zero) { // do something } C# 에서 SendMessage 로 WM_COPYDATA 송신 주의 : 하기 코드 SendMessage 실행은 되나 상대방 (C++ 로 제작된것) 에서 수신 안되었음. public struct COPYDATASTRUCT { public uint dwData; public uint cbData; public I.. 2020. 10. 28.
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.
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.


 

비트코인




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