修改scite 配置 更好的支持win32api

来源:互联网 发布:数据备份的方式 编辑:程序博客网 时间:2024/05/16 17:46

     近来研究win32编程,觉得用vc6很麻烦,但是bcc对资源调用就是很无奈,看了半天说明书也看不懂怎么调用。google大法,在一论坛找到资料,居然异常简单:

    源程序中加入:#pragma resource "*.res"  //  Build by Borland C++  Compile

   调用同名的.res文件 这个文件需要预先编译好可以用bcc自带的brcc32.exe scite配置如下:

 command.compile.*.rc=brcc32 $(FileNameExt)
 command.build.*.rc=$(make.command)
编译连接 更简单只用一个命令即可无需分开 :

ccw=e:/bcc5/Bin/bcc32 -tW "$(FileDir)/$(FileNameExt)"

完整的cpp配置文件如下 我加入了一些api的关键字

# Define SciTE settings for C++, C, Ch, Java, IDL, JavaScript, Flash (ActionScript 2) files.

# sma files are Small script (C-like)
file.patterns.cpp=*.c;*.cc;*.cpp;*.cxx;*.cs;*.h;*.hh;*.hpp;*.hxx;*.sma
# pln, inc and t are SilkTest (4Test) files.
file.patterns.test=*.pln;*.inc;*.t
file.patterns.cs=*.cs
file.patterns.d=*.d
file.patterns.rc=*.rc;*.rc2;*.dlg
file.patterns.idl=*.idl;*.odl
file.patterns.flash=*.as;*.asc;*.jsfl
file.patterns.ch=*.ch;*.chf;*.chs
file.patterns.c.like=$(file.patterns.cpp);$(file.patterns.cs);$(file.patterns.d);$(file.patterns.idl);*.java;$(file.patterns.flash);$(file.patterns.ch)

filter.cpp=C/C++ (c cc cpp cxx cs h hh hxx hpp dlg rc rc2 mak)|/
$(file.patterns.cpp);$(file.patterns.rc);*.mak;make*|
filter.d=D (d)|*.d|
filter.java=Java (java)|*.java|
filter.js=JavaScript (js)|*.js|
filter.idl=IDL (idl odl)|$(file.patterns.idl)|
filter.test=SilkTest (pln inc t)|$(file.patterns.test)|
filter.flash=Flash (as asc jsfl)|$(file.patterns.flash)|
filter.ch=Ch (ch chf chs)|$(file.patterns.ch)|

lexer.*.java=cpp
lexer.$(file.patterns.cpp)=cpp
lexer.$(file.patterns.d)=cpp
lexer.$(file.patterns.rc)=cpp
lexer.$(file.patterns.idl)=cpp
lexer.$(file.patterns.cs)=cpp
lexer.*.js=cpp
lexer.$(file.patterns.test)=cpp
lexer.$(file.patterns.flash)=cpp
lexer.$(file.patterns.ch)=cpp

keywordclass.cpp=and and_eq asm auto bitand bitor bool break /
case catch char class compl const const_cast continue /
default delete do double dynamic_cast else enum explicit export extern false float for /
friend goto if inline int long mutable namespace new not not_eq /
operator or or_eq private protected public /
register reinterpret_cast return short signed sizeof static static_cast struct switch /
template this throw true try typedef typeid typename union unsigned using /
virtual void volatile wchar_t while xor xor_eq  include define /
BOOL DWORD LPCTSTR TRUE FALSE HANDLE LPTSTR NULL TCHAR /
WNDCLASS HWND MSG LRESULT CALLBACK  APIENTRY HINSTANCE /
RECT HDC  PAINTSTRUCT HMENU WPARAM LPARAM UINT

keywords.$(file.patterns.cpp)=$(keywordclass.cpp)
# keywords2 is for highlighting user defined keywords or function calls or similar
#keywords2.$(file.patterns.cpp)=file
# keywords3 is for doc comment keywords, highlighted in style 17
#CPP doxygen
keywords3.$(file.patterns.cpp)=a addindex addtogroup anchor arg attention /
author b brief bug c class code date def defgroup deprecated dontinclude /
e em endcode endhtmlonly endif endlatexonly endlink endverbatim enum example exception /
f$ f[ f] file fn hideinitializer htmlinclude htmlonly /
if image include ingroup internal invariant interface latexonly li line link /
mainpage name namespace nosubgrouping note overload /
p page par param post pre ref relates remarks return retval /
sa section see showinitializer since skip skipline struct subsection /
test throw todo typedef union until /
var verbatim verbinclude version warning weakgroup $ @ / & < > # { }

