Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Tip us?
 
molloy
Old
#1  
Junior Member - OP
Thanks Meter 0
Posts: 5
Join Date: Feb 2003
Default customizing XDA's today screen

Is it possible to customize the XDA's today screen (i.e. by using XML) as you can do with the Orange's SPV ?
 
roko
Old
#2  
Junior Member
Thanks Meter 0
Posts: 27
Join Date: Jan 2003
Location: Amsterdam
Download Microsoft's Theme Generator...

http://www.microsoft.com/mobile/pock.../powertoys.asp

There are some other goodies on that page aswell.

Good luck!
 
molloy
Old
#3  
Junior Member - OP
Thanks Meter 0
Posts: 5
Join Date: Feb 2003
Powertoy is not what I am looking for: the idea is not only changing the background image but to organize all the datas on the screen as and where you wish (date, time, numbers of emails received, fonts, etc.) as you can do on smarphone 2002 changing the today screen's script in XML.
For examples what you can do with Smartphone 2002:

http://www.smartphony.org/stories.php?topic=32
 
martinlong1978
Old
#4  
Member
Thanks Meter 1
Posts: 95
Join Date: Jan 2003
Location: Nottingham
It's a bit more complicated with PPC 2002. Unlike smartphone, it is an API to change the contents of 'Today'. Each line is loaded as a type of 'snap in' dll.
 
molloy
Old
#5  
Junior Member - OP
Thanks Meter 0
Posts: 5
Join Date: Feb 2003
Do you I could find some examples of that kind of work ?
 
vpreHoose
Old
#6  
Senior Member
Thanks Meter 1
Posts: 100
Join Date: Jan 2003
Default It is really a pain in the ass

But this works fine... 8)

#include "stdafx.h"
#include <todaycmn.h>
#define IDI_ICON1 101

HINSTANCE Instance;
BOOL Refresh;
HICON hIcon;

LRESULT CALLBACK WindowProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
{
PAINTSTRUCT ps;
RECT rect;

switch (msg) {
case WM_TODAYCUSTOM_CLEARCACHE:
break;

case WM_TODAYCUSTOM_QUERYREFRESHCACHE:
if (Refresh) {
Refresh = FALSE;
((TODAYLISTITEM *)(wparam))->cyp = 20;
return TRUE;
} else {
return FALSE;
}

case WM_ERASEBKGND:
{
TODAYDRAWWATERMARKINFO dwi;
dwi.hwnd = hwnd;
dwi.hdc = (HDC)wparam;
GetClientRect(hwnd, &(dwi.rc));
SendMessage(GetParent(hwnd), TODAYM_DRAWWATERMARK, 0, (LPARAM)&dwi);
return 1;
}

case WM_PAINT:
BeginPaint(hwnd, &ps);
GetWindowRect(hwnd, &rect);
SetBkMode(ps.hdc, TRANSPARENT);
hIcon = (HICON)LoadImage(Instance,MAKEINTRESOURCE(IDI_ICON 1),IMAGE_ICON,16,16,LR_DEFAULTCOLOR );
DrawIcon(ps.hdc, 2, 0, hIcon);
DestroyIcon(hIcon);
LOGFONT lf;
HFONT hSysFont;
HFONT hFont, hFontOld;
hSysFont = (HFONT) GetStockObject(SYSTEM_FONT);
GetObject(hSysFont, sizeof(LOGFONT), &lf);
lf.lfWeight = FW_BOLD;
lf.lfHeight = (long) -((8.0 * (double)GetDeviceCaps(ps.hdc, LOGPIXELSY) / 72.0)+.5);
hFont = CreateFontIndirect(&lf);
hFontOld = (HFONT) SelectObject(ps.hdc, hFont);
SetTextColor(ps.hdc, SendMessage(GetParent(hwnd), TODAYM_GETCOLOR, (WPARAM)TODAYCOLOR_TEXT, NULL));
GetClientRect(hwnd, &rect);
DrawText(ps.hdc, TEXT("Text you want to enter"), -1, &rect, DT_LEFT | DT_TOP | DT_NOCLIP);
SelectObject(ps.hdc, hFontOld);
DeleteObject(hFont);
EndPaint(hwnd, &ps);
break;

case WM_LBUTTONUP:
// Whatever you want to occur when the button is pressed //
CreateProcess(TEXT("iexplore.exe"), NULL, NULL, NULL, FALSE, 0, NULL, NULL, NULL, NULL);
break;

default:
return DefWindowProc(hwnd, msg, wparam, lparam);
}

return 0;
}

HWND APIENTRY InitializeCustomItem(TODAYLISTITEM *tli, HWND parent)
{
if (!tli->fEnabled) {
return NULL;
}

Instance = tli->hinstDLL;

WNDCLASS wc;
wc.style = CS_HREDRAW | CS_VREDRAW;
wc.lpfnWndProc = (WNDPROC)WindowProc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hInstance = Instance;
wc.hIcon = 0;
wc.hCursor = 0;
wc.hbrBackground = (HBRUSH)COLOR_BACKGROUND + 1;
wc.lpszMenuName = NULL;
wc.lpszClassName = TEXT("RegisterClassName");
UnregisterClass(TEXT("RegisterClassName"), Instance);
RegisterClass(&wc);

Refresh = TRUE;
return CreateWindow(TEXT("RegisterClassName"), TEXT("RegisterClassName"), WS_VISIBLE | WS_CHILD, CW_DEFAULT, CW_DEFAULT, 0, 0, parent, NULL, Instance, NULL);
}
 
molloy
Old
#7  
Junior Member - OP
Thanks Meter 0
Posts: 5
Join Date: Feb 2003
Thank's !
Is there somewhere a technical documentation about that ?

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...

XDA PORTAL POSTS

Flash Custom ROM and Recovery to Samsung Galaxy S 4

After reading about Dan Rosenberg’s bootloader exploit for the Samsung Galaxy S 4,I … more

Windows-Based Multi-Tool for the Sony Xperia U

If you are a flashaholic and an owner of the Sony Xperia U, you may be interested in the … more

XDA University: Crafting Recovery-Flashable Packages

Those of us who use Linux on a day to day basis don’t think twice about sinking … more