[System.Runtime.InteropServices.DllImport("user32.dll ")] public static extern int SetWindowLong(IntPtr hWnd, int nIndex, int wndproc); [System.Runtim ...
使用NGUI提供的API,想使用按压按钮来控制角色持续行走: 却发现当点击前进按钮后,角色只是向控制方向移动了一小步,并且长时间按前进按钮,角色则会忽略该Click事件: 由此感到蹊跷,角色移动是在短暂的按压按钮之后。那么必定有Button事件能够感应到按钮的Press事件。遂在NGUI/Inter ...
分类:
其他好文 时间:
2016-11-02 00:49:53
阅读次数:
278
[cpp] view plain copy BOOL SaveHwndToBmpFile(HWND hWnd, LPCTSTR lpszPath) { HWND hDesktop = ::GetDesktopWindow(); ASSERT(hDesktop); if(NULL == hWnd) { ...
分类:
其他好文 时间:
2016-10-27 23:36:11
阅读次数:
712
1 #include <windows.h> 2 #define MAXPOINTS 1000 3 4 LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);//窗口过程 5 6 int WINAPI WinMain(HINSTANCE hInst ...
分类:
其他好文 时间:
2016-10-19 02:30:35
阅读次数:
109
定义:[DllImport("user32.dll")] public static extern bool SetWindowPos(IntPtr hWnd, int hWndlnsertAfter, int X, int Y, int cx, int cy, uint Flags); 调用:AP ...
CWindow::SetWindowPos BOOL SetWindowPos( HWND hWndInsertAfter, int x, int y, int cx, int cy, UINT nFlags ); BOOL SetWindowPos( HWND hWndInsertAfter, L ...
分类:
其他好文 时间:
2016-10-13 11:37:52
阅读次数:
99
libsdl输入中文时输入法不显示,主要是ime消息处理后没有交给系统处理导致候选列表不显示。 想让系统去处理调用DefWindowProc(hwnd, msg, wParam, *lParam);即可。 修改SDL_windowskeyboard.c找到IME_HandleMessage函数改为以 ...
分类:
其他好文 时间:
2016-10-11 11:09:14
阅读次数:
267
1.窗口透明度 调节窗口透明度,先使用SetWindowLog函数给窗口加上WX_EX_LAYERED属性,再使用SetlayeredWindowAttributes指定窗口透明度。 //用于改变窗口的属性或在窗口的额外存储空间设置一个32位值 LONG SetWindowLong( HWND hW ...
分类:
其他好文 时间:
2016-09-19 11:30:01
阅读次数:
113