hwnd

Is it normal for an hwnd to have its high bit set?

北城以北 提交于 2019-12-12 05:38:15
问题 I'm passing my HWND to a sub-process so it can send me messages back on its progress. Occasionally I never receive any messages from the sub-process. While investigating, I've found that GetSafeHwnd() of which I'm passing to the subprocess seems to be returning values I don't expect. For example: 0xffffffffa5400382 Based on that, I can probably deduce that I'm not properly converting that value to/from an int64/string properly. I can fix that. But what I find odd is that this hwnd just doesn

Get ITaskbarList3 data of specific window

有些话、适合烂在心里 提交于 2019-12-11 23:29:44
问题 ITaskbarList3 interface provides only setter methods. Is there a way to get the information (like HWND list of the tabs) for a specific taskbar entry? 回答1: No that's not possible through the taskbar API. The system has been designed with the intention that you'll only work on taskbar buttons that you own. In which case there's no need for getters since you can remember for yourself what value you last passed to a setter, should you need to. 来源: https://stackoverflow.com/questions/6330355/get

Find Window and change it's name

谁说胖子不能爱 提交于 2019-12-11 13:29:21
问题 Sup What i'm trying to do is a way to find a window though it's process ID, get the name of that window and change it to something that i want. I found some things about that : ( Code 1 ) int WINAPI GetWindowText( _In_ HWND hWnd, _Out_ LPTSTR lpString, _In_ int nMaxCount ); this : ( Code 2 ) CWnd* pWnd = GetDlgItem(); GetDlgIt pWnd->SetWindowText(_T("WindowName")); CString str; pWnd->GetWindowText(str); ASSERT(str == _T("WindowName")); and also this ( Code 3 ) HWND WindowHandel = FindWindowA

Win32 Unable to add custom toolbar icon having transparency

允我心安 提交于 2019-12-11 11:29:11
问题 I am using this code to add a toolbar to the window with one button having a custom image: HWND hToolbar = CreateWindow(TOOLBARCLASSNAME, NULL,WS_CHILD | TBSTYLE_FLAT|TBSTYLE_AUTOSIZE |TBSTYLE_LIST|CCS_BOTTOM, 0, 0, 0, 0, hwnd, NULL, ghInstance, NULL); //create the toolbar SendMessage(hToolbar, WM_SETFONT, (WPARAM)hFontBold, static_cast<LPARAM>(MAKELONG(TRUE, 0))); //set the font. there cannot be the problem //↓↓↓↓↓**ILC_COLOR32 is specificied here but 32bit bmp is still not showing**// auto

Create child Window of another process's HWND? (e.g. screensaver preview)

霸气de小男生 提交于 2019-12-11 02:39:10
问题 I'm writing a screensaver in Java. It's primarily for Windows, though I'd prefer it to be as portable as practical. According to http://support.microsoft.com/kb/182383, when a screensaver is invoked with command line args /p HWND , the screensaver should "Preview Screen Saver as child of window ." Presumably this is how screensavers should their little preview in the Screen Saver Settings dialog. So how, in Java, do you create a JFrame or JComponent that's a child of a window that belongs to

Setting active a Chrome window (C++)

无人久伴 提交于 2019-12-11 02:19:47
问题 I am trying to set a Chrome Window to the foreground and active it in order to get the focus of the keyboard. My code works with Notepad or IE, but does not work with Google Chrome. //Getting the HWND of Chrome HWND chromeWindow = FindWindow("Chrome_WidgetWin_1", NULL); DWORD dwCurrentThread = GetCurrentThreadId(); DWORD dwFGThread = GetWindowThreadProcessId(GetForegroundWindow(), NULL); AttachThreadInput(dwCurrentThread, dwFGThread, TRUE); //Actions AllowSetForegroundWindow(ASFW_ANY); bool

Creating a Win32 Window app with English title bar, but the title bar becomes Chinese out of nowhere. How come?

 ̄綄美尐妖づ 提交于 2019-12-10 21:32:09
问题 HWND wndHandle; //global variable // code snipped WNDCLASSEX wcex; // code snipped wcex.lpszClassName = (LPCWSTR) "MyTitleName"; // code snipped wndHandle = CreateWindow( (LPCWSTR)"MyTitleName", //the window class to use (LPCWSTR)"MyTitleName", //the title bar text ... ... I am following a tutorial for Win32 Window application. The code above is used to set the name of the title bar of the window screen. The compiler yells at me : "cannot convert from 'const char [12]' to 'LPCWSTR'" so okay,

Get hwnd of Excel InputBox Method

北城以北 提交于 2019-12-10 17:52:41
问题 I think I have a fairly simple question. I'm looking for a method to get the hwnd for an excel input box. I'm automating a process and I'm noticing that a type 8 input box is consistently underneath the excel window (I'm automating excel from another application if that is helpful.). Obviously, I'd like it to show up on top, and I'm attempting to use the SetForegroundWindow function. Any advice? By request, the only thing I've found that seemed worth trying: Public Function GetHwnd() as Long

FindWindow() doesn't find my window [C++]

隐身守侯 提交于 2019-12-10 17:00:56
问题 This is not a complex question. I'm having trouble finding the handle that belongs to iTunes. But although iTunes is running in the background, it keeps telling me it can't find the window. So I went on checking whether I miss typed the window name, but spy++ pointed out to me that I was using the correct window name and class name (see below). I'm sure it's a small mistake but I can't seem to find it. Does anyone have an insight? Thanks in advance. HWND hwnd; hwnd = FindWindow((LPCWSTR)

Select IE window using HWND

不羁岁月 提交于 2019-12-10 12:35:00
问题 Wondering if it is possible to select an IE window based on the HWND property (or similar). My script clicks a link which opens a new page in a separate window and I would like to be able to work with this new window. Here is my code: $ie.Navigate("https://chaseloanmanager.chase.com/Chaselock/ViewOnlineGuide.aspx") # opens page in new window while ($ie.Busy -eq $true){Start-Sleep -Seconds 2} $childWindow = Get-Process | Where-Object {($_.ProcessName -eq 'iexplore')} | Get-ChildWindow | Where