winapi

Issue on using CMAKE with MSYS/MinGW linking dll files using DevIL image library

Hi, actually i create a CMake script to localize the DevIL library using MSYS/MinGW on win32 platform. I've extend the origin FindDevIL CMake script to regard the MinGW root when try to find DevIL: project (DevILTest) cmake_minimum_required(VERSION 2.6) FIND_PACKAGE(OpenGL) IF(OPENGL_FOUND) MESSAGE(STATUS "OpenGL render API found.")...

Python PyHANDLE object in win32gui

I've been playing around trying to create a transparent window that will overlay another application. I'm finding the win32 extensions are a bit of a mess, there's win32ui, win32gui, winxpgui, etc. somewhat confusing. Anyway, I'm trying to pass a handle to a window to this function win32gui.UpdateLayeredWindow the first argument it wa...

c++ check cursor position

im trying to see if the cursor is inside my game not on the menue or the border inside the game. i don't konw what function should i use? i thought of using GetcursorPos() but is there better function? ...

Windows API. SendMessage. Help

int x = 5; int y = 10; y = y << 16; int coord = x | y; NativeMethods.SendMessage(hwnd, WM_LBUTTONDOWN, new IntPtr(0), new IntPtr(coord)); NativeMethods.SendMessage(hwnd, WM_LBUTTONUP, new IntPtr(0), new IntPtr(coord)); Using the above code (ref: MSDN), I'm able to select a row in a datagridview in an external application. I would like...

Windows 7 Snap - Windows Message ?

In my windows form application I want to capture the windows 7 snap message, does anyone know which message is generated when the window is about to be snapped. I tried to listen in to the application and it looks like WM_GETMINMAXINFO = 0x24; is generated. Can anyone confirm if thats really the windows message for snap? ...

WinINet trouble downloading file to client?

I'm curious why I'm having trouble with this function. I'm downloading a PNG file on the web to a destination path. For example, downloading the Google image to the C: drive: netDownloadData("http://www.google.com/intl/en_ALL/images/srpr/logo1w.png", "c:\file.png"); The file size is correct after downloading. Nothing returning false. W...

Creating a window without caption and border

How can you create a window without caption and border using CreateWindowEx()? And I why do you use '|' OR operator to combine styles instead of '&' And? ...

Any caveats in porting GNU Pth code for Pthreads?

I have code written using GNU Pth ( http://www.gnu.org/software/pth/ ) and I want to move to Pthreads because I want it to be cross-platform (Unix, Mac, Windows). Are there and caveats I should watch out for while going about switching from Pth to Pthreads, or is it mostly just a matter of realigning arguments and variable types? ...

Are Hierarchical Rowsets supported by JET and SQL Server?

The OLE DB documentation documents a hierarchial rowset feature, with SQL examples, but doesn't indicate what DB providers support it. Do JET and SQL Server support this feature? And do they use the same sort of syntax as in the documentation, or their own extended syntax? ...

What's the easiest way to find a given control in a external program's window?

What is the best way for, using WinApi, find a given control in a external program window? For example, I'm trying to change Internet Explorer's url text box. I am having trouble getting programatically the handle to the text box. I know its type is "Edit" but I'd like to avoid having to search through all the child windows for the "Edi...

windows/python manipulate versioninfo during runtime

I have multiple python processes running in their console output windows. I can set their console title via win32api.SetConsoleTitle(). Thats nice, but it would be even nicer to set some versioninfo strings (like description/company name/version) during runtime as that would allow me to easier differentiate between the (generic) python p...

Application Type

When developing a stand alone application for windows, what type of application should i use. CLR MFC Win32 The application will be connected to an SQL Database, have multible forms, use a Ribbon Bar. If anyone needs more info to answer this question please let me know. ...

Does a window have place for background image like a dialog?

Can you set a background bitmap in a window as in a dialogbox? what are the differences? ...

About the PeekMessage in c++

PeekMessage(&msg, NULL, 0, 0, PM_REMOVE) If hWnd is NULL, PeekMessage retrieves messages for any window that belongs to the current thread, and any messages on the current thread's message queue whose hwnd value is NULL (see the MSG structure). Therefore if hWnd is NULL, both window messages and thread messages are pro...

Positioning multiple Windows Appbars

Does anyone have experience with Windows appbars (application desktop toolbars)? I have figured out how to implement them from the documentation (http://msdn.microsoft.com/en-us/library/cc144177%28VS.85%29.aspx), and I've got it working pretty well. But I'm noticing when there are multiple non-auto-hide appbars on adjacent edges, the top...

Sending arguments to an app-instance that resides in another process

I have a single-instance app (c#, WPF, .net3.51). The check if the app is already instantiated is done via a Mutex. If the app is already running, I open a new window from within the already opened app-instance. This works fine so far. However due to an app extension, I now must send the e.Args (or at least the first string of it) to t...

Some APIs that support the NT namespace absolute path of the format "\Device\Xxx"

In this document, http://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx#paths To make these device objects accessible by Windows applications, the device drivers create a symbolic link (symlink) in the Win32 namespace, "Global??", to their respective device objects. For example, COM0 and COM1 under the "Global??" subdirectory ...

How to use an accelerator table in a modal dialog box ?

I'm programming with the Win32 API, not MFC. ...

How do I gracefully close another application?

I have a CLI/C++ based install application which needs to close another app I've written, replace the application's .exe and dlls and the re-run the executable. First of all I need to close that window along the following lines: HWND hwnd = FindWindow(NULL, windowTitle); if( hwnd != NULL ) { ::SendMessage(hwnd, (int)0x????, 0, NULL...

is it safe to read the pipe when the other side is writing to it?

fSuccess = ReadFile( hPipe, // pipe handle chBuf, // buffer to receive reply BUFSIZE*sizeof(TCHAR), // size of buffer &cbRead, // number of bytes read NULL); // not overlapped If not safe, how can I ensure the other side is not writing when reading a pipe in windows? ...