Click to See Complete Forum and Search --> : WM_GETTEXT issue
manoj.m
March 27th, 2006, 03:33 AM
hai,
I have one doubt.
Even though the text in Russian that I am typing in a textbox is displaying correctly when I did a WM_GETTEXT, the text in the char array is not showing the same characters. What I need to do to get it correctly?,
Thanks in advance…..
ovidiucucu
March 27th, 2006, 04:36 AM
Is it UNICODE build? Are you using VC++ 6.0?
If yes, THIS FAQ (http://www.codeguru.com/forum/showthread.php?t=326350) may help you.
manoj.m
March 27th, 2006, 05:25 AM
No it is not UNICODE build,
and i am using .NET environment.
Actually the text that i got is showing like this ("??????")
Vanaj
March 27th, 2006, 03:38 PM
Can you post the code you used for WM_GETTEXT ?
manoj.m
March 27th, 2006, 11:34 PM
CHAR szQuery[SIZE_256]={0};
HWND hwndEdit = GetDlgItem ( hwnd, IDC_DBNAME );
SendMessage ( hwndEdit, WM_GETTEXT, SIZE_64, (LPARAM)szdbName );
Vanaj
March 27th, 2006, 11:40 PM
CHAR szQuery[SIZE_256]={0};
HWND hwndEdit = GetDlgItem ( hwnd, IDC_DBNAME );
SendMessage ( hwndEdit, WM_GETTEXT, SIZE_64, (LPARAM)szdbName );
In the debugger both "hwnd" and "hwndEdit" have valid address of windows ?
What is the size of "szdbName" ?
manoj.m
March 27th, 2006, 11:53 PM
In the debugger both "hwnd" and "hwndEdit" have valid address of windows ?
if it is not a russian char i am getting it correctly
What is the size of "szdbName" ?
CHAR szdbName[256];
Vanaj
March 28th, 2006, 12:00 AM
if it is not a russian char i am getting it correctly
Sorry..thought you were just getting junk in you return from the SendMessage()...I can only guess from here as I have not done anything but in english...There are some others here that do have that experience so I will bow to them...as I don't want to guess and send you down the wrong path...:blush:
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.