2011/04/25

2011/04/19

IDE Fix Pack 4.0 / DelphiSpeedUp 3.0 release

IDE Fix Pack 4.0



RadStudio IDE 의 버그를 수정한 것으로 2007/2009/2010/XE 버전을 지원한다.





RAD Studio XE fixes/optimizations:


  • Code Insight doesn’t show matching methods for event assignments

  • QC #68493: Switching away and back to Delphi orphans focus on Code Editor

  • QC #29732: Class Completion adds published section

  • QC #88038: Delphi always maximizes itself on taskbar change

  • QC #89148: TListView ItemData streaming error

  • QC #89149: Saving a form with a ListView can kill the IDE

  • QC #93152: TBitBtn.DoubleBuffered default doesn’t match constructor’s default

  • Optimization: QC #50564: Long/Unicode string assignments could be made 20% to 30% faster

  • Optimization: Optimized TObject.ClassNameIs implementation

  • Optimization: GetDynaMethod uses binary search in DMT

  • Optimization: LoadResString cache (improves the speed of switching between Code and Design editor)

  • Optimization: Startup .NET XML-Serializer cache




RAD Studio 2010 fixes/optimizations:


  • QC #86428: Form looses ancestor components after unloading packages

  • QC #23580: Object Inspector shows incomplete / mangled event handler list

  • Code Insight doesn”t show matching methods for event assignments

  • Undo destroys editor buffer (fixed in RAD Studio 2010 Update 2)

  • F1 key doesn’t work if invoked from the ObjectInspector

  • Vista compatible icons (256×256) aren’t supported

  • Stepping through the code can be slow

  • QC #80822: ObjectInspecor: Properties are duplicated after scrolling

  • QC #80776: ObjectInspector shows “EditControl” instead of the real content

  • QC #79776: Clicking on object Inspector rejects focus

  • QC #29732: Class Completion adds published section

  • Step-Out doesn’t recognize the return address at ESP

  • QC #75738: Debugging extremly slow

  • QC #68493: Switching away and back to Delphi orphans focus on Code Editor

  • QC #88038: Delphi always maximizes itself on taskbar change

  • QC #89148: TListView ItemData streaming error

  • QC #89149: Saving a form with a ListView can kill the IDE

  • QC #93152: TBitBtn.DoubleBuffered default doesn’t match constructor’s default

  • Optimization: QC #50564: Long/Unicode string assignments could be made 20% to 30% faster

  • Optimization: Optimized TObject.ClassNameIs implementation

  • Optimization: GetDynaMethod uses binary search in DMT

  • Optimization: LoadResString cache (improves the speed of switching between Code and Design editor)

  • Optimization: Call stack with IInterface parameters are resolved much faster




RAD Studio 2009 fixes/optimizations:


  • QC #86428: Form looses ancestor components after unloading packages

  • QC #23580: Object Inspector shows incomplete / mangled event handler list

  • Code Insight doesn”t show matching methods for event assignments

  • Vista compatible icons (256×256) aren’t supported

  • Undo destroys editor buffer

  • Stepping through the code can be slow

  • 64 bit Debugger assertion (see hotfix from Embarcadero for 2009)

  • QC #75738: Debugging extremly slow

  • QC #71575: Delphi 2009 literal string assigment

  • QC #47807: Error insight fails to find TObject class

  • Possible deadlock when Error Insight calls ProcessMessages

  • QC #68493: Switching away and back to Delphi orphans focus on Code Editor

  • QC #37462: IDE may select the wrong file when performing a ctrl + left-click on a filename in the editor

  • QC #22880: Cannot resolve unit name

  • QC #58045: Component captions and component icons disappear from form designer

  • QC #69456: IDE dead lock when updating the editors

  • QC #55910: TDBText.Color always reverts to Parent.Color

  • QC #59963: Closing non-modal forms after a task switch can deactivate the application

  • QC #56252: TPageControl flickers a lot with active theming

  • QC #68730: TLabel is not painted on a themed, double-buffered TTabSheet in Vista

  • ToolsAPI IOTAProjectOptions.GetOptionNames destroys options.

  • QC #74646: Buffer overflow in TCustomClientDataSet.DataConvert with ftWideString

  • QC #80822: ObjectInspecor: Properties are duplicated after scrolling

  • QC #80776: ObjectInspector shows “EditControl” instead of the real content

  • QC #79776: Clicking on object Inspector rejects focus

  • QC #29732: Class Completion adds published section

  • QC #88038: Delphi always maximizes itself on taskbar change

  • QC #89148: TListView ItemData streaming error

  • QC #89149: Saving a form with a ListView can kill the IDE

  • QC #93152: TBitBtn.DoubleBuffered default doesn’t match constructor’s default

  • Optimization: QC #50564: Long/Unicode string assignments could be made 20% to 30% faster

  • Optimization: Optimized TObject.ClassNameIs implementation

  • Optimization: GetDynaMethod uses binary search in DMT

  • Optimization: LoadResString cache (improves the speed of switching between Code and Design editor)

  • Optimization: Call stack with IInterface parameters are resolved much faster