word.chars.cxx=$(chars.alpha)$(chars.numeric)_#
word.characters.$(file.patterns.cpp)=$(word.chars.cxx)
comment.block.cpp=//~
#comment.block.at.line.start.cpp=1
comment.stream.start.cpp=/*
comment.stream.end.cpp=*/
comment.box.start.cpp=/*
comment.box.middle.cpp= *
comment.box.end.cpp= */
#fold.at.else=1

statement.indent.$(file.patterns.c.like)=5 case catch class default do else finally /
for if private protected public struct try union while
statement.end.$(file.patterns.c.like)=10 ;
statement.lookback.$(file.patterns.c.like)=20
block.start.$(file.patterns.c.like)=10 {
block.end.$(file.patterns.c.like)=10 }

#autocomplete.cpp.fillups=(

#styling.within.preprocessor=1
preprocessor.symbol.$(file.patterns.cpp)=#
preprocessor.start.$(file.patterns.cpp)=if ifdef ifndef
preprocessor.middle.$(file.patterns.cpp)=else elif
preprocessor.end.$(file.patterns.cpp)=endif

keywordclass.ch=
auto array bool break case char class complex ComplexInf ComplexNaN /
const continue default delete /
do double else enum export extern float for foreach goto if Inf inline int /
long namespace NaN new NULL private public register restrict return short /
signed sizeof static string_t struct switch this typedef union unsigned /
using void volatile wchar_t while __declspec
keywords.$(file.patterns.ch)=$(keywordclass.ch)
word.chars.ch=$(chars.alpha)$(chars.numeric)_#
word.characters.$(file.patterns.ch)=$(word.chars.cxx)
comment.block.ch=//~
#comment.block.at.line.start.ch=1
comment.stream.start.ch=/*
comment.stream.end.ch=*/
comment.box.start.ch=/*
comment.box.middle.ch= *
comment.box.end.ch= */
preprocessor.symbol.$(file.patterns.ch)=#
preprocessor.start.$(file.patterns.ch)=if ifdef ifndef
preprocessor.middle.$(file.patterns.ch)=else elif
preprocessor.end.$(file.patterns.ch)=endif


keywordclass.cs=abstract as base bool break byte case catch char checked class /
const continue decimal default delegate do double else enum /
event explicit extern false finally fixed float for foreach goto if /
implicit in int interface internal is lock long namespace new null /
object operator out override params private protected public /
readonly ref return sbyte sealed short sizeof stackalloc static /
string struct switch this throw true try typeof uint ulong /
unchecked unsafe ushort using virtual void while/

keywords.$(file.patterns.cs)=$(keywordclass.cs)
word.characters.$(file.patterns.cs)=$(word.chars.cxx)

keywordclass.d=abstract alias align asm assert auto /
bit body break byte case cast catch cdouble cent cfloat char class const continue creal /
dchar debug default delegate delete deprecated do double /
else enum export extern false final finally float for foreach function /
goto idouble if ifloat import in inout int interface invariant ireal is /
long mixin module new null out override package pragma private protected public /
real return short static struct super switch synchronized /
template this throw true try typedef typeid typeof /
ubyte ucent uint ulong union unittest ushort version void volatile wchar while with
keywords.$(file.patterns.d)=$(keywordclass.d)

keywordclass.rc=/
ACCELERATORS ALT AUTO3STATE AUTOCHECKBOX AUTORADIOBUTTON /
BEGIN BITMAP BLOCK BUTTON CAPTION CHARACTERISTICS CHECKBOX CLASS /
COMBOBOX CONTROL CTEXT CURSOR DEFPUSHBUTTON DIALOG DIALOGEX DISCARDABLE /
EDITTEXT END EXSTYLE FONT GROUPBOX ICON LANGUAGE LISTBOX LTEXT /
MENU MENUEX MENUITEM MESSAGETABLE POPUP /
PUSHBUTTON RADIOBUTTON RCDATA RTEXT SCROLLBAR SEPARATOR SHIFT STATE3 /
STRINGTABLE STYLE TEXTINCLUDE VALUE VERSION VERSIONINFO VIRTKEY
keywords.$(file.patterns.rc)=$(keywordclass.rc)

