언어/C++ Builder(48)
-
DBX Error: Driver could not be properly initialized
DBX Error: Driver could not be properly initialized. Client library may be missing, not installed properly, of the wrong version, or the driver maybe be missing from the system path...Rad XE2에서 MySQL5.5를 사용하려고 하면 위와 같은 에러와 만나게 된다.그럴땐 첨부된 파일을 다운받아 C:\Program Files\Embarcadero\RAD Studio\9.0\bin 폴더에 넣어주면 된다. 구글링 하다가 이것저것 따라해봤는데 다 안됨!!!!!저렇게 하면 됨!!
2012.12.03 -
RAD Studio XE에서 Comport 사용할 때 SetPortW 링크 에러
RAD XE에서 Comport를 사용할때 아래와 같은 링크 에러가 뜬다. [ILINK32 Error] Error: Unresolved external '__fastcall Cport::TCustomComPort::SetPortW(const System::UnicodeString)' referenced from OBJ 경로.... 해결하기 위해서는 CPort.hpp에 아래와 같이 코드를 입력해 주면 된다. ?12345#ifdef UNICODE#define SetPortW SetPort#else#define SetPortA SetPort#endif
2012.10.22 -
TStringList의 Sort기능 총정리
출처 http://cbuilder.borlandforum.com/impboard/impboard.dll?action=read&db=bcb_tip&no=735TStringList에는 Sort기능이 있다 이것은 프로그램에 매우 유용하게 쓰일수 있다. TStringList의 Sort기능 QuickSort로 구현되어있다. 아래팁에 TStringList의 VCL소스를 참조하라 http://cbuilder.borlandforum.com/impboard/impboard.dll?action=read&db=bcb_tip&no=733 아래 샘플들은 TMemo 에 있는 내용을 TStringList를 Sorting하는 예제들이다. [방법1] ;기본 Sort() 메소드를 이용 void __fastcall TForm1::Butt..
2012.09.05 -
Stringgrid 정렬하기
Builder 6에서는 상관 없었지만 XE로 넘어오니 StringGrid를 가운데 정렬하면 그리드 안에 내용이 두번 표시 된다. 이 부분에서 검색을 해봤더니 BorlandForum에 나와 있었다.이유는 텍스트 뿐만 아니라 배경도 같이 그려줘야 한다고 한다.StringGrid의 DefaultDrawing값을 false로 해주고 OnDrawCell이벤트에 아래와 같은 소스를 넣어주면 된다. if (State.Contains(gdFixed)){ StringGrid1->Canvas->Brush->Color = clBtnFace; StringGrid1->Canvas->Font->Color = clWindowText; StringGrid1->Canvas->FillRect(Rect);Frame3D(StringGrid..
2012.08.02 -
빌더에서 TDateTime에 시간이나 분, 초 더하기
코딩을 하다보면 몇분뒤에 00해라 이런 것들을 하게 된다.. 그때 빌더에서 쓰면 유용한 코드가 있다. 필요 헤더#include "DateUtils.hpp"선언해주고 IncMinute(TdateTime, int)IncSecond(TdateTime, int) 이외에도 몇개가 더 있다. 첫번째 인자값은 시간데이터고 두번째 인자값은 더할 값이다 예를 들어 IncMinute의 경우 두번째 인자값이 2를 넣어주면 2분이 증가하는 것이다. -2를 넣어주면 2분이 마이너스 되는 것..
2012.06.28 -
Chart 관련 URL들
Chart관련 URLhttp://cbuilder.borlandforum.com/impboard/impboard.dll?action=read&db=bcb_qna&no=56251
2012.06.14