window

Can I draw something on window, that does not belongs to me, using opengl?

删除回忆录丶 提交于 2019-12-24 01:53:14
问题 I heard you can hook window handle and use this window as OpenGL canvas. I know how to hook windows, but I can't find how can I draw on this window. PS. I'm using Qt if it helps. 回答1: OpenGL contexts are only usable in one thread at a time and are bound to processes. So what that required was creating a OpenGL context of a foreign process' resource. On Windows using some very quircky hacks this was possible in at least WinXP (I don't know about Vista or 7); this usually includes making large

Can I draw something on window, that does not belongs to me, using opengl?

久未见 提交于 2019-12-24 01:53:12
问题 I heard you can hook window handle and use this window as OpenGL canvas. I know how to hook windows, but I can't find how can I draw on this window. PS. I'm using Qt if it helps. 回答1: OpenGL contexts are only usable in one thread at a time and are bound to processes. So what that required was creating a OpenGL context of a foreign process' resource. On Windows using some very quircky hacks this was possible in at least WinXP (I don't know about Vista or 7); this usually includes making large

Open Window on the Same Monitor as MainWindow

半世苍凉 提交于 2019-12-24 00:54:33
问题 I've seen many questions regarding similar issues, but I haven't found one quite specific enough to my question to find an answer yet. I allow the user to move the MainWindow of my program around and, if they have one, onto another monitor. When they click to add something on the MainWindow, a new Window is created so they can fill in a form. The problem is that this new Window will start on the primary screen of the OS instead of starting on the screen that the MainWindow is currently

Javascript's window.open function inconsistent, does not open pop up when expected

老子叫甜甜 提交于 2019-12-24 00:54:16
问题 Ok, I'm going nuts here. I'm trying to implement a basic popup window to display images. If my javascript code is fully specified in an HTML tag with the onclick property, the window pops up correctly. If my IDENTICAL javascript code is called from either the script tag at the beginning of the HTML document or from a separate js file, the link (or image in my case) opens not in a popup, but in the same window. < frustration > This opens a popup: <a href="test.jpg" onclick="window.open('test

PeekMessage not getting the message?

不问归期 提交于 2019-12-23 21:08:20
问题 I've created a custom message type for use in resizing my Window , called WM_NEED_RESIZE . I've defined it in my .h file, and initialized in my .cpp file. I have also registered my WindowProc function to accept messages. Here is the code for these items: const uint32 WindowsGLWindow::WM_NEED_RESIZE = WM_USER + 100; LONG WINAPI WindowsGLWindow::WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { static PAINTSTRUCT ps;// do I need this? static sint32 newWidth = 0; static sint32

How to keep a window on top of all other windows in my application only?

半城伤御伤魂 提交于 2019-12-23 20:00:31
问题 I would like to display a status window in my C# Windows Forms application that informs the user when the application is waiting to acquire a lock. This is an application-defined thing, however, the window should be visible and always remain on top of all other windows of my application, even when the user clicks on another window (like for example the larger main window behind it). It must not be modal (so ShowDialog() cannot be used) because the app needs to keep trying in the background

Collect all active window class names

安稳与你 提交于 2019-12-23 18:37:44
问题 Many programs (True Transparancy and others) can get all active or running in background window class names like this one: Delphi 7 Object Inspector name is tpropertyinspector Opera main window class name is operawindowclass etc. So how to get any opened window class name in Delphi? 回答1: Call EnumWindows to get all the top level windows. Then call GetClassName to find out the window class name for each window. If you also wish to probe child windows then call EnumChildWindows on each top

WinAPI window doesn't appear

谁说胖子不能爱 提交于 2019-12-23 16:34:13
问题 And I can't figure out why. My code: #include <windows.h> #include <commctrl.h> #include <cstdio> #include <stdarg.h> #include <string> #include <cmath> #include <vector> #include "resources.hpp" using std::string; using std::vector; struct undostruct{ /* add later */}; char buffer[2048]; HWND statusbar; HINSTANCE hinst; vector<undostruct> undo; void show_error(const char* format,...){ va_list args; va_start(args,format); vsprintf(buffer,format,args); va_end(args); MessageBox(NULL,buffer,

C# form auto resize window

会有一股神秘感。 提交于 2019-12-23 15:45:11
问题 I have a form app. inside I have a richTextBox. How to make make the app to auto resize the rich textBOx? meaning if I expand or max the window, rich textBox should follow 回答1: Use your TextBox's Anchor property. You'll probably want to set it to all sides, Top, Bottom, Left, Right. 回答2: If the RichTextBox is the only control you can set it's Dock property to Fill . If it shares the form with other controls you can use the Anchor property. If you need more help with GUI layout in Visual

Problem when maximizing window in C++

核能气质少年 提交于 2019-12-23 10:17:45
问题 My program needs to arbitrarily maximize any window on the current desktop. I achieve this by calling ShowWindow(hWnd, SW_MAXIMIZE) , where hWnd is the HWND of the window I want to maximize. When that line of code executes, the window in question (here, Notepad) looks like this: Everything seems fine, except for the fact that the window has not been positioned correctly, i.e. the window seems to be a few pixels to low, and the title bar does not look "squashed" like it should. Compared to how