Here i am attaching the .cpp file. My default language is English, i changed this to malayalam and started typing, it is displaying ?????? ..only.But in notepad it is showing malayalam fonts correctly.
Neil Hodgson <[EMAIL PROTECTED]> wrote:
manoj marathayil:
> one thing more, When i used notepad and changed the Laguage to some complex
> script the characters are displaying, but in scintilla editor it is
> displaying like ?????????. But when i copy pasted some complex script text
> to scintilla editor it is displaying correctly. What i am missing to get the
> functionality,
Dunno. Publish your file and settings.
Neil
_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest
T h a n k s & R e g a r d s ,
Manoj M | Webyog | Bangalore | Voice: 91 9886171984, 91 80 51216434(off)
Manoj M | Webyog | Bangalore | Voice: 91 9886171984, 91 80 51216434(off)
"A winner is not one who never fails, but one who never quits!"
Enjoy this Diwali with Y! India Click here
#include<windows.h> #include<stdio.h> #include<tchar.h> #include "Scintilla.h"
#define IDC_EDIT 1003
LRESULT CALLBACK WndProc ( HWND, UINT, WPARAM, LPARAM );
int WINAPI WinMain(HINSTANCE h,HINSTANCE p,PSTR szCmdLine, int iCmdShow)
{
static TCHAR szAppName[]= TEXT("MultiLang");
HWND hwnd;
MSG msg;
WNDCLASS wndclass;
wndclass.style = CS_HREDRAW | CS_VREDRAW;
wndclass.lpfnWndProc = WndProc;
wndclass.cbClsExtra = 0;
wndclass.cbWndExtra = 0;
wndclass.hInstance = h;
wndclass.hIcon = LoadIcon(NULL,IDI_APPLICATION);
wndclass.hCursor = LoadCursor(NULL,IDC_ARROW);
wndclass.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);
wndclass.lpszMenuName = NULL;
wndclass.lpszClassName = szAppName;
if(!RegisterClass(&wndclass))
{
MessageBox(NULL,TEXT("Error"),szAppName,MB_ICONERROR);
return 0;
}
hwnd=CreateWindow ( szAppName,
TEXT("Non English
Language Test"),
WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
NULL,
NULL,
h,
NULL
);
ShowWindow(hwnd,iCmdShow);
UpdateWindow(hwnd);
while(GetMessage(&msg,NULL,0,0))
{
TranslateMessage(&msg);
DispatchMessage (&msg);
}
return msg.wParam;
}
LRESULT CALLBACK WndProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam)
{
static HWND hwndButton, hwndButton2;
static HWND hList;
static HWND hwndEdit;
static RECT rect;
static int cxChar,cyChar;
LONG ret;
HDC hdc;
PAINTSTRUCT ps;
DWORD errno;
switch(message)
{
case WM_CREATE:
{
cxChar=LOWORD(GetDialogBaseUnits());
cyChar=HIWORD(GetDialogBaseUnits());
LoadLibrary ( L"SciLexer.dll");
hwndEdit = CreateWindowEx( 0, TEXT("scintilla"),
NULL, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_BORDER,
10, 100, 300, 350, hwnd, (
HMENU )IDC_EDIT, ((LPCREATESTRUCT)lParam)->hInstance, NULL );
ret = SendMessage( hwndEdit, SCI_SETCODEPAGE, SC_CP_UTF8, 0 );
SendMessage ( hwndEdit, SCI_STYLESETSIZE, STYLE_DEFAULT, 14 );
errno = GetLastError();
ShowWindow ( hwndEdit, TRUE );
}
break;
case WM_SIZE:
rect.left=24*cxChar;
rect.top=2*cyChar;
rect.right=LOWORD(lParam);
rect.bottom=HIWORD(lParam);
break;
case WM_PAINT:
InvalidateRect(hwnd,&rect,FALSE);
hdc=BeginPaint(hwnd,&ps);
SelectObject(hdc,GetStockObject(SYSTEM_FIXED_FONT));
SetBkMode(hdc,TRANSPARENT);
EndPaint(hwnd,&ps);
break;
case WM_DRAWITEM:
case WM_COMMAND:
break;
case WM_DESTROY:
PostQuitMessage(0);
break;
default:
return DefWindowProc(hwnd,message,wParam,lParam);
}
return 0L;
}
_______________________________________________ Scintilla-interest mailing list [email protected] http://mailman.lyra.org/mailman/listinfo/scintilla-interest