RAD Studio 2007 fixes/optimizations:


  • QC #29732: Class Completion adds published section

  • Call stack with IInterface parameters are resolved much faster

  • Optimization: LoadResString cache

  • Undo destroyed editor buffer

  • 64 bit Debugger assertion (see hotfix from Embarcadero)

  • QC #47807: Error insight fails to find TObject class

  • Possible deadlock when Error Insight calls ProcessMessages

  • QC #37462: IDE may select the wrong file when performing a ctrl + left-click on a filename in the editor

  • QC #22880: Cannot resolve unit name

  • QC #58045: Component captions and component icons disappear from form designer

  • QC #75738: Debugging extremly slow

  • QC #50278: IDE Compiler opens all files in ReadWrite mode and blocks command line compiler

  • QC #55910: TDBText.Color always reverts to Parent.Color

  • Sometimes the IDE has two taskbar buttons

  • Background Parser blocked the main thread

  • Find dialog has problems with upper/lower case Umlaut characters

  • QC #68493: Switching away and back to Delphi orphans focus on Code Editor

  • QC #68647: Infinite loop in Forms.GetNonToolWindowPopupParent

  • QC #68740: Lost focus after TOpenDialog when MainFormOnTaskBar is set

  • QC #59963: Closing non-modal forms after a task switch can deactivate the application

  • Control resize bugfix for kernel stack overflow due to WH_CALLWNDPROC hook

  • QC #59654: TActionList access already released FActions field

  • QC #54286 : Parent-PopupMenu overrides standard context menu (edit, memo, combobox, …)

  • QC #50097: ObjAuto access violation on XEON (Data Execution Prevention bug)

  • QC #58938: MainForm Minimize minimizes in the background

  • QC #64484: SysUtils.Abort can raise an AccessViolation

  • QC #58939: No taskbar button when starting from ShellLink with Show=Minimized

  • QC #56252: TPageControl flickers a lot with active theming

  • QC #68730: TLabel is not painted on a themed, double-buffered TTabSheet in Vista

  • QC #74646: Buffer overflow in TCustomClientDataSet.DataConvert with ftWideString

  • QC #88038: Delphi always maximizes itself on taskbar change

  • QC #89148: TListView ItemData streaming error






DelphiSpeedUp 3.0 



Delphi IDE 의 속도를 개선하기 위한 IDE Plugin 이다.



개선 내용


  • Improves Delphi/BCB/BDS’s load times

  • Optimizes often used RTL functions by functions form the FastCode project

  • All optimizations are done in memory and do not change any file on disk

  • Adds a “Close all and kill” menu item to the “File” menu that terminates the IDE very fast

  • The fast termination is used when you close the IDE while pressing the CTRL key.

  • Shows waiting cursor while loading designtime package

  • Optimizes CodeCompletion (CodeInsight)

  • Optimizes the Delphi Compiler’s C RTL

  • Optimizes the Debugger, especially the Step-Into functionality

  • CodeCompletion and HelpInsight can be aborted by ESC/mouse move




지원 버전


  • C++Builder 5, 6

  • Delphi 5, 6, 7

  • Borland Developer Studio 2005, 2006

  • CodeGear RAD Studio 2007 (December Update)






