码迷,mamicode.com
首页 >  
搜索关键字:wndproc    ( 157个结果
WPF换肤之三:WPF中的WndProc
原文:WPF换肤之三:WPF中的WndProc在上篇文章中,我有提到过WndProc中可以处理所有经过窗体的事件,但是没有具体的来说怎么可以处理的。 其实,在WPF中,要想利用WndProc来处理所有的事件,需要利用到SourceInitialized Event,首先需要创建一个HwndSourc...
分类:Windows程序   时间:2015-05-19 22:27:55    阅读次数:257
Windows编程——万花筒绘制
#include #include #include #include #define Pi 3.1415926 long WINAPI WndProc(HWND hWnd, UINT iMessage, UINT wParam, LONG lParam); BOOL InitWindowsClass(HINSTANCE hInstance); BOOL InitWindows(HINSTANCE...
分类:Windows程序   时间:2015-05-10 09:54:44    阅读次数:245
Windows窗口的创建
Windows窗口创建的基本代码:#include LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);int WINAPI WinMain( __in HINSTANCE hInstance, __in_opt HINSTANC...
分类:Windows程序   时间:2015-05-04 23:57:52    阅读次数:370
C#(Winform)禁用TextBox控件的鼠标事件
1. 继承TextBox,然后重写父类的部分方法,核心代码如下public class MyTextBox : TextBox { protected override void WndProc(ref Message m) { switch ...
分类:Windows程序   时间:2015-04-21 20:23:43    阅读次数:184
关于SubclassWindow
#define SubclassWindow(hwnd, lpfn) \ ((WNDPROC)SetWindowLongPtr((hwnd), GWLP_WNDPROC, (LPARAM)(WNDPROC)(lpfn)))从该宏可以看出是调用SetWindowLongPtr...
分类:Windows程序   时间:2015-04-12 14:36:21    阅读次数:364
WinForm学习笔记(一)- 无边框窗体移动
通过重写WndProc方法,实现无边框窗体移动和禁止双击最大化的操纵。#region 移动窗体 /// /// 重写WndProc方法,实现窗体移动和禁止双击最大化 /// /// Windows 消息 protected...
分类:移动开发   时间:2015-04-09 19:01:54    阅读次数:181
WIN32 下的编程(五子棋)
写比较麻烦,不过没牵涉到什么算法,只是一些逻辑问题#include #include #include #include #include LRESULT CALLBACK WndProc (HWND , UINT , WPARAM , LPARAM) ; //定义主函数 int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPreInst,LPS...
分类:Windows程序   时间:2015-04-04 15:16:29    阅读次数:204
窗口 超类化 子类化 HOOK
窗口 超类化 子类化 HOOK #include "StdAfx.h"#include "MyGameWnd.h"#include WNDPROC g_pSubclassOldProc ; // 保存窗口默认的消息响应函数指针WNDPROC g_pSuperOldProc ;// 保存窗口默认消息处...
分类:其他好文   时间:2015-03-13 17:59:03    阅读次数:375
unity3d 实现windows 消息
【狗刨学习网】 Windows Message in the Unity3D : WndProc 先前提到可以用 Hooks 的方法在 Unity 裡監控 Windows Message,但是使用 Hooks 這個方法我們沒辦法更改 Message 的內容。因此這邊提出第二個方式。Windows 傳送 Message 給 Unity 時,會呼叫 Unity 預設的 Messag...
分类:编程语言   时间:2015-03-07 09:05:57    阅读次数:375
在WPF中处理Windows消息
在Winform中 处理Windows消息通过重写WndProc方法在WPF中 使用的是System.Windows. Sytem.Windows.Controls等名字空间,没有WndProc函数WPF中处理消息首先要获取窗口句柄,创建HwndSource对象 通过HwndSource对象添加消息...
分类:Windows程序   时间:2015-03-04 12:30:13    阅读次数:247
157条   上一页 1 ... 9 10 11 12 13 ... 16 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!