Merge branch 'master' of https://gitee.com/csharpui/CPF.git into my
This commit is contained in:
commit
4e65d72804
@ -1532,11 +1532,12 @@ namespace CPF.Linux
|
||||
var data = new UIntPtr[_width * _height + 2];
|
||||
data[0] = new UIntPtr((uint)_width);
|
||||
data[1] = new UIntPtr((uint)_height);
|
||||
var offset = 2;
|
||||
for (var y = 0; y < _height; y++)
|
||||
{
|
||||
var r = y * _width;
|
||||
for (var x = 0; x < _width; x++)
|
||||
data[r + x] = new UIntPtr(_bdata[r + x]);
|
||||
data[r + x + offset] = new UIntPtr(_bdata[r + x]);
|
||||
}
|
||||
|
||||
fixed (void* pdata = data)
|
||||
|
@ -1154,6 +1154,8 @@ BLENDFUNCTION blendFunction // alpha-blending function
|
||||
[DllImport("user32.dll")]
|
||||
public static extern bool SetFocus(IntPtr hWnd);
|
||||
[DllImport("user32.dll")]
|
||||
public static extern IntPtr GetFocus();
|
||||
[DllImport("user32.dll")]
|
||||
public static extern bool SetParent(IntPtr hWnd, IntPtr hWndNewParent);
|
||||
[DllImport("user32.dll")]
|
||||
public static extern bool ShowWindow(IntPtr hWnd, ShowWindowCommand nCmdShow);
|
||||
|
@ -1525,6 +1525,10 @@ namespace CPF.Windows
|
||||
|
||||
public void SetIMEPosition(Point point)
|
||||
{
|
||||
if (canActivate && GetFocus() != handle)
|
||||
{
|
||||
SetFocus(handle);
|
||||
}
|
||||
COMPOSITIONFORM cf = new COMPOSITIONFORM();
|
||||
cf.dwStyle = 2;
|
||||
cf.ptCurrentPos = new POINT((int)(point.X * scaling), (int)(point.Y * scaling));
|
||||
|
Loading…
x
Reference in New Issue
Block a user