https://www.embarcadero.com/free-tools/dev-cpp/free-download
Dev-C - Free Download - EmbarcaderoEmbarcadero Dev-C++ Fast, Portable, Simple, and Free C/C++ IDE for Windowswww.embarcadero.comhttps://github.com/Embarcadero/Dev-Cpp/releases
(등록절차 없이 바로 다운로드 받으려면 여기서)
Dev C++은 가볍게 만들어진 윈도우용 공개 C/C++ IDE입니다.
윈도우용 GCC와 내장 디버거(GDB)를 갖추고 있습니다.
델파이로 만들어졌으며 모든 소스코드가 공개되어 있습니다.
에디터 부분은 SynEdit 컴포넌트가 사용되었고 한글입력 버그는
리눅스의 gedit, gvim에서와 동일한 형태로 나타납니다.
이 버그를 수정하기 위해서는 다음 파일에서 IME 관련 부분을
적절히 수정해야 합니다.
Source/VCL/SynEdit/Source/SynEdit.pas
procedure WMImeChar(var Msg: TMessage); message WM_IME_CHAR;
procedure WMImeComposition(var Msg: TMessage); message WM_IME_COMPOSITION;
procedure WMImeNotify(var Msg: TMessage); message WM_IME_NOTIFY;
procedure TCustomSynEdit.WMImeChar(var Msg: TMessage);
begin
// do nothing here, the IME string is retrieved in WMImeComposition
// Handling the WM_IME_CHAR message stops Windows from sending WM_CHAR
// messages while using the IME
end;
procedure TCustomSynEdit.WMImeComposition(var Msg: TMessage);
var
imc: HIMC;
PW: PWideChar;
ImeCount: Integer;
begin
if (Msg.LParam and GCS_RESULTSTR) <> 0 then
begin
imc := ImmGetContext(Handle);
try
ImeCount := ImmGetCompositionStringW(imc, GCS_RESULTSTR, nil, 0);
// ImeCount is always the size in bytes, also for Unicode
GetMem(PW, ImeCount + sizeof(WideChar));
try
ImmGetCompositionStringW(imc, GCS_RESULTSTR, PW, ImeCount);
PW[ImeCount div sizeof(WideChar)] := #0;
CommandProcessor(ecImeStr, #0, PW);
finally
FreeMem(PW);
end;
finally
ImmReleaseContext(Handle, imc);
end;
end;
inherited;
end;
procedure TCustomSynEdit.WMImeNotify(var Msg: TMessage);
var
imc: HIMC;
LogFontW: TLogFontW;
begin
with Msg do
begin
case WParam of
IMN_SETOPENSTATUS:
begin
imc := ImmGetContext(Handle);
if imc <> 0 then
begin
GetObjectW(Font.Handle, SizeOf(TLogFontW), @LogFontW);
ImmSetCompositionFontW(imc, @LogFontW);
ImmReleaseContext(Handle, imc);
end;
end;
end;
end;
inherited;
end;
윈도우용 SynEdit에서는 다국어 입력처리 부분이 GTK가 아닌 위도우API로 구현되었습니다. 그러나 외국인에 의해 개발되었기 때문에 다국어 입력 메쏘드는 아주 기초적인 골격만 구현되어 있음을 볼 수 있습니다. 완벽한 한글 입력을 위해서는 위 메쏘드를 적절히 수정할 필요가 있고 미흡한 부분은 관련 코드를 추가해 주어야 합니다.
Dev C++ 소스코드는 여기에 있습니다. 빌드하기 위해서는 최소 델파이 커뮤니티 버전 또는 그 이상이 필요합니다.
https://github.com/Embarcadero/Dev-Cpp
한글입력 버그를 없애는 데에 필요한 관련 지식은 다음을 참고하시기 바랍니다.
윈도우에서 한글입력 등 IME 및 다국어 처리에 관한 자료
https://gall.dcinside.com/mgallery/board/view/?id=pascal&no=4