keywordclass.idl=/
aggregatable allocate appobject arrays async async_uuid /
auto_handle /
bindable boolean broadcast byte byte_count /
call_as callback char coclass code comm_status /
const context_handle context_handle_noserialize /
context_handle_serialize control cpp_quote custom /
decode default defaultbind defaultcollelem /
defaultvalue defaultvtable dispinterface displaybind dllname /
double dual /
enable_allocate encode endpoint entry enum error_status_t /
explicit_handle /
fault_status first_is float /
handle_t heap helpcontext helpfile helpstring /
helpstringcontext helpstringdll hidden hyper /
id idempotent ignore iid_as iid_is immediatebind implicit_handle /
import importlib in include in_line int __int64 __int3264 interface /
last_is lcid length_is library licensed local long /
max_is maybe message methods midl_pragma /
midl_user_allocate midl_user_free min_is module ms_union /
ncacn_at_dsp ncacn_dnet_nsp ncacn_http ncacn_ip_tcp /
ncacn_nb_ipx ncacn_nb_nb ncacn_nb_tcp ncacn_np /
ncacn_spx ncacn_vns_spp ncadg_ip_udp ncadg_ipx ncadg_mq /
ncalrpc nocode nonbrowsable noncreatable nonextensible notify /
object odl oleautomation optimize optional out out_of_line /
pipe pointer_default pragma properties propget propput propputref /
ptr public /
range readonly ref represent_as requestedit restricted retval /
shape short signed size_is small source strict_context_handle /
string struct switch switch_is switch_type /
transmit_as typedef /
uidefault union unique unsigned user_marshal usesgetlasterror uuid /
v1_enum vararg version void wchar_t wire_marshal

keywordclass.msidl=handle
keywordclass.xpidl=attribute native noscript scriptable shared wstring inout
keywords.$(file.patterns.idl)=$(keywordclass.idl) $(keywordclass.xpidl)

keywordclass.java=abstract assert boolean break byte case catch char class /
const continue default do double else extends final finally float for future /
generic goto if implements import inner instanceof int interface long /
native new null outer package private protected public rest /
return short static super switch synchronized this throw throws /
transient try var void volatile while
keywords.*.java=$(keywordclass.java)

keywordclass.javascript=abstract boolean break byte case catch char class /
const continue debugger default delete do double else enum export extends /
final finally float for function goto if implements import in instanceof /
int interface long native new package private protected public /
return short static super switch synchronized this throw throws /
transient try typeof var void volatile while with
keywords.*.js=$(keywordclass.javascript)

keywordclass.flash=add and break case catch class continue default delete do /
dynamic else eq extends false finally for function ge get gt if implements import in /
instanceof interface intrinsic le lt ne new not null or private public return /
set static super switch this throw true try typeof undefined var void while with

keywordclass2.flash=Array Arguments Accessibility Boolean Button Camera Color /
ContextMenu ContextMenuItem Date Error Function Key LoadVars LocalConnection Math /
Microphone Mouse MovieClip MovieClipLoader NetConnection NetStream Number Object /
PrintJob Selection SharedObject Sound Stage String StyleSheet System TextField /
TextFormat TextSnapshot Video Void XML XMLNode XMLSocket /
_accProps _focusrect _global _highquality _parent _quality _root _soundbuftime /
arguments asfunction call capabilities chr clearInterval duplicateMovieClip /
escape eval fscommand getProperty getTimer getURL getVersion gotoAndPlay gotoAndStop /
ifFrameLoaded Infinity -Infinity int isFinite isNaN length loadMovie loadMovieNum /
loadVariables loadVariablesNum maxscroll mbchr mblength mbord mbsubstring MMExecute /
NaN newline nextFrame nextScene on onClipEvent onUpdate ord parseFloat parseInt play /
prevFrame prevScene print printAsBitmap printAsBitmapNum printNum random removeMovieClip /
scroll set setInterval setProperty startDrag stop stopAllSounds stopDrag substring /
targetPath tellTarget toggleHighQuality trace unescape unloadMovie unLoadMovieNum updateAfterEvent

keywords.$(file.patterns.flash)=$(keywordclass.flash)
keywords2.$(file.patterns.flash)=$(keywordclass2.flash)

# C++ styles

# Default
style.cpp.32=$(font.base)
# White space
style.cpp.0=fore:#8080f0
#屏幕文字颜色
# Comment: /* */.
style.cpp.1=fore:#8080f0,$(font.code.comment.box)
#注释颜色
# Line Comment: //.
style.cpp.2=fore:#8080f0,$(font.code.comment.line)
# Doc comment: block comments beginning with /** or /*!
style.cpp.3=$(colour.code.comment.doc),$(font.code.comment.doc)
# Number
style.cpp.4=$(colour.number)
# Keyword
style.cpp.5=$(colour.keyword),bold
# Double quoted string
style.cpp.6=$(colour.string)
# Single quoted string
style.cpp.7=$(colour.char)
# UUIDs (only in IDL)
style.cpp.8=fore:#804080
# Preprocessor
# 预定义颜色
style.cpp.9=fore:#8000f0
#style.cpp.9=$(colour.preproc)
# Operators
style.cpp.10=$(colour.operator),bold
# Identifiers
style.cpp.11=
# End of line where string is not closed
style.cpp.12=fore:#000000,$(font.monospace),back:#E0C0E0,eolfilled
# Verbatim strings for C#
style.cpp.13=fore:#007F00,$(font.monospace),back:#E0FFE0,eolfilled
# Regular expressions for JavaScript
style.cpp.14=fore:#7F3F,$(font.monospace),back:#E0F0FF,eolfilled
# Doc Comment Line: line comments beginning with /// or //!.
style.cpp.15=$(colour.code.comment.doc),$(font.code.comment.doc)
# Keywords2
style.cpp.16=fore:#B00040
# Comment keyword
style.cpp.17=fore:#3060A0,$(font.code.comment.doc)
# Comment keyword error
style.cpp.18=fore:#804020,$(font.code.comment.doc)
# Braces are only matched in operator style
braces.cpp.style=10

