CRect rect; GetClientRect(hWnd, rect); HDC hdc = GetDC(hWnd); HDC memDC = CreateCompatibleDC(hdc); BITMAPINFO bmi; bmi.bmiHeader.biSize = sizeof(BITMA ...
分类:
其他好文 时间:
2018-07-05 21:38:01
阅读次数:
194
1 //main.c 2 #include 3 #include "sysmets.h" 4 5 LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); 6 7 int WINAPI WinMain(HINSTANCE hInstance, HIN... ...
分类:
其他好文 时间:
2018-07-02 11:04:13
阅读次数:
171
跨进程间通信 发送方 还有一个PostMessage方法,和SendMessage类似。 接收方 在winform中,不同进程间窗口通信 在WPF中,如何在俩个不同进程的窗口之间通信. 传递具体的数据,可参考:http://www.360doc.com/content/18/0131/15/4511 ...
在窗口过程中处理滚动条消息WNDPROC?pSubclassOldEditProc;
INT?iVScrollPos?=?0,?iVTextPos?=?0;
LRESULT?winProc(HWND?hwnd,?UINT?message,?WPARAM?wParam,
分类:
其他好文 时间:
2018-06-26 16:02:38
阅读次数:
123
virtual BOOL CreateEx( DWORD dwExStyle, LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, int x, int y, int nWidth, int nHeight, HWND hWnd ...
分类:
其他好文 时间:
2018-06-13 14:51:32
阅读次数:
172
1 #include 2 #include 3 #include 4 5 typedef struct tagLINE { 6 POINT ptStart; 7 POINT ptEnd; 8 }LINE; 9 10 LRESULT CALLBACK WndProc(HWND hwnd, UINT m... ...
分类:
其他好文 时间:
2018-05-30 15:40:59
阅读次数:
156
1 /* 2 DIGCLOCK.C -- Digital Clock 3 (c) Charles Petzold, 1998 4 */ 5 6 #include <Windows.h> 7 8 #define ID_TIMER 1 9 10 LRESULT CALLBACK WndProc(HWND ...
分类:
其他好文 时间:
2018-05-18 18:04:40
阅读次数:
225
1. 当控制台程序运行起来是会有个黑框,隐藏黑框 HWND hwnd = FindWindow(L"ConsoleWindowClass", NULL); if (hwnd) { ShowOwnedPopups(hwnd, SW_HIDE); ShowWindow(hwnd, SW_HIDE); } ...
分类:
其他好文 时间:
2018-05-14 23:01:50
阅读次数:
186
功能:从调用线程的消息队列里取得消息并放于指定的结构。 函数原型: BOOL GetMessage( _Out_ LPMSG lpMsg, _In_opt_ HWND hWnd, _In_ UINT wMsgFilterMin, _In_ UINT wMsgFilterMax); lpMsg:指向M ...
分类:
其他好文 时间:
2018-05-12 15:13:12
阅读次数:
141
#include #include #include #include #include using namespace std; int main() { HWND hd = GetDesktopWindow(); //得到桌面窗口 hd = GetWindow(hd, GW_CHILD); //... ...
分类:
编程语言 时间:
2018-05-09 10:12:02
阅读次数:
177