Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Syntax Edit
  New Posts New Posts RSS Feed - Default syntax highlight
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Default syntax highlight

 Post Reply Post Reply
Author
Message
Dukyoung View Drop Down
Newbie
Newbie


Joined: 06 November 2007
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dukyoung Quote  Post ReplyReply Direct Link To This Post Topic: Default syntax highlight
    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)
Back to Top
Dukyoung View Drop Down
Newbie
Newbie


Joined: 06 November 2007
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dukyoung Quote  Post ReplyReply Direct Link To This Post 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?
Back to Top
Knuth View Drop Down
Groupie
Groupie
Avatar

Joined: 01 March 2008
Location: China
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote Knuth Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.