본문 바로가기

Visual C++9

MFC - 리스트컨트롤(CListCtrl) 대용량 데이터 처리 리스트 컨트롤에서 대용량의 데이터를 업데이트 하는 방법에 대해서 알아보겠습니다. CListCtrl클래스의 SetItemCount(), SetItemCountEx()함수를 사용하면 되는데, 사용 방법은 업데이트 할 데이터의 양을 먼저 위 두개의 함수를 사용하여 알려주고, 데이터를 입력하기만 하면 됩니다. 아래는 각 각의 함수를 사용하는 방법이며, MSDN에서 발췌하였습니다. CListCtrl::SetItemCount() https://msdn.microsoft.com/en-us/library/88tba5s4.aspx CString str; // Add 1024 items to the list view control. m_myListCtrl.SetItemCount(1024); for (int i = 0; i.. 2015. 2. 3.
MFC - 리소스에서 FileVersion 얻어오기 #pragma comment(lib, "version.lib") void main() { // 버전정보를 담을 버퍼 char *buffer = NULL; // 버전을 확인할 파일 char *name = "c:\\TestFolder\\test.exe"; DWORD infoSize = 0; // 파일로부터 버전정보데이터의 크기가 얼마인지를 구합니다. infoSize = GetFileVersionInfoSize(name, 0); if (infoSize == 0) return; // 버퍼할당 buffer = new char[infoSize]; if (buffer) { // 버전정보데이터를 가져옵니다. if (GetFileVersionInfo(name, 0, infoSize, buffer) != 0) { VS_F.. 2015. 2. 2.
MFC - 다이얼로그(Dialog)에 상태표시줄(CStatusBar)을 표시하기 Introduction Someone asked in the VC++ forum how they can add a status bar to a dialog and I foolishly replied saying that all they had to do was to have a CStatusBar member in their dialog class and that they should call Create() from the OnInitDialog() handler. Then someone else replied saying that it didn't work and then I tried it out myself and to my horror found that nothing happened. Anyh.. 2015. 2. 2.
반응형