windows-messages

Windows XP WinAPI support for CheckBox controls

坚强是说给别人听的谎言 提交于 2021-02-08 05:40:22
问题 I was having a look at the documentation for BM_GETCHECK and it seems that this functionality is only supported on Windows Vista and above. That is, this is not a supported message in Windows XP. A quick search online doesn't immediately yield an alternative way of getting the control state. Several other messages (this for example) that I would also expect to work on Windows XP are reported to not be supported. Does anyone have any insight into this? How does one generally handle Windows XP

C# to C++ CopyData API

…衆ロ難τιáo~ 提交于 2021-01-07 02:39:43
问题 I am developing an automation interface program and I looking to enhance capability with a machine software which uses a COPYDATA API aimed at C++. The goal is to control and report status of the machine through my own software. The method uses pointers and memory allocation which I have not had any experience with thus far. I have looked at a number of other sources, such as this with no luck at the moment. I have tried the following code to try and run a program on the machine software.

C# to C++ CopyData API

 ̄綄美尐妖づ 提交于 2021-01-07 02:38:45
问题 I am developing an automation interface program and I looking to enhance capability with a machine software which uses a COPYDATA API aimed at C++. The goal is to control and report status of the machine through my own software. The method uses pointers and memory allocation which I have not had any experience with thus far. I have looked at a number of other sources, such as this with no luck at the moment. I have tried the following code to try and run a program on the machine software.

C# to C++ CopyData API

笑着哭i 提交于 2021-01-07 02:38:07
问题 I am developing an automation interface program and I looking to enhance capability with a machine software which uses a COPYDATA API aimed at C++. The goal is to control and report status of the machine through my own software. The method uses pointers and memory allocation which I have not had any experience with thus far. I have looked at a number of other sources, such as this with no luck at the moment. I have tried the following code to try and run a program on the machine software.

Change char inserted using Alt+Unicode in CRichEdit

心已入冬 提交于 2020-02-06 03:30:31
问题 I want to change a unicode char inserted using Alt+Unicode code from the keyboard. I used PretranslateMessage for changing the chars inserted directly from the keyboard and it worked. But with the Alt+Unicode code method it does not. Here is the code: Microsoft Word has this functionality when enabling show/hide paragraph marks. BOOL CEmphasizeEdit::PreTranslateMessage(MSG* msg) { if (msg->hwnd == m_hWnd) { if (msg->message == WM_CHAR) { if (TheApp.Options.m_bShowWSpaceChars) { if (msg-

Fill struct from IntPtr received in lParam property of Window Message going across process boundaries in C#

柔情痞子 提交于 2020-01-25 10:35:08
问题 I posted this question a few days ago, and I have some follow up doubts about marshaling an IntPtr to a struct. The thing goes like this: As stated in the question I am referencing, I make calls to asynchronous methods on a native Dll. These methods communicate their completion with Windows Messages. I receive the Windows Message correctly now and, within it, an lParam property (of type IntPrt). According to the documentation I am following, this lParam points to the struct that has the

How to get WM_POWERBROADCAST message in CWinApp?

随声附和 提交于 2020-01-14 03:04:23
问题 I create the class that inherited CWinApp and this class has a timer (use a window timer). When PC go sleep mode and wake-up, timer callback is called exact time of wake-up. I want to make to not call the timer callback when PC is resuming from suspend. So I tried to use WM_POWERBROADCAST message. But this message didn't catch in PreTranslateMessage() API. Also I tried SetWindowLong() with my own API but still didn't catch the WM_POWERBROADCAST message. Is there any way to get WM

Disabling desktop composition causes flickering on Tab Control

对着背影说爱祢 提交于 2020-01-11 13:36:26
问题 When i disable desktop composition i get flickering/blinking whenever i hover the mouse over the tabs. This only happens when desktop composition is disabled. I have tried to cancel WM_ERASEBKGND message but it doesn't fix the problem. What is the solution to this problem? This is the example that i tried to use for MASM tab control. http://www.dreamincode.net/forums/index.php?app=core&module=attach&section=attach&attach_id=28600 The bin is already compiled. EDIT: After enabling the WS_EX

How do I stop Windows from blocking the program during a window drag or menu button being held down?

早过忘川 提交于 2020-01-09 07:33:13
问题 I am novice with Win32, and I have been pursuing a problem (if it can be called a problem at all) with Windows blocking your program's flow during the event when a user grabs the window title bar and moves it around the screen. I have no legitimate reason to solve this problem, except that it bothers me. A few possibilities include removing the frame altogether, but it seems an inconvenient hack. Some games (single player) do not find this a problem at all. I have read however, that

Adapt windows messages in this class

一曲冷凌霜 提交于 2020-01-07 08:27:06
问题 I would like to know if this code can be adapted to use it inside a normal class (Example: Form1 Class) to don't need subclassing a Control. Code is from BlueMonkMN here Capture the option selected by the user in a windows default contextmenu? Class MyTextBox : Inherits TextBox Public Enum ContextCommands WM_CUT = &H300 WM_COPY = &H301 WM_PASTE = &H302 End Enum Public Class ContextCommandEventArgs Inherits EventArgs Public Property Command As ContextCommands End Class Event OnCut(sender As