Board index » cppbuilder » ListView->Font->Charset not working properly?
Wlodek Szafra
![]() CBuilder Developer |
Sun, 07 Apr 2002 03:00:00 GMT
|
Wlodek Szafra
![]() CBuilder Developer |
Sun, 07 Apr 2002 03:00:00 GMT
ListView->Font->Charset not working properly?
Hi all,
I have a form with, among others, a ListView. The form also has a TIA |
Dave Curr
![]() CBuilder Developer |
Sun, 07 Apr 2002 03:00:00 GMT
Re:ListView->Font->Charset not working properly?Wlodek, Set the list box's and status bar's ParentFont property to 'True'. This is the default for the status bar, but not the list box. Verified with BCB 3. Dave |
Wlodek Szafra
![]() CBuilder Developer |
Sun, 07 Apr 2002 03:00:00 GMT
Re:ListView->Font->Charset not working properly?QuoteDave Curry wrote: about the ListView. With the ListView and StatusBar, it doesn't matter whether the ParentFont is set to "true" or not. Again, ListView and StatusBar don't seem to care about the charset |
Dave Curr
![]() CBuilder Developer |
Sun, 07 Apr 2002 03:00:00 GMT
Re:ListView->Font->Charset not working properly?Quote>List boxes are working properly regarding the charset. I was asking everything seems fine to me as long as ParentFonts is set to 'true'. However, I think I am not looking for what you are, namely characters that would only be found in the East European char set. I have no idea what characters those might be, nor how I would enter them on my US keyboard - some hints in that area might help me. Unfortunately, if you have ParentFont set true, and things still aren't Good luck, |
Wlodek Szafra
![]() CBuilder Developer |
Sun, 07 Apr 2002 03:00:00 GMT
Re:ListView->Font->Charset not working properly?QuoteDave Curry wrote: column header or item caption, it doesn't matter. The characters from the East European set cannot be entered directly from the US keyboard, but the combination of Alt + numeric keypad digits will do the trick. Please try the following characters: Alt-0165, Alt-0198, Alt-0202, Alt-0185, Alt-0230, Alt-0234. If everything is working properly you should see letters "ACEace" with cute little tails in the ListView when youre done typing. If you only see strange characters from the upper ANSI set, then this is the problem I'm describing. For comparison, you could enter the same text into a label's caption and see that it's working properly there, provided that you're using a combination of a proper font (Arial will do fine) and EASTEUROPE_CHARSET. Thanks a lot for your time and your help. |
Damon Chandle
![]() CBuilder Developer |
Wed, 10 Apr 2002 03:00:00 GMT
Re:ListView->Font->Charset not working properly?Hi Wlodek, Quote> If you're willing to give it a try, please enter some text in ListView's prescribed key sequences, I see "ACEace" with the curly tails on them in TListView. However, this was tested on a system with comctl32 v. 4.71 (IE4). If it comes down to it, you can use Custom Draw to render each ListItem in a separately created font. I can provide an example if needed. Good luck. -------------------------------------- http://bcbcaq.freeservers.com |
Wlodek Szafra
![]() CBuilder Developer |
Wed, 10 Apr 2002 03:00:00 GMT
Re:ListView->Font->Charset not working properly?QuoteDamon Chandler wrote: comctl32.dll is the culprit. When I was doing my tests, I had the comctl32 version 5.8 installed by MS IE5. I reinstalled version 4.72, taken from the MS web site and everything in my program looked as it should. Of course, with that version of the dll, MS IE5 is not working - and I need it for other stuff. So, I reinstalled the newest version, and predictably, my program shows broken characters now. I'm wondering now if the new comctl32.dll is broken regarding the font Anyway, this situation is giving me headaches, because I don't want the Quote> If it comes down to it, you can use Custom Draw to render each ListItem in a if you can. Thanks for responding, I appreciate it. Quote> Good luck. -- Wlodek (a.k.a. Tony) Szafran |
Damon Chandle
![]() CBuilder Developer |
Fri, 12 Apr 2002 03:00:00 GMT
Re:ListView->Font->Charset not working properly?Hi Wlodek, Quote> Thank you for checking this. In the meantime I found that indeed the are certainly trifling. Quote> If it's not too much bother, please do that, along with column headers, a primer on Custom Draw in general, and specific to TListView and the ListView's header... http://bcbcaq.freeservers.com/CustomDraw_TV.html Here's the example... // in header... // map the WM_NOTIFY message in the Parent of the BEGIN_MESSAGE_MAP // in source... Quote} { if (Msg.Msg == WM_NOTIFY) { // see if the notification is from the Custom Draw // service and from the header control LPNMCUSTOMDRAW lpnmcd = (NMCUSTOMDRAW *)Msg.LParam; if (lpnmcd->hdr.code == NM_CUSTOMDRAW && lpnmcd->hdr.hwndFrom == GetDlgItem(ListView1->Handle, 0)) { // test the drawing stage switch(lpnmcd->dwDrawStage) { // prior to painting... case CDDS_PREPAINT: { // tell Windows we want individual // notification of each item being drawn Msg.Result = CDRF_NOTIFYITEMDRAW; return; } // upon painting... case CDDS_ITEMPREPAINT: { int Idc = SaveDC(lpnmcd->hdc); // extract the relevant info from the // Create a new TCanvas, assign it to the // if depressed // restore the device context // tell Windows we drew the header // un-subclass the ListView Quote} { LPNM_LISTVIEW lpnm = (NM_LISTVIEW *)Msg.LParam; // see if the message is a Custom Draw message // Create a new TCanvas, assign it to the // get other important info // get the item caption to draw, and // caption and icon rectangles // caption rectangle // grab a pointer to the ListView's ImageList // assign selected visual attributes // set the text andd background colors // set the text andd background colors // draw the caption // draw the icon // restore the device context // tell Windows we drew the item // otherwise have Windows draw the item read more » |
Wlodek Szafra
![]() CBuilder Developer |
Sat, 13 Apr 2002 03:00:00 GMT
Re:ListView->Font->Charset not working properly?QuoteDamon Chandler wrote: articles. Now I'm working on custom-drawing the list view headers, using the code provided by you, and at last I can see the text displayed properly. For list view items and sub-items, I'm going to employ BCB4's built-in custom-drawing events, using your code, of course. Again, thanks a lot. Regards. |
1. Blob Ado Mysql => Not working properly
2. WinNT->TTreeView!=Work Win95->TTreeView==Work
3. <><><><><><><Does anyone know..........><><><><><><><><><><><><><><><><><><><><><><><><
4. IIS->ISAPI->Delphi DLL->BDE->Paradox
5. HELP>>HELP>>Using an Index for an MSSQL database
6. ListView->Items->Clear() question.
7. Image->Cancas->Font question