본문 바로가기

전체 글278

GDI+ DrawString, Font 오류 문제 여러가지로 테스트를 진행했지만 GDI+ DrawString을 이용해서 특정 폰트를 가지고 출력할 때 오류가 발생한다.원인은 아직까지 확인하지 못했다. 내가 가지고 있는 폰트중에 "HY견고딕" 이라는 폰트가 있다.폰트 정보는 아래와 같다. 파일 형식: 트루타입 글꼴 파일(.TTF) 저작권: HanYang I&C Co., Ltd OpenType: 레이아웃, TrueType 윤곽선 한글폰트 버전: 3.10 폰트를 확인하면 당연히 ?도 포함되어 있다. 그러나 GDI+로 화면에 출력을 하면 ?가 표시되지 않는다.어떤 폰트를 가지고 출력을 할 때에는 모든 글자가 출력되지 않는 것도 있었다. 당연히 GDI방식과 Direct2D 방식인 DirectWrite API로 처리를 하면 정상적으로 화면에 출력이 된다.원인이 밝.. 2014. 8. 14.
Beeper 설정(비프음 설정) 개발을 하다가 메시지 박스나 포커스 없는 곳을 클릭할 때 비프음이 발생합니다.신경이 쓰이기도 하죠~ 이것을 설정할 수 있는 API가 있습니다. bool m_IsSystemBeeperOn = false; //현재 System의 Beeper 설정 불러오기 SystemParametersInfo(SPI_GETBEEP, 0, PVOID(&m_IsSystemBeeperOn), 0);// Beeper가 On인 경우 Off if (m_IsSystemBeeperOn == true) SystemParametersInfo(SPI_SETBEEP, 0, NULL, SPIF_SENDWININICHANGE); // 기존 System의 Beeper 설정으로 환원 SystemParametersInfo(SPI_SETBEEP, stati.. 2014. 8. 14.
CWnd::OnNotify 통지메시지를 처리할 때 사용하는 가상함수 통지메시지(Notify message)는 WM_NOTIFY 윈도우 메시지 파라미터로 전달되는 어떤 코드이며, SendMessage()함수를 이용해 전달되므로 메시지 큐를 거치지 않고 핸들러러 함수에 직접 호출한 결과를 가져옵니다.이런 통지메시지가 필요한 이유는 컨트롤 윈도우에 대해 사용자가 발생시킨 각종 이벤트를 부모 윈도우의 코드에서 해결하기 위해서입니다. 만일 통지메시지가 없다면 컨트롤 윈도우의 파생 클래스를 매번 만들어서 사용해야 합니다.새로운 컨트롤 윈도우를 개발하고자 한다면 통지 메시지에 대해서도 설계해야 합니다. 마치 클래스의 가상 함수를 설계하는 것과 비슷하다고 할 수 있습니다.(출처: 프리렉 / MFC 윈도우 프로그래밍 406, 407 page) The framework calls this.. 2014. 8. 8.
[x64] [ilink64 Error] Fatal: Unable to open file 'BDERTL.A' LeadTools V18과 C++ Builder XE6를 이용해서 64bit 빌드 할 때 'BDERTL.A'를 열수 없다는 에러 메세지가 나타난다.Compiler 폴더를 검색해 봐도 그런 파일은 존재 하지 않는데 구글을 검색한 결과 아래와 같은 페이지를 발견했다.http://qc.embarcadero.com/wc/qcmain.aspx?d=114447해결책은 XE6에서 비어있는 BDERTL.dll을 제작한 후에 Lib폴더에 64bit로 빌드후 생성 된 BDERTL.dll과 BDERTL.a 파일을 넣고 빌드를 하면 문제 없이 성공한다.위의 링크에 써 있는 내용은 아래와 같다.Still in XE4 Update 1 ....Work around: Copy any .a lib to BDERTL.a or creat.. 2014. 7. 15.
Installing LEADTOOLS VCL(Visual Component Library) Installing VCLBelow is the guidance on how to install the LEADTOOLS Visual Component Library.Controls InstallationTo install controls, do the following: 1. Open Delphi/Builder. 2. Select Tools -> Option -> Environment Variables. 3. From "System variables" list search for Path then click Add Override. 4. Now add (LEAD)\Bin\CDLLVC10\Win32 in Variable value edit box. Listed below are the steps used.. 2014. 7. 15.
"Hello, World" by Direct2D http://msdn.microsoft.com/en-us/library/windows/desktop/dd756692(v=vs.85).aspx 1. Include Direcr2D Header d2d1.h header를 incude 한다. #include "d2d1.h" 2. load library file d2d1.lib 파일을 load 한다. #pragma comment(lib, "d2d1.lib") 3. Create an ID2D1Factory ID2D1Factory를 생성한다. ID2D1Factory* pD2DFactory = NULL; HRESULT hr = D2D1CreateFactory( D2D1_FACTORY_TYPE_SINGLE_THREADED, &pD2DFactory ); 4. Create.. 2014. 7. 9.
C++개발시 vkHardwareBack, Menu 버튼 처리 방식 FireMonkey 자료를 찾다 보면 대부분 델파이로 되어 있다. 테스트로 개발을 하면서 확인 한 내용을 잊을까봐 적어 둔다. #include "FMX.Platform.hpp" #include "FMX.VirtualKeyboard.hpp" void __fastcall TMainForm::FormKeyUp(TObject *Sender, WORD &Key, System::WideChar &KeyChar, TShiftState Shift) { _di_IFMXVirtualKeyboardService FService; if (Key == vkHardwareBack) { if (TPlatformServices::Current->SupportsPlatformService( __uuidof(IFMXVirtualKeyb.. 2014. 7. 4.
Hit Testing Lines and Curves (라인, 커브 등 오브젝트를 선택하는 방법) http://msdn.microsoft.com/en-us/library/ms969920.aspx AbstractUseful graphics applications, such as CAD or drawing programs, permit the user to select and manipulate graphics objects. This article describes three methods for detecting if the user has selected a line or a curve.The first method is used to hit test lines. It uses two-dimensional vector techniques that resolve the vector components.. 2014. 7. 2.
Use of Two-Dimensional Vectors with Windows NT http://blog.yezhucn.com/dngdi/msdn_vector.htm What Is a Vector?If you are thinking "Just what is a vector?", this section is for you! It's really not uncommon to wonder what a vector is. If your graphics programming experience has been limited to Windows and your application development did not involve graphics editors of one sort or another, you probably have never dealt with vectors. I will no.. 2014. 7. 2.