Bug in TDialog title [Solved]
Re: Bug in TDialog title
Enrico
Creo que no he entendido bien tu problema:
A.- Quieres un caption con mas de 140 caracteres
B.- Controlar que el caption no tengas mas de 140 caracteres
Yo habia entendido la opcion B
Tengo un gran problema con el idioma ingles
Enrico
I think I misunderstood your problem:
A. - You want a caption with more than 140 characters
B. - Check that the caption does not have more than 140 characters
I had understood the option B
I have a big problem with the English language
Creo que no he entendido bien tu problema:
A.- Quieres un caption con mas de 140 caracteres
B.- Controlar que el caption no tengas mas de 140 caracteres
Yo habia entendido la opcion B
Tengo un gran problema con el idioma ingles
Enrico
I think I misunderstood your problem:
A. - You want a caption with more than 140 characters
B. - Check that the caption does not have more than 140 characters
I had understood the option B
I have a big problem with the English language
C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Bug in TDialog title
Cristobal,
Is it more clear now?
EMG
No, the problem is that there is no such limit in the size of a dialog title (Windows API docs don't mention any limits). The current limit is only the result of a bug in cDlg2Chr() function. At least this is what I understood.cnavarro wrote:Enrico
I think I misunderstood your problem:
A. - You want a caption with more than 140 characters
B. - Check that the caption does not have more than 140 characters
Is it more clear now?
EMG
Re: Bug in TDialog title
Si, ahora me ha quedado muy muy claro
Gracias
Yes, it has now become very clear to me
thanks
Gracias
Yes, it has now become very clear to me
thanks
C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
- Daniel Garcia-Gil
- Posts: 2365
- Joined: Wed Nov 02, 2005 11:46 pm
- Location: Isla de Margarita
- Contact:
Re: Bug in TDialog title
Enrico
try with
wLen += ( iLenUnicode * 2 ) + 1;
try with
wLen += ( iLenUnicode * 2 ) + 1;
our best documentation is the source code
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Bug in TDialog title
Daniel,
hb_xrealloc can't reallocate memory
EMG
I now get:Daniel Garcia-Gil wrote:Enrico
try with
wLen += ( iLenUnicode * 2 ) + 1;
hb_xrealloc can't reallocate memory
EMG
- Daniel Garcia-Gil
- Posts: 2365
- Joined: Wed Nov 02, 2005 11:46 pm
- Location: Isla de Margarita
- Contact:
Re: Bug in TDialog title
what C compiler are you using?
our best documentation is the source code
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Bug in TDialog title
Daniel,
EMG
BCC582Daniel Garcia-Gil wrote:what C compiler are you using?
EMG
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Bug in TDialog title
Daniel,
it seems to work fine. What is your opinion about this possible fix?
EMG
WithDaniel Garcia-Gil wrote:Enrico
try with
wLen += ( iLenUnicode * 2 ) + 1;
Code: Select all
wLen += iLenUnicode;
EMG
- Daniel Garcia-Gil
- Posts: 2365
- Joined: Wed Nov 02, 2005 11:46 pm
- Location: Isla de Margarita
- Contact:
Re: Bug in TDialog title
if work is fineEnrico Maria Giordano wrote:CODE: SELECT ALL EXPAND VIEW
wLen += iLenUnicode;
it seems to work fine. What is your opinion about this possible fix?
our best documentation is the source code
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Bug in TDialog title
Daniel,
EMG
The problem is that I don't understand the code of cDlg2Chr() function very well so I found that "fix" with trial and error.Daniel Garcia-Gil wrote:if work is fineEnrico Maria Giordano wrote:CODE: SELECT ALL EXPAND VIEW
wLen += iLenUnicode;
it seems to work fine. What is your opinion about this possible fix?
EMG
- Daniel Garcia-Gil
- Posts: 2365
- Joined: Wed Nov 02, 2005 11:46 pm
- Location: Isla de Margarita
- Contact:
Re: Bug in TDialog title
Enrico
we are filling a DLGTEMPLATE structure, is used like argument in the function CreateDialogIndirect...
check DLGTEMPLATE structure remark section
we are filling a DLGTEMPLATE structure, is used like argument in the function CreateDialogIndirect...
check DLGTEMPLATE structure remark section
In a standard template for a dialog box, the DLGTEMPLATE structure is always immediately followed by three variable-length arrays that specify the menu, class, and title for the dialog box. When the DS_SETFONT style is specified, these arrays are also followed by a 16-bit value specifying point size and another variable-length array specifying a typeface name. Each array consists of one or more 16-bit elements. The menu, class, title, and font arrays must be aligned on WORD boundaries.
...
Following the class array is a title array that specifies a null-terminated Unicode string that contains the title of the dialog box. If the first element of this array is 0x0000, the dialog box has no title and the array has no other elements.
...
our best documentation is the source code
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Bug in TDialog title
Daniel,
So what? Are you trying to say that my "fix" can be correct?
EMG
So what? Are you trying to say that my "fix" can be correct?
EMG
- Daniel Garcia-Gil
- Posts: 2365
- Joined: Wed Nov 02, 2005 11:46 pm
- Location: Isla de Margarita
- Contact:
Re: Bug in TDialog title
no i'm trying explain you...Enrico Maria Giordano wrote:Daniel,
So what? Are you trying to say that my "fix" can be correct?
EMG
Enrico Maria Giordano wrote:The problem is that I don't understand the code of cDlg2Chr() function very well so I found that "fix" with trial and error.
our best documentation is the source code
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Bug in TDialog title
Daniel,
At the moment, I'm convinced that iLenUnicode doesn't have to double (*2) but I would hear your opinion.
EMG
Ok.Daniel Garcia-Gil wrote:no i'm trying explain you...
At the moment, I'm convinced that iLenUnicode doesn't have to double (*2) but I would hear your opinion.
EMG
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Bug in TDialog title
I'm testing my fix and found no problem so far. The fix is:
replace
with
in dlg2chr.c.
EMG
replace
Code: Select all
wLen += ( iLenUnicode * 2 );
Code: Select all
wLen += iLenUnicode;
EMG