IDE Fix Pack 

DelphiSpeedUp&

Original Post : http://neodreamer-dev.tistory.com/539

2011/04/14

SQLite 정적라이브러리(Static Library) 만들기 (C++ Builder)

2008/12/07 - [Dev Story/Tips] - C++ Builder 용 SQLite 정적 라이브러리 만들기


SQLite 3.7.5 버전 후로는 ICU 모듈이 추가되어 이를 포함해 주가나 기능을 비 활성화 해야하는데 C++ Builder 의 경우 포함하는데 어렵다. ICU 사이트에서도 테스트된 컴파일러가 Visual C++ 이라고 명시되어 있기도 하다.


그래서 이 기능을 비활성화 하는 것으로 방향을 설정 하였다.


우선 C++ Builder 에서 Static Library 프로젝트를 생성한다. 

프로젝트 폴더에 sqlite-preprocessed-3070601.zip 의 파일들과 sqlite-src-3070601.zip 의 sqlite-src-3070601/ext/rtree 폴더에 포함되어 있는 sqlite3rtree.h 파일을 복사 한 후 fts1*, fts2* 그리고 tclsqlite.c 파일을 제외하고 프로젝트에 포함 시킨다.


Project 속성의 C++ Compiler / Directories and Conditional 에서 Conditional Defines 에 아래 내용을 추가한다.

NO_TCL

SQLITE_ENABLE_BROKEN_FTS1=1

SQLITE_ENABLE_BROKEN_FTS2=1


그리고  C++ Compiler / Pre-compiled headers 에서 Pre-compiled header 를 사용하지 않음으로 설정한다.


마지막으로 SQLITE_ENABLE_ICU 을 사용하는 파일들을 찾아서 파일 첫줄에 #undef SQLITE_ENABLE_ICU 입력하여 ICU 를 비활성화 한다.


이제 빌드만 하

Original Post : http://neodreamer-dev.tistory.com/538

SQLite 정적라이브러리(Static Library) 만들기 (Visual C++)

SQLite 3.7.5 이상의 버전에서는 ICU Unicode 모듈이 추가되어 이 모듈을 추가하거나 기능을 비활성화 하여야 한다.

Visual C++ 의 경우 ICU 모듈을 사용할 수 있어서 ICU4C 소스를 받아서 라이브러리에 포함 시켜준다. ICU4C 전체 소스는 필요없고 소스 파일 패키지(icu4c-4_6_1-src.zip)에서 source/common/unicode 폴더가 필요하며 부가적으로 source/i18n/unicode/uregex.h 파일이 필요하다.

진행에 사용한 버전은 SQLite 3.7.6.1 버전과 Visual C++ 2005, 2010 버전이다.

아래는 Visual C++ 에서 SQLite Static Library 를 만들기 위한 프로젝트 구조이다.   SQLiteStatic      - icu         - unicode      - sqlite      - SQLiteStatic2005      - SQLiteStatic2010
 unicode 폴더에는 icu4c 소스의 source/common/unicode 폴더에 포함 된 파일들과 source/i18n/unicode/uregex.h 을 넣어 두었다.

sqlite 폴더에는  sqlite-preprocessed-3070601.zip 의 파일들과 sqlite-src-3070601.zip 의 sqlite-src-3070601/ext/rtree 폴더에 포함되어 있는 sqlite3rtree.h 파일을 복사해 두었다.

위와 같이 파일들을 준비하고 메인프로젝트 하위에 Visual C++ 2005 와 Visual C++ 2010 버전을 위한 프로젝트를 만들었다. 두 버전의 프로젝트 설정은 동일하다.

Visual C++로 "Win32 Consol Application" 을 생성한다. 생성할 때 응용프로그램 설정(Application Settings)에서 정적 라이브러리(Static Library) 를 선택하고 미리 컴파일된 헤러(Precompiled header)를 사용하지 않도록 만든다.



만들어진 프로젝트에 sqlite 경로에 있는 파일들(fts1*, fts2* 파일들과 tclsqlite.c 제외)을 추가한다.

