Implement OleCreatePropertyFrame
Piotr Caban
piotr.caban at gmail.com
Mon Jan 11 10:57:37 CST 2010
Hi,
In prop_sheet_proc you wrote:
case PSN_APPLY:
FIXME("(%p, %s, %s)\n", hwnd, "WM_NOTIFY", "PSN_APPLY");
IPropertyPage_Apply(opf->propPage);
return TRUE;
If I understand it correctly applying changes is fully implemented. Why
there's a FIXME? Probably you wanted to use TRACE here.
default:
FIXME("(%p, %d, %ld, %p)\n", hwnd, msg, wparam, (void *)lparam);
There's lots of messages that your're not going to handle (e.g.
WM_SETCURSOR) so this FIXME will be very loud.
In pixels_to_dialog_units function:
You're using some hardcoded values here. Probably something like this
would be better, but I'm not sure if it's correct:
static void pixels_to_dialog_units(short *x_pixels, short *y_pixels)
{
int basey;
float basex;
HFONT font = GetStockObject(DEFAULT_GUI_FONT);
HDC hdc = GetDC(NULL);
TEXTMETRICW tm;
SIZE size;
font = SelectObject(hdc, font);
GetTextMetricsW(hdc, &tm);
GetTextExtentPoint32A(hdc, "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"abcdefghijklmnopqrstuvwxyz", 52, &size);
SelectObject(hdc, font);
basex = ((float)size.cx/26+1)/2;
basey = tm.tmHeight;
*x_pixels = (float)(*x_pixels)*4/basex;
*y_pixels = MulDiv(*y_pixels, 8, basey);
}
Of course the basex and basey values should be computed once.
In OleCreatePropertyFrameIndirect it's probably good to add a FIXME,
that dispidInitialProperty value is ignored.
Please try to use the same formatting in whole file (e.g. you sometimes
use white chars before brackets).
Cheers,
Piotr
More information about the wine-devel
mailing list