winapi

Get the position of the windows start menu

I'm writing an app in Python that automatically moves stuff around. How do I get the position of the windows start menu bar, so I can account for it in my calculations? ...

How to get standard output from CreateProcessWithLogonW?

I am using the code from http://www.pinvoke.net/default.aspx/advapi32.createprocesswithlogonw. How do I get the output from the standard output as a string? Like the stuff that shows up when you run it interactively in a command window? ...

How to know TabletPC is in 'Laptop' or 'Tablet' mode

I'm writing a Touch-enable application for DELL TX2, for text input, I need to know whether the TablePC is in 'Laptop' or 'Tablet' mode, then change the text input mode. In 'Latop' mode, don't call virtual keyboard, vice versa. But I didn't find any useful information from MS website and google. Is there any Windows API? Thanks in advanc...

Example for DrawText?

Hi i m new to win32 application? I want to know how to write text on a particular window at the top of the window say for an example (x,y) =(40,10) in this coordinate of a particular window . i have to write text. ...

getting International Mobile Subscriber Identity (IMSI) in win32 application

Dear All, I am developing a application, where I need to display the IMSI number from data card which has been plugged in to a vista system.I am using visual studio 2005 and microsoft SDK. Is there any way to access the IMSI number of the data card(both GSM and CDMA) using any win32 api or any other way to access it thanks in advance ...

Capturing window output in another window

I am building a C++ (Qt) based application for controlling a flash based UI. Because the flash runtime leaks spectatular amounts of memory, we execute the UI as a .swf loaded in the standalone flash player separate from the command-and-control app written i C++. The C++ starts the flash player as an external process with appropriate par...

Does CallNtPowerInformation(SystemPowerInfomation...) work on WIndows XP?

I'm trying to access the "TimeRemaining" value for the power management idle counter. Google search indicates that lots of folks (including me) can get a value once, but every subsequent call gives the same results. No countdown, no change in CurIdle value... Here's a short version of the code in question: #include <windows.h> #inclu...

Using RegisterDeviceNotification in a .NET app

I have seen some examples on how to use RegisterDeviceNotification from the Windows API, but I have not seen any .NET examples. I want to write a C# app that is notified when a new drive appears (specifically through USB, firewire, etc). This app needs to be a Windows service, so I can't use WM_DEVICECHANGE messages without some bad-prac...

How to copy bitmap to clipboard using the win32 API?

How do I copy a buffer that would save to a ".BMP" file to the clipboard using the win32 API? I.e., I have a raw buffer of a Windows V3 Bitmap (including the header) that I can literally write() to a file and will result in a valid .BMP file, but I want to copy it to the clipboard instead. On OS X, in plain C, the code would look someth...

Link a member function directly to C method declared in a header

Can I link a member function like this in some way? redeclaring the method as a member and get it call the Mmsystem.h method to not have to wrap it? #include <windows.h> #include <Mmsystem.h> namespace SoundLib { public class CWave { public: // WaveIn call external UINT waveOutGetNumDevs(VOID); }; } ...

C# Set Window Behind Desktop Icons

Hi all. Assume i have an empty form 100px by 100px at 0,0 coordinates on the screen. It has no border style. Is there any way to have this positioned BEHIND the desktop icons? I would assume this would involve the process Progman because thats what contains the desktop icons. But no matter what i try... getting window handles and changi...

How to create window using structure concept so as to reduce code segment?

Suppose i have 5 window to be created in which one is parent and the four window are child window. So on the parent window if i have to create four window then how should i implement the structure concept so as to reduce the code segment.? Is this a good habit or not to use the structure concept? Please reply thanks a lot. ...

The current user folder will be changed on Window Vista and 7

I have a application need to run under Administrator right, If I run it with Guest user account, after click the UAC dialog, using Windows API to get the current user folder in AP will be changed to Administrator folder, not Guest folder. How to solve it? Thanks in advance. ...

WINAPI: Look at messages from other process

Hi, I'm quite new to the Windows API and would like to know how to peek at messages another process receives. As an example, I would like to get the HWND of, say, notepad and peek at all messages that are sent to this window. I code in C/C++. Thank you ...

32bit matlab program, 64bit windows, how do I get 6GB of RAM?

I have some matlab code that will only run on 32 bit windows, but I need atleast 6 gb of ram to run it. In my lab the only machine that has 6gb ram is running 64 bit windows, is there some way to run this code on here? I am thinking of emulating a 32 bit windows and running it on that, will that work? ...

Reason for ~100x slowdown with heap memory functions using HEAP_NO_SERIALIZE on Vista and Windows 7

I'm trying to tracedown a huge slowdown in the heap memory functions in Vista and Windows 7 (I didn't test on any server editions). It doesn't happen on XP at all, only on Microsoft's newer operating systems. I originally ran into this problem with PHP complied on Windows. The scripts themselves seemed to run at the expected speed, but ...

How to add text to "edit box" control in visual studio 2005

Dear All, I want to add some text on a dialog in VS 2005. I have installed Microsoft SDK on my system. The text which I want to add is very big, it runs upto 4 pages. So I decided to add edit control with scrollbar, which I am not able to do. I tried adding through string table, but formatting was not maintained. Plz let me know, ho...

Explaining the declaration/definition of HRESULT

I just looked at the definition of HRESULT in VS2008. WinNT.h has the following line: typedef __success(return >= 0) long HRESULT; What exactly does it mean? It doesn't even look like C or C++ to my untrained eye ...

Is there a simple way to allow tabbing between non-VCL and VCL controls on a Delphi form?

I have a Delphi form with a bunch of VCL controls, like TButton and TCheckBox, and an instance of the Scintilla text editor. I want to be able to tab into and out of the text editor but it looks like tabs are handled by the VCL library not Windows. I stepped though the code and it looks like tabs are handled by the SelectNext and Fin...

Read Installed Device Driver Details (version, install date, path etc), on Win system

Hi Everyone, Can anyone help please in this regard ? What API's can be used from win32 to get installed device drivers details like version, installation date, path where installed ? Regards, Kedar ...