마지막으로 아래와 같은 프로젝트 설정을 한다.
General/Additional Include Directories :
..\icu
Preprocessor/Preprocessor Definitions :
NO_TCL _CRT_SECURE_NO_WARNINGS (optional) SQLITE_ENABLE_BROKEN_FTS1=1 SQLITE_ENABLE_BROKEN_FTS2=1
Code Generation/Runtime Library :
Multi-threaded (Release) Multi-threaded Debug (Debug)
Advanced/Disable Specific Warnings
4267;4244;4018;4311;4996;4312 (optional) 


설정을 마치고 컴파일을 하면 SQLite 정적 라이브러리를 얻을 수 있다.

64비트가 필요할 경우 64비트 Platform 을 추가하고 
Preprocessor/Preprocessor Definitions 항목의 WIN32를 WIN64로 변경하고 컴파일 하면 된다.

만들어진 라이브러리를 테스트 해 보았는데 
Visual C++ 2005 버전 프로젝트에 사용하려면 Visual C++ 2005 버전으로 만든 정적 라이브러리를 사용하여야 완벽한 동작을 보장 받을 수 있을 것 같았다. (Visual C++ 2010 버전도 동일함.)



2011/02/08 - [Dev Story] - SQLite 3.7.5.0 Library (정적/동적) for C++ Builder and Visual C++
2008/12/07 - [Dev Story/Tips] - Visual C++ 용 SQLite 정적 라이브러리 만들기 


Original Post : http://neodreamer-dev.tistory.com/537

SQLite 3.7.6.1 Released!!



Version 3.7.6.1 (2011 April 14)



  • Fix a bug in 3.7.6 that only appears if the SQLITE_FCNTL_SIZE_HINT
    file control is used with a build of SQLite that makes use of the
    HAVE_POSIX_FALLOCATE compile-time option and which has
    SQLITE_ENABLE_LOCKING_MODE turned off.

  • SQLITE_SOURCE_ID:
    "2011-04-13 14:40:25 a35e83eac7b185f4d363d7fa51677f2fdfa27695"

  • SHA1 for sqlite3.c: b81bfa27d3e09caf3251475863b1ce6dd9f6ab66




Version 3.7.6 (2011 April 12)


  • Added the sqlite3_wal_checkpoint_v2() interface and enhanced the
    wal_checkpoint pragma to support blocking checkpoints.

  • Improvements to the query planner so that it makes better estimates of
    plan costs and hence does a better job of choosing the right plan,
    especially when SQLITE_ENABLE_STAT2 is used.

  • Fix a bug which prevented deferred foreign key constraints from being
    enforced when sqlite3_finalize() was not
    called by one statement with a failed foreign key constraint prior to
    another statement with foreign key constraints running.

  • Integer arithmetic operations that would have resulted in overflow
    are now performed using floating-point instead.

  • Increased the version number on the VFS object to
    3 and added new methods xSetSysCall, xGetSysCall, and xNextSysCall
    used for doing full-coverage testing.

  • Increase the maximum value of SQLITE_MAX_ATTACHED from 30 to 62
    (though the default value remains at 10).

  • Enhancements to FTS4:


    1. Added the fts4aux table

    2. Added support for compressed FTS4 content




  • Enhance the ANALYZE command to support the name of an index
    as its argument, in order to analyze just that one index.

  • Added the "unix-excl" built-in VFS on unix and unix-like platforms.

  • SQLITE_SOURCE_ID:
    "2011-04-12 01:58:40 f9d43fa363d54beab6f45db005abac0a7c0c47a7"

  • SHA1 for sqlite3.c: f38df08547efae0ff4343da607b723f588bbd66b





SQLite Homepage


SQLite Download pag

Original Post :
http://neodreamer-dev.tistory.com/536

2011/04/13

윈도우 관리자 암호 없애기(초기화)

간혹 관리자 계정이 필요할 암호를 모르거나 잊었을 경우 참 난감하다.

이럴때 Hiren's Boot CD 를 이용하여 암호를 초기화 하였는데 Hiren's Boot CD가 없으면 방법이 없었는데 snpbox님의 블로그에서 좋은 정보를 알게 되었다. 바로 레지스트리 하이브를 편집하는 방법 이였다.



