vc 怎么使用RadASM里的RAEdit控件。。。?
我下载了Simed的源码,但都是asm的,怎么在vc中使用RAedit.
光是加载RAEdit.dll 好像不行啊!
第一步载入:
hDll = LoadLibrary("RAEdit.dll");
窗体初始化时创建控件:
g_hEdit = CreateWindowEx(WS_EX_CLIENTEDGE,"RAEdit","SrcEdit",0x9004 | WS_CHILD | WS_VISIBLE ,11,42,Rect.right-Rect.left,Rect.bottom-Rect.top,hwndDlg,NULL,NULL,NULL);
ShowWindow(g_hEdit,SW_SHOW);
最后设置高亮关键字:
SendMessage(g_hEdit,0x7E8,0x0C73C4B,(LPARAM)"BOOL CHAR WCHAR_T VOID DOUBLE FLOAT INT LONG SHORT SIGNED __SIGNED __SIGNED__ UNSIGNED DEFINED #DEFINE #ELIF #ELSE #ENDIF #ERROR \
#IF #IFDEF #IFNDEF #IMPORT #INCLUDE #LINE #PRAGMA #UNDEF #USING CONST __CONST __CONST__ RESTRICT __RESTRICT __RESTRICT__ VOLATILE __VOLATILE \
__VOLATILE__ TYPEDEF EXTERN STATIC AUTO REGISTER PRIVATE PROTECTED PUBLIC FRIEND MUTABLE EXPLICIT CONST_CAST DYNAMIC_CAST REINTERPRET_CAST \
STATIC_CAST CLASS ENUM STRUCT NAMESPACE OPERATOR TEMPLATE THIS TYPEID TYPENAME UNION USING VIRTUAL SIZEOF DELETE NEW __DECLSPEC __CDECL \
__CDECL__ CDECL STDCALL __STDCALL __STDCALL__ FASTCALL __FASTCALL __FASTCALL__ BREAK CONTINUE DO ELSE FOR GOTO IF WHILE RETURN CASE DEFAULT SWITCH ASM __ASM __ASM__ INLINE __INLINE __INLINE__ __FORCEINLINE \
__ATTRIBUTE __ATTRIBUTE__ __LABEL__ TYPEOF __TYPEOF __TYPEOF__ __EXTENSION__ __FUNCTION__ __FUNC__ __ALIGNOF __ALIGNOF__");
还需要设置下字体不然就会有显示一半的问题
hFont = (HFONT)SendMessage(hwndDlg,WM_GETFONT,NULL,NULL);
SendMessage(g_hEdit,WM_SETFONT,(WPARAM)hFont,NULL);
其他功能需要自己去看控件源码