분류 전체보기
-
캐럿GUI/컨트롤 2009. 7. 30. 22:28
CreateCaret() DestroyCaret() ShowCaret() SetCaretPos() #include #pragma comment(lib, "imm32") int GetCharWidth(HDC hdc, TCHAR *ch, int len) { SIZE sz; GetTextExtentPoint32(hdc, ch, len, &sz); return sz.cx; } static BOOL bComp; static TCHAR *buf; static int off; static int FontHeight; void SetCaret(HWND hWnd) { SIZE sz; HDC hdc; int toff; int caretwidth; hdc=GetDC(hWnd); if (bComp) { toff=off-2; ..
-
IME - Win32GUI/컨트롤 2009. 7. 30. 02:09
시스템은 IME 윈도우의 변화나 조립 문자열의 변화 등 IME의 모든 상태 변화에 대해 WM_IME_로 시작되는 IME 메시지를 포커스를 가진 윈도우에게 보낸다. WM_IME_SETCONTEXT 응용 프로그램이 활성/비활성화 WM_IME_NOTIFY IMN_OPENSTATUSWINDOW 상태 윈도우를 열었다 // ?? 한영 변환 WM_IME_NOTIFY IMN_SETOPENSTATUS IMN_SETCONVERSIONMODE 조립 윈도우 WM_IME_STARTCOMPOSITION 디폴트 IME 윈도우는 이 메시지를 받았을 때 조립 윈도우를 보여준다. 이 메시지를 DefWindowProc으로 보내지 않으면 조립 윈도우는 나타나지 않는다. WM_IME_ENDCOMPOSITION WM_IME_COMPOSITIO..
-
로그 - Win32디버그 2009. 7. 30. 00:14
CLog .addAppender() .writeLog() CLogAppender -> CConsoleLogAppender -> CFileLogAppender -> CEventLogAppender #include "Log.h" int main(int argc, char* argv[]) { // { CLog myLog("LogDriver"); CFileLogAppender * pFileLogAppender = new CFileLogAppender(nsCLog::warning, "test.dat"); if(false == myLog.addAppender(pFileLogAppender)) { cerr
-
C 라이브러리스트림 IO/기타 2009. 7. 28. 20:32
fopen() "wb" "rb" fclose() fwrite() fread() typedef unsigned long ADDRESS; struct atom {int op; ADDRESS left; ADDRESS right; ADDRESS result; int cmp; int dest; }; FILE * atom_file_ptr; atom_file_ptr = fopen ("atoms", "wb"); atom (int operation, ADDRESS operand1, ADDRESS operand2, ADDRESS result, int comparison, int dest) { struct atom outp; outp.op = operation; outp.left = operand1; outp.right =..
-
FLEX스트림 IO/텍스트 프로세싱 2009. 7. 25. 15:54
cat %% .|\n ECHO; %% wc %{ /* * ch2-03.l * * The word counter example for multiple files * */ unsigned long charCount = 0, wordCount = 0, lineCount = 0; #undef yywrap /* sometimes a macro by default */ %} word [^ \t\n]+ eol \n %% {word} { wordCount++; charCount += yyleng; } {eol} { charCount++; lineCount++; } . charCount++; %% char **fileList; unsigned currentFile = 0; unsigned nFiles; unsigned ..