이 작업은 PE 모드에서 작업을 하는 것으로 별도의 PE 시디가 있어야 겠지만 Windows 7 이나 2008 버전의 설치시디로도 가능하다.



설치 시디로 부팅하여 첫 화면에서 Shift + F10 키로 콘솔창을 실행시키고 콘솔 창에서 작업을 한다.

작업을 레지스트리 파일을 시스템에 병합하는 방법으로 첨부한 레지스트리 파일을 병합하면 된다. 첨부 파일을 설치 시디에 넣던지 USB로 복사하여 작업을 하면 된다.



아래 작업은 snpbox님께서 작업한 방법으로 시스템이 C:에 설치가 되었고 병합할 레지스트리 파일을 D:에 복사한 상태이다.

REG LOAD HKU\TEST C:\Windows\System32\config\SAM

REG IMPORT D:\Recovery.reg

REG UNLOAD HKU\TEST





출처 : snpbox님의 블로그 - 윈도우 Administrator 패스워드 초기화


<

Original Post : http://neodreamer-dev.tistory.com/535

2011/04/11

간편한 SQLite 관리 프로그램 - SQLiteSpy 1.9.0

SQLiteSpy 화면

SQLiteSpy 화면 (출처:홈페이지)



SQLiteSpy 는 작고 간편한 SQLite 관리 프로그램이다.

오랜만에 업데이트가 되었는데 홈페이지가 불안정 해서이지 접속이 원활하지 않은 경우가 많다.



이번 버전은 변경 사항은 아래와 같다.

SQLiteSpy 1.9.0 (2011/03/02)


  • Support for loadable extensions compiled with "fastcall" (C++ Builder) or "register" (Delphi) calling conventions.

  • Update built-in DB engine to pre SQLite 3.7.6 (DISQLite3 2.3.4).

  • On database close, open an in-memory database (:memory:).






SQLiteSpy Homepage

&

Original Post : http://neodreamer-dev.tistory.com/533

2011/04/10

C++ Builder 에 가끔 좌절한다.

C++ Builder 는 참으로 매력있는 개발툴이다.

생업을 위해서 Visual C++ 을 주로 사용하고 있지만 개인적으로는 C++ Builder를 매우 좋아 한다.



Delhpi 와의 인연으로 시작하여 C++을 주로 다루다 보니 자연스레 Builder과 함께하였다. 업무적으로 연관이 있다면 더 좋았을텐데 그렇게 되지 않았다. 대부분의 개발은 Visual C++ 이 대세이다 보니..


참 좋은 개발툴인데 가끔 내게 실망을 안겨준다.

오늘은 OpenCV 의 최신 버전을 C++ Builder 에서 사용해 보고 싶었다. 예전에 알고 있던 방법을 동원하여 보았지만 실패하고 인터넷을 검색하여 방법을 찾아보았지만 해결할 수 없었다.


OpenCV 초기 버전에는 C++ Builder 에 대한  지원을 공식적으로 했었는데 이제는 아닌것 같다. 아무래도 개발자 층이 얇은 것은 한 몫 한 것 같다.


기본적인 VCL 만으로 대단히 멋진 개발툴이지만 그 이외의 것에는 부족한 면이 많은 것 같다.&

Original Post : http://neodreamer-dev.tistory.com/532

2011/04/07

C++ Builder XE 에서 Win 7 Taskbar Button 제어하기

Visual C++ 에서는 MS 에서 지원하는 기술을 가장 먼저 접근할 수 있는 것 같다 . 얼마전 알게 된 Windows 7 의 Taskbar Button을 제어하는 것은 C++ Builder 에서 가능한지 알아 보았다. 의외로 Visual C++ 보다 수월 하였다. 물론 Dialog Based 프로젝트에 비해서...



TaskbarButtonCreated 메시지를 처리할 필요 없이 Form 생성자에서 Taskbar Button 객체를 가져오면 되었다.



일단 객체를 가져오면 이후 처리는 Visual C++ 과 별반 다를게 없다.



