nativewindow

Return an IOleCommandTarget from processing WM_GETOBJECT in a NativeWindow

你。 提交于 2020-01-04 17:13:28
问题 I am trying to retrieve an IOleCommandTarget reference from a panel control handle, so that I can call IOleCommandTarget.Exec() on it. NativeMethods.IOleCommandTarget target = null; if (GetObjectFromHandle<NativeMethods.IOleCommandTarget>(panel.Handle, out target)) { Guid guidCmdGroup = commandID.Guid; handled = (target.Exec(ref guidCmdGroup, commandID.ID, 0, null, 0) == NativeMethods.S_OK); } private static bool GetObjectFromHandle<T>(IntPtr hwnd, out T value) { Guid guid = typeof(T).GUID;

Use of NativeWindow for ComboBox causes exception in Dispose-method

醉酒当歌 提交于 2019-12-24 00:20:09
问题 In C# Windows.Forms I want to intercept the paste-windowmessage for a combobox. As this doesn't work by overriding the WndProc-method of the combobox, because I would need to override the WndProc of the textbox inside the combobox, I decided to create a custom class of type NativeWindow which overrides the WndProc. I assign the handle and release it, when the combobox-handle gets destroyed. But when Dispose for the combobox is called the problem is that I get an InvalidOperationException

How to convert YUV420SP to RGB and display it?

邮差的信 提交于 2019-12-11 19:28:23
问题 Im trying to render a video frame using android NDK. Im using this sample of google Native-Codec NDK sample code and modified it so I can manually display each video frame (non-tunneled). so I added this code to get the output buffer which is in YUV. ANativeWindow_setBuffersGeometry(mWindow, bufferWidth, bufferHeight, WINDOW_FORMAT_RGBA_8888 uint8_t *decodedBuff = AMediaCodec_getOutputBuffer(d->codec, status, &bufSize); auto format = AMediaCodec_getOutputFormat(d->codec); LOGV("VOUT: format

How can I create a new NativeWindow in Android NDK?

好久不见. 提交于 2019-12-03 13:31:37
问题 I tried the test-libstdc++ demo and liked that I can start it from the console and all without running a full-grown android application. I'd like to create an opengl context so that I'd be able to execute my opengl es 2.0 app from within the console without too many bothering. Any idea how could I initialize the EGL from within a NDK-app that doesn't use native activity or anything, i.e. it is not even packaged in a .APKK file, just has a main method is packed as an executable linux file.

How can I create a new NativeWindow in Android NDK?

你离开我真会死。 提交于 2019-12-03 03:30:28
I tried the test-libstdc++ demo and liked that I can start it from the console and all without running a full-grown android application. I'd like to create an opengl context so that I'd be able to execute my opengl es 2.0 app from within the console without too many bothering. Any idea how could I initialize the EGL from within a NDK-app that doesn't use native activity or anything, i.e. it is not even packaged in a .APKK file, just has a main method is packed as an executable linux file. Thanks a lot! UPDATE Does it by any chance has anything to do with ANativeWindow_acquire in *android