ccw=e:/bcc5/Bin/bcc32 -tW "$(FileDir)/$(FileNameExt)"
cc=E:/bcc5/Bin/bcc32 -y -v -c -o"$(FileDir)/$(FileName).obj" "$(FileDir)/$(FileNameExt)"
build=e:/bcc5/Bin/ilink32 -v "$(FileDir)/$(FileName).obj"  import32.lib cw32.lib c0x32.obj /ap
buildw=e:/bcc5/Bin/ilink32 -v "$(FileDir)/$(FileName).obj"  import32.lib cw32.lib c0w32.obj /aa

command.compile.*.c=$(cc)
command.build.*.c=$(build)
command.go.*.c=$(FileName)

command.compile.*.c=$(cc)
command.build.*.c=$(build)
command.go.*.c=$(FileName)

command.compile.*.cc=$(cc)
command.build.*.cc=$(build)
command.go.*.cc=$(FileName)

command.compile.*.cpp=$(cc)
command.build.*.cpp=$(build)
command.go.*.cpp=$(FileName)

command.compile.*.cxx=$(cc)
command.build.*.cxx=$(build)
command.go.*.cxx=$(FileName)

command.go.subsystem.*=2
command.build.*.h=make

command.name.3.*.c=生成Win
command.3.*.c=$(buildw)
command.subsystem.3.*.c=0

command.name.3.*.cpp=生成Win
command.3.*.cpp=$(buildw)
command.subsystem.3.*.cpp=0

command.name.4.*.c=编译连接api
command.4.*.c=$(ccw)
command.subsystem.4.*.c=0

command.name.5.*.c=测试
command.5.*.c=$(FileDir)/$(FileName).exe
command.subsystem.5.*.c=0

command.name.5.*.cpp=测试
command.5.*.cpp=$(FileDir)/$(FileName).exe
command.subsystem.5.*.cpp=0

command.name.0.*=清除temp
command.0.*=$(FileDir)/dd.bat
command.subsystem.0.*=0
#rm -f *.obj *.map *.ilc *.ild *.ilf *.ils *.tds

#command.name.0.*=清除temp
#command.0.*=rm -f *.obj *.map *.ilc *.ild *.ilf *.ils *.tds
#command.subsystem.0.*=0


if PLAT_WIN
 command.compile.*.rc=brcc32 $(FileNameExt)
 command.build.*.rc=$(make.command)
 command.help.$(file.patterns.cpp)=$(CurrentWord)!G:/Program Files/Microsoft Visual Studio/MSDN98/98VSa/1033/MSDNVS6A.COL
 command.help.subsystem.$(file.patterns.cpp)=4
 command.go.*.js=cscript /nologo $(FileNameExt)
# When maintaining old Win16 programs...
# command.help.$(file.patterns.cpp)=$(CurrentWord)!I:/msvc/help/win31wh.hlp
# command.help.subsystem.$(file.patterns.cpp)=5

if PLAT_GTK
 command.help.$(file.patterns.cpp)=man $(CurrentWord) | col -b

if PLAT_WIN
 command.build.*.cs=csc /t:winexe $(FileNameExt) /r:system.dll,system.drawing.dll
 command.go.*.cs=$(FileName)
 command.go.subsystem.*.cs=1
if PLAT_GTK
 command.build.*.cs=mcs /t:winexe $(FileNameExt) /r:System,System.Drawing                                                                               
 command.go.*.cs=mono $(FileName).exe
 command.go.subsystem.*.cs=1

command.compile.*.d=dmd -O $(FileNameExt)
command.build.*.d=$(make.command)
command.go.*.d=$(FileName)

command.compile.*.java=javac $(FileNameExt)
command.build.*.java=javac *.java
command.go.*.java=java $(FileName)

command.compile.*.ch=ch -n $(FileNameExt)
command.build.*.ch=ch -n  $(FileNameExt)
command.go.*.ch=ch -u $(FileNameExt)

原创粉丝点击