아래 코드는 Taskbar Button 을 가져오는 과정이다.

/////////////////////////////////////////////////////////
// Header
#include "objbase.h"
#include "Shobjidl.h"

ITaskbarList3 *m_pTaskbar;


/////////////////////////////////////////////////////////
// Source
__fastcall TfrmMain::TfrmMain(TComponent* Owner)
: TForm(Owner)
{
:

m_pTaskbar = NULL;

if ( CoCreateInstance(
CLSID_TaskbarList,
NULL,
CLSCTX_INPROC_SERVER,
IID_PPV_ARGS(&m_pTaskbar)) != S_OK )
{
m_pTaskbar = NULL;
}

:
}



2011/04/06 - [Dev Story/Tips] - Dialog based 프로젝트에서 Windows 7 Taskbar 아이콘에 Progress 출력하기

2011/04/06 - [Dev Story/Tips] - Windows 7 Taskbar 아이콘에 Progress Bar 출력하기


2011/04/06

Dialog based 프로젝트에서 Windows 7 Taskbar 아이콘에 Progress 출력하기

Dialog based 프로젝트의 경우 CFrameWnd 클래스가 없어서 적접적으로 Taskbar 관련 함수를 사용할 수 없다. 이때에는 CoCreateInstance 함수를 이용하여 Taskbar Button 객체를 가져와야 한다. 하지만 이때에 Taskbar Button 이 만들어 진 후에 작업을 해야 한다.



프로그램이 완전히 실행한 뒤에 Taskbar Button 객체를 가져와도 되지만 Taskbar Button 이 만들어진 후를 감지하여 객체를 가져오는 것이 보다 유연한 방법일 것이다. 그러기 위해서는 TaskbarButtonCreated 메시지를 받아 처리하여야 한다.



아래 코드는 메시지 등록과 이를 처리하는 과정 그리고 간단하게 Progress 를 출력하는 코드이다.

////////////////////////////////////////////////////////////////////////////////
// Header
ITaskbarList3* m_pTaskbar;

static const UINT WM_TASKBARBUTTONCREATED;
LRESULT OnTaskbarBtnCreated ( WPARAM wParam, LPARAM lParam );


////////////////////////////////////////////////////////////////////////////////
// Source
const UINT CMyTaskbarDlg::WM_TASKBARBUTTONCREATED
= RegisterWindowMessage( _T("TaskbarButtonCreated") );

BEGIN_MESSAGE_MAP(CMyTaskbarDlg, CDialogEx)
:
ON_REGISTERED_MESSAGE(WM_TASKBARBUTTONCREATED, &CMyTaskbarDlg::OnTaskbarBtnCreated)
:
END_MESSAGE_MAP()

LRESULT CMyTaskbarDlg::OnTaskbarBtnCreated ( WPARAM wParam, LPARAM lParam )
{
if ( CoCreateInstance(
CLSID_TaskbarList,
NULL,
CLSCTX_INPROC_SERVER,
IID_PPV_ARGS(&m_pTaskbar) ) != S_OK )
{
m_pTaskbar = NULL;
}

return 0;
}

void CMyTaskbarDlg::OnBnClickedBtnProgressDisplay()
{
if ( m_pTaskbar != NULL )
{
switch ( m_cmbProgressType.GetCurSel() )
{
case 1:
m_pTaskbar->SetProgressState( m_hWnd, TBPFLAG::TBPF_INDETERMINATE );
TRACE("Display Progress TBPFLAG::TBPF_INDETERMINATE \n");
break;

case 2:
m_pTaskbar->SetProgressState( m_hWnd, TBPFLAG::TBPF_NORMAL );
m_pTaskbar->SetProgressValue( m_hWnd, 72, 100 );
TRACE("Display Progress TBPFLAG::TBPF_NORMAL \n");
break;

case 3:
m_pTaskbar->SetProgressState( m_hWnd, TBPFLAG::TBPF_ERROR );
m_pTaskbar->SetProgressValue( m_hWnd, 72, 100 );
TRACE("Display Progress TBPFLAG::TBPF_ERROR \n");
break;

case 4:
m_pTaskbar->SetProgressState( m_hWnd, TBPFLAG::TBPF_PAUSED );
m_pTaskbar->SetProgressValue( m_hWnd, 72, 100 );
TRACE("Display Progress TBPFLAG::TBPF_PAUSED \n");
break;

default:
m_pTaskbar->SetProgressState( m_hWnd, TBPFLAG::TBPF_NOPROGRESS );
TRACE("Display Progress TBPFLAG::TBPF_NOPROGRESS \n");
break;
}
}
}




