[Transfer] Dragging of MFC borderless windows

Dragging borderless windows in MFC void CXXXXDialog::OnLButtonDown(UINT nFlags, CPoint point) { PostMessage(WM_NCLBUTTONDOWN, HTCAPTION, MAKELPARAM(point.x, point.y)); } Remember to add message mapping, otherwise this code will not work. change: Moving a standard window is achieved by clicking the window title bar with the mouse, but for a window without a title bar, you need to use […]

[Transfer] MFC CListCtrl usage tips

The following is not explained. The default view style of listctrl is report. Related classes and processing functions MFC: CListCtrl class SDK: Some macros starting with “ListView_”. Such as ListView_InsertColumn 1. CListCtrl style LVS_ICON: Display a large icon for each item LVS_SMALLICON: Display a small icon for each item LVS_LIST: Displays a list of items […]

VC6 MFC Dialog as apllication programming

Although the MFC framework is old, programming is still much more convenient. On the basis of controlling interface controls, the classes you usually practice in the Console mode can be integrated into MFC, and it is more convenient to develop applications. The picture below is the interface of the practice program. illustrate: An EDIT box […]

[MFC serial port] Implementation of serial port tool with sending, receiving and searching functions

Foreword: In order to facilitate the debugging of the serial port and the installation of the serial device, a serial port (debugging) tool with functions such as serial port search, serial port data sending and receiving, scheduled serial port search, and scheduled data sending is written here. Tool download: https://download.csdn.net/download/wjy27/88371929https://download.csdn.net/ download/wjy27/88371929 1. Serial port search: […]

MFC implements copying files and displaying progress bars through multi-threading

1.Achieve goals By obtaining the original path and target path of the file in the main window, the main window clicks Start Transfer to transfer the file. At the same time, the sub-window displays the file transfer progress and percentage. After the sub-window completes the file transfer, the sub-window automatically closes. When you click Suspend […]

[Xiao Mu learns C++] Embed 64-bit ActiveX control in C++ MFC (VS2017)

Article directory 1 Introduction 1.1 MFC 1.2 ActiveX 2. Use ActiveX controls 2.1 Register controls 2.2 Add controls Conclusion 1. Introduction 1.1 MFC The Microsoft Foundation Classes (MFC) library provides object-oriented wrappers for most Win32 and COM APIs. Although this wrapper can be used to create extremely simple desktop applications, it will be most useful […]

MFC multi-window docking into Tab page

CFrameWndEx::OnCreate() automatically generates some code in the Create function. Those who are familiar with MFC will not go into it here CMFCPopupMenu::SetForceMenuFocus(FALSE); InitUserToolbars(NULL, uiFirstUserToolBarId, uiLastUserToolBarId); EnablePaneMenu(TRUE, ID_VIEW_CUSTOMIZE, 0, ID_VIEW_TOOLBAR); CDockingManager::SetDockingMode(DT_SMART); EnableAutoHidePanes(CBRS_ALIGN_ANY); EnableDocking(CBRS_ALIGN_ANY); 1) The first situation if (!m_Panes[0].Create(_T(“Pane 0”), this, CRect(0, 0, 200, 100), TRUE, 1000, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | CBRS_LEFT […]

MFC small tool universal interface framework CLIST control + right-click menu function

MFC-small tool common interface framework 0x1 scene Due to work needs, I will write code and develop tools for customers or colleagues to use. The code can be implemented, but writing a dark command line tool for others to use does not seem professional enough. If you use a prototyping tool written by others, you […]

Refactoring of GOMfctemplate in 2022 (blog)

Due to project requirements, MFC was used to achieve handheld blood vessel enhancement. The tool platform has undergone major changes, and GOMfcetemplate has been reconstructed; Based on existing understanding, try the 64-bit platform first. 1. Generate MFC dialog 2. Introduce OpenCV and display pictures Still distinguish between 3 places, namely directories, to solve include Linker, […]