Print Page | Close Window

Default syntax highlight

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Syntax Edit
Forum Description: Topics Related to Codejock Syntax Edit
URL: http://forum.codejock.com/forum_posts.asp?TID=8691
Printed Date: 11 December 2024 at 9:10pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Default syntax highlight
Posted By: Dukyoung
Subject: Default syntax highlight
Date Posted: 06 November 2007 at 11:59am

Hello,

I want to use the c++ syntax high-lighting as default.
but it is enabled when the file is saved with *.c
(parent:file = <*.c | *.cpp|*.h|*.inl|*.tli|*.tlh|*.rc|*.rc2> )

How can I set C++ syntax as default? (before saving the file)



Replies:
Posted By: Dukyoung
Date Posted: 06 November 2007 at 1:27pm
I solved it.
 
CXTPSyntaxEditBufferManager* pDataMan = m_ctrlSynEdit.GetEditBuffer();
CString ext = ".c";
pDataMan->SetFileExt(ext);
pDataMan->EnableParser(TRUE);
 
but I have another problem...
I make CXTPTabControl object on View window and add the SyntaxEditView on the tab control.
But there are 2 scrollbars on the screen. If I set editView.ScrollBars(FALSE), then all of these scrollbars disappear. I want just 1 scrollbar.
How can I do that?


Posted By: Knuth
Date Posted: 13 March 2008 at 11:25pm
CXTPSyntaxEditView::SetScrollBars MethodEnable/disable scroll bar.

BOOL SetScrollBars(
    BOOL bHorz,
    BOOL bVert,
    BOOL bUpdateReg = FALSE,
    BOOL bRecalcLayout = TRUE
);
Parameters

bHorz
[in] TRUE if horizontal scroll bar need to be enabled/disabled.
bVert
[in] TRUE if vertical scroll bar need to be enabled/disabled.
bUpdateReg
[in] Set TRUE to save these options in registry.
bRecalcLayout
[in] Set TRUE to recalculate layout.

Returns
TRUE if scrollbars were updated, FALSE otherwise.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net