2011/04/06 - [Dev Story/Tips] - Windows 7 Taskbar 아이콘에 Progress Bar 출력하기


Original Post : http://neodreamer-dev.tistory.com/530

Windows 7 Taskbar 아이콘에 Progress Bar 출력하기

Windows 7 의 테스트바 아이콘은 많은 기능을 갖고 있다. 그 중 하나인 진행 상태를 표시해 보았다.

Visual Studio 2010 버전을 사용할 경우 이는 대단히 간단한 것이다. 



CFrameWnd 의 멤버 변수인 아래 세 개의  함수로 구현할 수 있다.


  • SetProgressBarState

  • SetProgressBarRange

  • SetProgressBarPosition




SetProgressBarState





void SetProgressBarState(


   TBPFLAG tbpFlags


);



Progress 의 상태를 설정하는 함수로 인자 아래와 같은 인자를 넘겨줄 수 있다.

TBPF_NOPROGRESS, TBPF_INDETERMINATE, TBPF_NORMAL, TBPF_ERROR, TBPF_PAUSED.



TBPF_NOPROGRESS - Progress 사용하지 않는 상태





TBPF_INDETERMINATE - 끝이 정해지지 않은 상태





TBPF_NORMAL - 기본 상태





TBPF_ERROR - 에러가 발생한 상태로 아래와 같이 붉은색으로 표시 된다.





TBPF_PAUSED - 진행이 멈춘 상태로 아래와 같이 노란색으로 표시 된다.









SetProgressBarRange 




void SetProgressBarRange(


   int nRangeMin,


   int nRangeMax


);



Progress 표시 범위 설정하는 함수로 최소값과 최대값을 전달하여 설정할 수 있다. 







SetProgressBarPosition




void SetProgressBarPosition(


   int nProgressPos

); 



Progress 의 현재 값을 설정하는 함수.

 

이 함수 사용에 주의할 점은 SetProgressBarState 에서 TBPF_NOPROGRESS, TBPF_INDETERMINATE 에서 설정을하고 SetProgressBarPosition 함수가 수행이 되면 Progress Bar 는 TBPF_NORMAL 상태로 출력하게 된다.



아래 코드는 간단한 사용 예로 실제 진행에 대하 것은 빠진 상태이다.

m_pFrame = (CMainFrame*)GetParentFrame();


switch ( m_cmbProgressType.GetCurSel() )
{
case 1: // TBPFLAG::TBPF_INDETERMINATE
m_pFrame->SetProgressBarState( TBPFLAG::TBPF_INDETERMINATE );
TRACE("Display Progress TBPFLAG::TBPF_INDETERMINATE \n");
break;

case 2: // TBPFLAG::TBPF_NORMAL
m_pFrame->SetProgressBarState( TBPFLAG::TBPF_NORMAL );
m_pFrame->SetProgressBarRange( 0, 100 );
m_pFrame->SetProgressBarPosition( 72 );
TRACE("Display Progress TBPFLAG::TBPF_NORMAL \n");
break;

case 3: // TBPFLAG::TBPF_ERROR
m_pFrame->SetProgressBarState( TBPFLAG::TBPF_ERROR );
m_pFrame->SetProgressBarRange( 0, 100 );
m_pFrame->SetProgressBarPosition( 72 );
TRACE("Display Progress TBPFLAG::TBPF_ERROR \n");
break;

case 4: // TBPFLAG::TBPF_PAUSED
m_pFrame->SetProgressBarState( TBPFLAG::TBPF_PAUSED );
m_pFrame->SetProgressBarRange( 0, 100 );
m_pFrame->SetProgressBarPosition( 72 );
TRACE("Display Progress TBPFLAG::TBPF_PAUSED \n");
break;

default: // TBPFLAG::TBPF_NOPROGRESS
m_pFrame->SetProgressBarState( TBPFLAG::TBPF_NOPROGRESS );
TRACE("Display Progress TBPFLAG::TBPF_NOPROGRESS \n");
break;
}

