Quote:
Originally Posted by eb3604
ive been sick the last week so ive been working on some skins. the right text alignment on the buttons was really bothering me. i started fooling with the registry. If you want to center the letter and numbers create these dwords:
HKLM/Security/Phone/Skin/Dialer/Portrait (Landscape)/dialbutton/
MajorFlags = x (decimal)
MinorFlags = x (decimal)
where x =:
5 = centered vertically & horizontally
9 = vertically bottom & centered horizontally
you can also have the text be aligned left or top or bottom, etc. just fool with the numbers. make sure that the minor and major numbers are the same.
0-9 move the text left and right. anything above that seems to keep it aligned right but moves it up and down
if you dont know how to edit your registry dont try this. blah blah blah. Paul probably has more info on this stuff than I.
::snip::
BIG NEWS!
I finally found a way to eliminate the "call history" text, thank santa and his lil elves for this one.
go to HKLM/Security/Phone/Skin/Dialer/Portrait (Landscape)/verbbutton/
change the following
textflags = 986895 (dec)
last update of the night kids.
the lil trick to hide the call history text also works for the regular buttons too (1-9, # , *) Woohoo!
change the above mentioned majorflags and minorflags to "986895" (dec)
also works in the progress screen for the button text. 
|
Thanks for working on this, eb, but I hate "magic numbers" when noone knows how they work, so I spent some time investigating these.
All of these flag entries (MajorFlags, MinorFlags, and textFlags) all end up getting passed to the DrawText() function of Windows Mobile. Here are the docs for that function:
DrawText
That gets us a list of possible things we can put into the flags, but not how to translate a set of flags into a DWORD. However, here's a list from the DX8 documentation giving the actual values for the flags:
MSDN Library Archive
To combine flags, we add them together. So, to center text horizontally (DT_CENTER) and vertically (DT_VCENTER), we add 1 and 4, so our flags value (MajorFlags and/or MinorFlags) is 1+4=5. So far, so good.
Now, what about that magic value 986895 = 0x0F0F0F? Breaking it down into bits, this is the same as enabling
all of these flags:
Code:
DT_CENTER = 1
DT_RIGHT = 2
DT_VCENTER = 4
DT_BOTTOM = 8
DT_NOCLIP = 256 (&H100)
DT_EXTERNALLEADING = 512 (&H200)
DT_CALCRECT = 1024 (&H400)
DT_NOPREFIX = 2048 (&H800)
DT_MODIFYSTRING = 65536 (&H10000)
DT_RTLREADING = 131072 (&H20000)
DT_WORD_ELLIPSIS = 262144 (&H40000)
DT_NOFULLWIDTHCHARBREAK = 524288 (&H80000)
What a mess, eh? Many of these don't even make sense to use together. Centered and right-justified at the same time? Right-to-left reading order? Some of them aren't even supported by WM6 (DT_EXTERNALLEADING, DT_MODIFYSTRING, DT_NOFULLWIDTHCHARBREAK)!
The one that catches my eye out of this mess is DT_CALCRECT. Here's the important bit of the description for that flag:
"DrawText returns the height of the formatted text
but does not draw the text."
That looks like the part that we really care about. So I tested it on my phone, just using the flags value for DT_CALCRECT, 1024 decimal, or 0x400 (400 hex). It worked perfectly!
So if you want your text not to be drawn at all, I recommend using flags = 1024.
