for functions i need :
1, tag
2, gallery
3. document management
4, TBD
Beautiful images don't translate into something you expecting viewer to comprehend unless viewer is steered in that direction.
Sleep(Atime: cardinal);
Atime: cardinal
the number of ms to sleep.
suspend the current thread. once you have something waiting for computer hw read write act to finish, this command can be treated as pospone for the hw.
可以中斷目前的工作 Atime ms 再繼續.
在某些許等待硬體儲存動作時 這Sleep
可以拿來當作等待儲存動作完成.
sometime we have to call exetrnal exe file or include multimedia files in BCB, here is a easy method to do it.
make a rc file with ultraedit or text editor.
below is the format:
name format filename
E11 EXEFILE jhead.exe
im1 ICON 000.jpg
char exefile[100], tmppath[100] ;
unsigned long ret ;
//check exist of jhead.exe
GetTempPath( 100, tmppath ) ;
strcpy( exefile ,(AnsiString(tmppath)+
AnsiString("\\jhead.exe") ).c_str() ) ; //under same folder using \\
ret = GetFileAttributes( exefile ) ;
if( ret == 0xffffffff )
{ //not exist, save jhead.exe
TResourceStream &rs = *new TResourceStream( (int)Hinstance, AnsiString("E11"),"EXEFILE" ) ;
rs.SaveToFile( AnsiString(exefile) ) ;
delete &rs ;
}
//run jhead.exe
ShellExecute(Hinstance, "open", exefile, "","", SW_HIDE ) ;
TColor is used to specify the color of an object.
Unit
Graphics
enum TColor {clMin=-0x7fffffff-1, clMax=0x7fffffff};
Description
TColor is used to specify the color of an object. It is used by the Color property of many components and by a number of other properties that specify color values.
The Graphics unit contains definitions of useful constants for TColor. These constants map either directly to the closest matching color in the system palette (for example, clBlue maps to blue) or to the corresponding system screen element color defined in the Color section of the Windows Control panel (for example, clBtnFace maps to the system color for button faces).
If you specify TColor as a specific 4-byte hexadecimal number instead of using the constants defined in the Graphics unit, the low three bytes represent RGB color intensities for blue, green, and red, respectively. The value 0x00FF0000 represents full-intensity, pure blue, 0x0000FF00 is pure green, and 0x000000FF is pure red. 0x00000000 is black and 0x00FFFFFF is white.
If the highest-order byte is zero (0x00), the color obtained is the closest matching color in the system palette. If the highest-order byte is one (0x01), the color obtained is the closest matching color in the currently realized palette. If the highest-order byte is two (0x02), the value is matched with the nearest color in the logical palette of the current device context.
The following tables lists the color constants from the Graphics unit. The first two columns list the colors that map to the closest matching color in the system palette, while the last two columns list the colors that are defined in the Windows Control panel.
Value Meaning Value Meaning
clNone White on Windows 9x, Black on NT. clScrollBar Current color for the of scroll bar track.
clAqua Aqua clBackground Current background color of the Windows desktop
clBlack Black clActiveCaption Current color of the title bar of the active window
clBlue Blue clInactiveCaption Current color of the title bar of inactive windows
clCream Cream clMenu Current background color of menus
clDkGray Dark Gray clWindow Current background color of windows
clFuchsia Fuchsia clWindowFrame Current color of window frames
clGray Gray clMenuText Current color of text on menus
clGreen Green clWindowText Current color of text in windows
clLime Lime green clCaptionText Current color of the text on the title bar of the active window
clLtGray Light Gray clActiveBorder Current border color of the active window
clMaroon Maroon clInactiveBorder Current border color of inactive windows
clMedGray Medium Gray clAppWorkSpace Current color of the application workspace
clMoneyGreen Mint green clHighlight Current background color of selected text
clNavy Navy blue clHightlightText Current color of selected text
clOlive Olive green clBtnFace Current color of a button face
clPurple Purple clBtnShadow Current color of a shadow cast by a button
clRed Red clGrayText Current color of text that is dimmed
clSilver Silver clBtnText Current color of text on a button
clSkyBlue Sky blue clInactiveCaptionText Current color of the text on the title bar of an inactive window
clTeal Teal clBtnHighlight Current color of the highlighting on a button
clWhite White cl3DDkShadow Windows 95 or NT 4.0 only: Dark shadow for three-dimensional display elements
clYellow Yellow cl3DLight Windows 95 or NT 4.0 only: Light color for three-dimensional display elements (for edges facing the light source)
clInfoText Windows 95 or NT 4.0 only: Text color for tool tip controls
clInfoBk Windows 95 or NT 4.0 only: Background color for tool tip controls
clGradientActiveCaption Windows 98 or Windows 2000: Right side color in the color gradient of an active window's title bar. clActiveCaption specifies the left side color.
clGradientInactiveCaption Windows 98 or Windows 2000: Right side color in the color gradient of an inactive window's title bar. clInactiveCaption specifies the left side color.
clDefault The default color for the control to which the color is assigned.
Another useful and powerful exif modification and read tool.
based on its clear definition and explanation on EXIF tags and all other related hidden information, the power the tool is expected.
http://www.sno.phy.queensu.ca/~phil/exiftool/index.html
however, no source code is provided. anyway, take it as a target to finetune code is also a good isea.
I just did math in BCB and found decimal is gone, all 0, even I used double, float, etc........
then I figure out there is one rule in C program which is
interger divide by interger the result is interger. decimal divide by decimal result decimal.
Unless I used decimal, there will not have decimal exist.
the code is modified to force type transforming which means putting an "(double)" right after "=" on your demand.
ex:
int a = 65536, b = 12028;
double c;
c = (double) b/a;
As we know EXIF is an information stored camera photographing related information.
I recently need to bundle it in my project so many information are discoverd from internet and place here.
EXIF org.
http://www.exif.org/
Two major must read docs.
Exif 2.2 and Tiff 6.0 both can be found here:
http://www.exif.org/specifications.html
Exif decode source code:
jhead, Exif jpg header and thumbnail manipulator program. based on v2.2
It is nice and organized structure and could be modified by requirement.
http://www.sentex.net/~mwandel/jhead/
CEXIF based on EXiF v2.1
Easy to understand especially for a C rookie like me.
http://www.codeproject.com/bitmap/cexif.asp
Exif Extractor
It seems is popular on internet, however, I have not checked it yet.
http://www.codeproject.com/csharp/exifextractor.asp
Exif Tag Editor a combination GUI of above two.
In BCB, there is a convenient way to determine file existing or not.
FileExists()
extern PACKAGE bool __fastcall FileExists(const AnsiString FileName);
Us usally we use if loop for action in next.
if (FileExists(NewFile))
{
ThumbImg->Picture->LoadFromFile(NewFile);
}
最近試做 開啟圖檔 手動抓取 exif 資訊的小程式
原本的Matlab 沒辦法做到支援外部拖曳的功能 轉而嘗試用C來達成
也因而發現了幾個讓自己C語言的基礎扎根的一些觀念
1, fopen 要用 "rb"
2, 字串的比對在遇到空白會自動的以為比對到結尾 而中斷.
3, 為了解決 2 的問題 直接去獨記憶體的位置會是就可以避開問題, 也間接的我的指標觀念馬上開竅了,
這是今天學到的東西
感觸很多的是 Matlab, VB 這些語法相較之下 省去了直接跟記憶體打交道的問題.
但重新選擇的話:
C 的優勢是 記憶體觀念佳 , 語法會較嚴謹, 但入門會較易有挫折感.
VB 與 Matlab 就剛好跟 C 是相反的了.
Technorati : matlab c bcb vb cooding
Del.icio.us : matlab c bcb vb cooding
First two have very impressive topics on bcb and other programs. hope it will give you a hand.
CPlusPlus carrys entire C help and function instruction.
像我這樣 突然學BCB6的人 應該都會遇到的一個問題
程式在別人家無法執行
1、Project->Options->Compiler->點選Release;
2、Project->Options->Linker->取消Use dynamic RTL選項;
3、Project->Options->Packages->取消Build with runtime packages選項;
4、Tools->Debugger Options->取消Integrated debbugging選項;[非必須,建議取消]
from: http://topic.csdn.net/t/20041122/14/3576683.html