<

Original Post : http://neodreamer-dev.tistory.com/529

2011/04/05

굿모닝 팝스 청취 프로그램 GMP Build 11



이전 버전(Build 10)의 XP 에서 오류발생하는 문제 수정.


&

Original Post : http://neodreamer-dev.tistory.com/528

델파이 64비트 컴파일에 시동걸다.



드디어 델파이가 64비트 컴파일을 지원하기 시작했다.

많이 늦은 감이 있기에 좀 더 가속이 필요할 것 같다. 들리는 소문에 의하면 델파이가 먼저 64비트 컴파일을 지원하고 C++ Builder 는 다음 버전에 지원을 한다고 하는데 기왕 나오는거 같이 나와 주었으면... 


오늘 공개한 Sneak Preview 에서는  간단한 예를 보여주면 쉽게 64bit Platform 을 추가하는 걸 보여주고 있다. 소개 장면에서 Hello South Korea 라고 입력하는 장면이 나와서 살짝 놀랐다. 


기존 프로젝트도 64bit Platform 을 추가하고 컴파일만 하면 쉽게 64비트용 프로그램이나 컴포넌트를 쉽게 만들 수 있다. 64bit를 지원하면서 달라진 것이라고는 포인터(핸들)와 NativeUnit 이 64비트로 변경된 것이 전부여서 64bit 프로그래밍에 쉽게 접근할 수 있을 것 같다.


http://www.embarcadero.com/products/delphi/64-bit&

Original Post : http://neodreamer-dev.tistory.com/527

2011/04/04

시스템 종료와 관련된 윈도우 메시지 : WM_QUERYENDSESSION, WM_ENDSESSION



WM_QUERYENDSESSION


시스템 종료 확인 메시지






시스템이 종료 또는 로그오프시에 응용프로그램에 WM_QUERYENDSESSION 이 전달 되고, 이 때 종료를 거부하며련 FALST 를 허가 하려면 TRUE 를 반환한다.


TRUE 를 반환하면 시스템은 해당 응용프로그램에 WM_ENDSESSION 를 전달하여 프로그램에 시스템 종료를 알리고 시스템을 종료한다.

if ( lParam & ENDSESSION_LOGOFF ) 
{
// Log-off
}
else
{
// Shutdown
}



참고 사이트 : WinAPI, MSDN




WM_ENDSESSION


시스템 종료 메시지





시스템 종료가 결정되 되고 종료됨을 알리는 메시지 이다. 메시지 처리 후 0을 리턴 한다. 



if ( wParam == TRUE )
{
// Shutdowning...

if ( lParam & ENDSESSION_LOGOFF )
{
// Log-off
}
else
{
// Shutdown
}
}
else
{
// ??
}



참고 사이트 : WinAPI, MSDN 

 <

Original Post : http://neodreamer-dev.tistory.com/526

굿모닝 팝스 청취 프로그램 GMP build 10



청취 프로그래스바 상태를 윈도우 7 의 작업표시줄 아이콘에 표시하도록 수정.

XP 사용자는 이전 버전을 사용하여 주시기 바랍니다. GMP_v0.0.0.7


<

Original Post : http://neodreamer-dev.tistory.com/525

MiniDic Build 36



이번 버전에서 수정 된 사항

    - 시스템 종료시 종료 되도록 수정

    - Hot Key 를 Ctrl + Alt + Shift + D 로 변경

    - 웹 브라우저에 Ctrl + C, V 키 적용


Windows 7 에서 시스템 종료시 MiniDic 이 종료되지 않아 시스템 종료 화면에서 멈추는 문제를 개선하고 사전창에서 Ctrl + C, V 키가 적용이 되도록 수정하였다.




<

Original Post : http://neodreamer-dev.tistory.com/524