본문 바로가기

c++ time.h #include #include using namespace std; int main(){time_t now;tm *ltm;now = time(0);ltm = localtime(&now);char buf[20];strftime(buf, 20, "%Y-%m-%d %H:%M:%S", ltm);cout 더보기
[WEB] 무료 아이콘 http://www.iconza.com 더보기
c++ 문자를 숫자로 숫자를 문자로 #include template TN StringToNumber(const string& strValue){TN value;stringstream stream(strValue);stream >> value;return value;} template string NumberToString(const TS& value){stringstream ss;ss 더보기
[Paint.net] Layer 사용가능한 이미지 편집기 Paint.net 이미지 편집 프로그램으로 History, Layer 사용이 가능합니다. 포토샵에 비해 기능이 약하지만윈도우 내장 이미지 편집 프로그램인 그림판보다 훨씬 더 많은 기능을 보유하고 있습니다..net으로 만들어 져서 .net SDK를 설치해야하만 설치가 가능합니다. 더보기
[반디집] alz, egg 파일도 반디집으로 압축을 풀수 있다. 반디집 홈페이지 예전에 7zip을 자주 사용하였으나 알집으로 분할 압축된 alz, egg 파일을 사용할려면 알집을 사용해야했습니다.반디집은 알집으로 압축된 alz, egg 파일도 압축풀기가 가능합니다.반디집은 기업에서도 사용할 수 있는 무료 프로그램 입니다. 더보기
[ImgBurn]파일과 폴더를 iso 파일로 변환 ImgBurn 홈페이지 ImgBurn 프로그램은 버닝프로그램으로서 여러가지 기능을 가지고 있는데그중에 폴더를 통채로 ISO로 변환해 주는 기능이 있습니다 폴더를 ISO 파일로 변환하기 1. ImgBurn 실행2. Create Image file from files/folders 클릭 3. 폴더 모양 아이콘 클릭 (Source) 4. ISO 파일로 만들 폴더를 지정 5. 폴더 모양 아이콘 클릭 (Destination) 6. ISO 파일명 지정 7. 변환 버튼 클릭 8. 변환 완료 더보기
WinApi - 사용중인 프로세스 조회 사용중인 프로세스 조회 - 파일명 : Process_Test.cpp- 컴파일 : g++ -Wall -o Process_Test.exe Process_Test.cpp #include #include #include #include using namespace std; void DisplayProcesses(); int main(){DisplayProcesses();return 0;} void DisplayProcesses(){HANDLE hProc; hProc = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);if( (int)hProc != -1 ){PROCESSENTRY32 entry ={0,};entry.dwSize = sizeof(PROCESSENTRY32);B.. 더보기
Mingw - Split 함수 만들기 STL string 문자열을 특정 구분자로 잘라서 Vector에 넣어서 리턴해준다. - 파일명 : Split_Test.cpp- 컴파일 : g++ -std=c++11 -Wall -o Split_Test.exe Split_Test.cpp ※ auto 키워드 사용시 -std=c++11 옵션 추가 #include #include #include using namespace std; vector StringSplit(const string& strContent, const char& szSplit) { string strNext; vector vRet; for (auto str:strContent) {if (str == szSplit) {if (!strNext.empty()) {vRet.push_back(strN.. 더보기
WinAPI - GetTickCount 함수로 sleep 함수 만들기 GetTickCount MSDN 참조 - 파일명 : GetTickCount_Test.cpp- 컴파일 : g++ -Wall -o GetTickCount_Test.exe GetTickCount_Test.cpp windows.h 에는 Sleep 라는 함수가 있습니다. #include #include using namespace std; void sleep(int iMilliseconds){int iStart = GetTickCount();while ((int)(GetTickCount() - iStart) < iMilliseconds){}} int main(){int iStart;int iEnd;iStart = GetTickCount();sleep(1000);iEnd = GetTickCount();cout 더보기
WinAPI - 윈도우폼에 아이콘 넣기 WinApi 폼에 아이콘 적용할려면 Resource를 활용하여야 합니다. // Resource.h #define ID_BTN_EXIT 5001#define IDC_APP 5002 // Resource.rc #include "Resource.h"IDC_APP ICON "app.ico" // main.cpp #include #include "Resource.h" HWND btn_Exit;HINSTANCE g_hInst;LRESULT CALLBACK WinProc (HWND, UINT, WPARAM, LPARAM); int WINAPI WinMain (HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPSTR lpszArgument, int nFunsterStil){H.. 더보기