Beispiel #1
0
// PostParentKeyDown --------------------------------------------------------
BOOL CCodeListCtrl::PostParentKeyDown( WPARAM, LPARAM, LRESULT* )
{
   // Get currently selected word, if any
   int iItem = -1;
   LPTSTR pszWord = NULL;
   HWND hEdit = m_pEdit->GetWindow();
   int iLen = CM_GetWordLength( hEdit, NULL, FALSE );

   if( iLen )
   {
      pszWord = new TCHAR[ iLen + 1 ];

      if( pszWord )
      {
         *pszWord = L'\0';

         if( CME_SUCCESS == CM_GetWord( hEdit, pszWord, NULL ) )
         {
            // Select closest match in list
            iItem = FindString( pszWord, TRUE );
         }
      }
   }

   if( -1 != iItem )
   {
      // We found an item in the list that matches the current word.  See
      // if the parent wants us to automatically select the word in the
      // list.
      //
      CM_CODELISTSELWORDDATA hdr = {0};

      hdr.iItem = iItem;

      if( NotifyParent( CMN_CODELISTSELWORD, (LPNMHDR)&hdr ) )
         SelectItem( iItem );
   }

   if( pszWord )
      delete [] pszWord;

   return TRUE;// handled
}
Beispiel #2
0
// this function exists only in the debug build and exists solely to catch compile errors in the CM_xxx macros
void MacroVerify()
{
	HWND hWnd = NULL;
	{
		LPCTSTR pszName = 0; 
		CM_SetLanguage( hWnd, pszName );
	}
	{
		LPCTSTR pszName = 0; 
		CM_GetLanguage( hWnd, pszName );
	}
	{
		BOOL bEnable = 0; 
		CM_EnableColorSyntax( hWnd, bEnable );
	}
	{
		CM_IsColorSyntaxEnabled( hWnd );
	}
	{
		LPCTSTR pszFileName = 0;
		CM_OpenFile( hWnd, pszFileName );
	}
	{
		LPCTSTR pszFileName = 0;
		CM_POSITION *pPos = 0;
		CM_InsertFile( hWnd, pszFileName, pPos );
	}
	{
		LPCTSTR pszText = 0;
		CM_POSITION *pPos = 0;
		CM_InsertText( hWnd, pszText, pPos );
	}
	{
		LPCTSTR pszText = 0;
		CM_SetText( hWnd, pszText );
	}
	{
		CM_COLORS *pColors = 0;
		CM_SetColors( hWnd, pColors );
	}
	{
		CM_COLORS *pColors = 0;
		CM_GetColors( hWnd, pColors );
	}
	{
		BOOL bEnable = 0;
		CM_EnableWhitespaceDisplay( hWnd, bEnable );
	}
	{
		CM_IsWhitespaceDisplayEnabled( hWnd );
	}
	{
		BOOL bEnable = 0;
		CM_EnableTabExpand( hWnd, bEnable );
	}
	{
		CM_IsTabExpandEnabled( hWnd );
	}
	{
		BOOL bEnable = 0;
		CM_EnableSmoothScrolling( hWnd, bEnable );
	}
	{
		CM_IsSmoothScrollingEnabled( hWnd );
	}
	{
		int nTabSize = 0;
		CM_SetTabSize( hWnd, nTabSize );
	}
	{
		CM_GetTabSize( hWnd );
	}
	{
		BOOL bReadOnly = 0;
		CM_SetReadOnly( hWnd, bReadOnly );
	}
	{
		CM_IsReadOnly( hWnd );
	}
	{
		BOOL bEnable = 0;
		CM_EnableLineToolTips( hWnd, bEnable );
	}
	{
		CM_IsLineToolTipsEnabled( hWnd );
	}
	{
		BOOL bEnable = 0;
		CM_EnableLeftMargin( hWnd, bEnable );
	}
	{
		CM_IsLeftMarginEnabled( hWnd );
	}
	{
		BOOL bClearUndo = 0;
		LPCTSTR pszFileName = 0;
		CM_SaveFile( hWnd, bClearUndo, pszFileName );
	}
	{
		LPCTSTR pszText = 0;
		CM_RANGE *pRange = 0;
		CM_ReplaceText( hWnd, pszText, pRange );
	}
	{
		CM_RANGE *pRange = 0;
		BOOL bLogical = FALSE;
		CM_GetTextLength( hWnd, pRange, bLogical );
	}
	{
		LPCTSTR pszBuff = 0;
		CM_RANGE *pRange = 0;
		CM_GetText( hWnd, pszBuff, pRange );
	}
	{
		int nLine = 0;
		LPCTSTR pszBuff = 0;
		CM_GetLine( hWnd, nLine, pszBuff );
	}
	{
		int nLine = 0;
		BOOL bLogical = FALSE;
		CM_GetLineLength( hWnd, nLine, bLogical );
	}
	{
		LPCTSTR pszBuff = 0;
		CM_POSITION *pPos = 0;
		CM_GetWord( hWnd, pszBuff, pPos );
	}
	{
		CM_POSITION *pPos = 0;
		BOOL bLogical = FALSE;
		CM_GetWordLength( hWnd, pPos, bLogical );
	}
	{
		LPCTSTR pszText = 0;
		CM_AddText( hWnd, pszText );
	}
	{
		int nLine = 0;
		CM_DeleteLine( hWnd, nLine );
	}
	{
		int nLine = 0;
		LPCTSTR pszText = 0;
		CM_InsertLine( hWnd, nLine, pszText );
	}
	{
		CM_RANGE *pRange = 0;
		BOOL bNormalized = 0;
		CM_GetSel( hWnd, pRange, bNormalized );
	}
	{
		CM_RANGE *pRange = 0;
		BOOL bMakeVisible = 0;
		CM_SetSel( hWnd, pRange, bMakeVisible );
	}
	{
		CM_DeleteSel( hWnd );
	}
	{
		LPCTSTR pszText = 0;
		CM_ReplaceSel( hWnd, pszText );
	}
	{
		WORD wCmd = 0;
		DWORD dwCmdData = 0;
		CM_ExecuteCmd( hWnd, wCmd, dwCmdData );
	}
	{
		BOOL bHorz = 0;
		int nPos = 0;
		CM_SetSplitterPos( hWnd, bHorz, nPos );
	}
	{
		BOOL bHorz = 0;
		CM_GetSplitterPos( hWnd, bHorz );
	}
	{
		int nMode = 0;
		CM_SetAutoIndentMode( hWnd, nMode );
	}
	{
		CM_GetAutoIndentMode( hWnd );
	}
	{
		CM_CanUndo( hWnd );
	}
	{
		CM_CanRedo( hWnd );
	}
	{
		CM_Redo( hWnd );
	}
	{
		CM_Undo( hWnd );
	}
	{
		CM_ClearUndoBuffer( hWnd );
	}
	{
		int nLimit = 0;
		CM_SetUndoLimit( hWnd, nLimit );
	}
	{
		CM_GetUndoLimit( hWnd );
	}
	{
		CM_IsModified( hWnd );
	}
	{
		BOOL bModified = 0;
		CM_SetModified( hWnd, bModified );
	}
	{
		BOOL bEnable = 0;
		CM_EnableOvertype( hWnd, bEnable );
	}
	{
		CM_IsOvertypeEnabled( hWnd );
	}
	{
		BOOL bEnable = 0;
		CM_EnableCaseSensitive( hWnd, bEnable );
	}
	{
		CM_IsCaseSensitiveEnabled( hWnd );
	}
	{
		BOOL bEnable = 0;
		CM_EnablePreserveCase( hWnd, bEnable );
	}
	{
		CM_IsPreserveCaseEnabled( hWnd );
	}
	{
		BOOL bEnable = 0;
		CM_EnableWholeWord( hWnd, bEnable );
	}
	{
		CM_IsWholeWordEnabled( hWnd );
	}
	{
		BOOL bEnable = 0;
		CM_EnableRegExp( hWnd, bEnable );
	}
	{
		CM_IsRegExpEnabled( hWnd );
	}
	{
		int nView = 0;
		int nLine = 0;
		CM_SetTopIndex( hWnd, nView, nLine );
	}
	{
		int nView = 0;
		CM_GetTopIndex( hWnd, nView );
	}
	{
		int nView = 0;
		BOOL bFullyVisible = 0;
		CM_GetVisibleLineCount( hWnd, nView, bFullyVisible );
	}
	{
		BOOL bEnable = 0;
		CM_EnableCRLF( hWnd, bEnable );
	}
	{
		CM_IsCRLFEnabled( hWnd );
	}
	{
		CM_GetCurrentView( hWnd );
	}
	{
		CM_GetViewCount( hWnd );
	}
	{
		BOOL bHorz = 0;
		BOOL bShow = 0;
		CM_ShowScrollBar( hWnd, bHorz, bShow );
	}
	{
		BOOL bHorz = 0;
		CM_HasScrollBar( hWnd, bHorz );
	}
	{
		int xClient = 0;
		int yClient = 0;
		CM_RANGE *pRange = 0;
		CM_GetSelFromPoint( hWnd, xClient, yClient, pRange );
	}
	{
		int nLine = 0;
		BOOL bMakeVisible = 0;
		CM_SelectLine( hWnd, nLine, bMakeVisible );
	}
	{
		int xClient = 0;
		int yClient = 0;
		CM_HitTest( hWnd, xClient, yClient );
	}
	{
		BOOL bEnable = 0;
		CM_EnableDragDrop( hWnd, bEnable );
	}
	{
		CM_IsDragDropEnabled( hWnd );
	}
	{
		BOOL bHorz = 0;
		BOOL bEnable = 0;
		CM_EnableSplitter( hWnd, bHorz, bEnable );
	}
	{
		BOOL bHorz = 0;
		CM_IsSplitterEnabled( hWnd, bHorz );
	}
	{
		BOOL bEnable = 0;
		CM_EnableColumnSel( hWnd, bEnable );
	}
	{
		CM_IsColumnSelEnabled( hWnd );
	}
	{
		BOOL bEnable = 0;
		CM_EnableGlobalProps( hWnd, bEnable );
	}
	{
		CM_IsGlobalPropsEnabled( hWnd );
	}
	{
		CM_IsRecordingMacro( hWnd );
	}
	{
		CM_IsPlayingMacro( hWnd );
	}
	{
		HWND hWndParent = 0;
		CM_SetDlgParent( hWnd, hWndParent );
	}
	{
		BOOL bEnable = 0;
		CM_EnableSelBounds( hWnd, bEnable );
	}
	{
		CM_IsSelBoundsEnabled( hWnd );
	}
	{
		CM_FONTSTYLES *pFontStyles = NULL;
		CM_SetFontStyles( hWnd, pFontStyles );
	}
	{
		CM_FONTSTYLES *pFontStyles = NULL;
		CM_GetFontStyles( hWnd, pFontStyles );
	}
	{
		LPARAM lParam = 0;
		int nLine = 0;
		CM_SetItemData( hWnd, nLine, lParam );
	}
	{
		int nLine = 0;
		CM_GetItemData( hWnd, nLine );
	}
	{
		int nLine = 0;
		DWORD dwStyle = 0;
		CM_SetLineStyle( hWnd, nLine, dwStyle );
	}
	{
		int nLine = 0;
		CM_GetLineStyle( hWnd, nLine );
	}
	{
		int nLine = 0;
		BOOL bEnable = 0;
		CM_SetBookmark( hWnd, nLine, bEnable );
	}
	{
		int nLine = 0;
		CM_GetBookmark( hWnd, nLine );
	}
	{
		int nCount = 0;
		LPDWORD pdwLines = NULL;
		CM_SetAllBookmarks( hWnd, nCount, pdwLines );
	}
	{
		LPDWORD pdwLines = NULL;
		CM_GetAllBookmarks( hWnd, pdwLines );
	}
	{
		CM_LINENUMBERING *pNumbering = NULL;
		CM_SetLineNumbering( hWnd, pNumbering );
	}
	{
		CM_LINENUMBERING *pNumbering = NULL;
		CM_GetLineNumbering( hWnd, pNumbering );
	}
	{
		CM_POSITION *pPos = NULL;
		LPRECT pRect = NULL;
		CM_PosFromChar( hWnd, pPos, pRect );
	}
	{
		BOOL bEnable = 0;
		CM_EnableHideSel( hWnd, bEnable );
	}
	{
		CM_IsHideSelEnabled( hWnd );
	}
	{
		int nLine = 0;
		CM_SetHighlightedLine( hWnd, nLine );
	}
	{
		CM_GetHighlightedLine( hWnd );
	}
	{
		int nLine = 0;
		BOOL bEnable = 0;
		CM_SetDivider( hWnd, nLine, bEnable );
	}
	{
		int nLine = 0;
		CM_GetDivider( hWnd, nLine );
	}
	{
		BOOL bEnable = 0;
		CM_EnableOvertypeCaret( hWnd, bEnable );
	}
	{
		CM_IsOvertypeCaretEnabled( hWnd );
	}
	{
		LPCTSTR pszText = NULL;
		CM_SetFindText( hWnd, pszText );
	}
	{
		LPCTSTR pszText = NULL;
		CM_GetFindText( hWnd, pszText );
	}
	{
		LPCTSTR pszText = NULL;
		CM_SetReplaceText( hWnd, pszText );
	}
	{
		LPCTSTR pszText = NULL;
		CM_GetReplaceText( hWnd, pszText );
	}
	{
		HIMAGELIST hImageList = NULL;
		CM_SetImageList( hWnd, hImageList );
	}
	{
		CM_GetImageList( hWnd );
	}
	{
		int nLine = 0;
		BYTE byImages = 0;
		CM_SetMarginImages( hWnd, nLine, byImages );
	}
	{
		int nLine = 0;
		CM_GetMarginImages( hWnd, nLine );
	}
	{
		CM_AboutBox( hWnd );
	}
	{
		HDC hDC = NULL;
		WORD wFlags = 0;
		CM_Print( hWnd, hDC, wFlags );
	}
	{
		int nLine = 0;
		int nCol = 0;
		CM_SetCaretPos( hWnd, nLine, nCol );
	}
	{
		int nLine = 0;
		int nCol = 0;
		CM_ViewColToBufferCol( hWnd, nLine, nCol );
	}
	{
		int nLine = 0;
		int nCol = 0;
		CM_BufferColToViewCol( hWnd, nLine, nCol );
	}
}