winapi

Create flash executable that calls external dll functions

Is it possible to create an executable from flash that is able to call functions in an external dll (such as the windows API for example)? ...

Creating a directory in Application Common Data Directory.

I have win32 API application in visual c++. I want to create a directory in Application Common Data Directory. I have the code which is generating following error. I have also tried to add '\0' at the end of string, but the same error appears. Debug Assertion Failed! Expression: (L“String is not NULL terminated” && 0); code : TCHAR Ap...

Get the Process ID by its name in win32 windows mobile

Hi, how to get the process ID and handle of a process by its name in win32(windows-mobile). i mean if i pass the process name i should get id.. how to do this.. Thanks in advance. ...

Send Text to an inputbox using win32 api

I'm trying to send some text to an inputput box using win32. Some text appears in the inputbox, but it is all jumbled (?????????a??????). The code is : SendMessage(myHandle, WM_SETTEXT, 1, "A") ...

Programatically setting a PNG to a Picture Control in Win32 APIs

I use Visual Studio 2008, I have the PNG file loaded in the Resource View, assigned it IDB_BANG_PNG. The Picture Control is called IDC_STATIC15. I am having trouble trying to get the PNG loaded into the picture control. LRESULT CALLBACK DialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { // Way of loading a bmp with a...

Sending the output of a command-line perl script to the browser via mod_perl

I have a plain perl script that can be run from the command-line via perl -w test.pl. I then have a mod_perl2 script that can be accessed from a web browser. I want to have the latter call the former and send the output to the browser, flushing as it goes. The mp2 script doesn't have a shebang line, because it's mod_perl, so it doesn't ...

VC++ win32 API programming :how to change mouse cursor

Hi there I am trying to change the mouse cursor and write the code below but doesn't work. It seems IDC_CURSOR_WHITE should be put into a rc file. I tried and failed. At last I came here seeking your guidance. Help! Thanks. IDC_CURSOR_WHITE IDC_CURSOR_BLACK not hWhiteCursor = ::LoadCursor(hInstance, (LPCTSTR)IDC_CURSOR_WHITE); hBlac...

List processes for specific user...

Hello, Would someone be able to point me to the C++ API's that I can use to display a list of processes and the user name in Windows? My current code uses the CreateToolhelp32Snapshot Function which shows all the processes running for all users, but I do not know what API's to use to retreieve the user name so I can filter it by user. ...

How can I ask Windows to print a document?

I want to (programmatically) print documents of various types, by asking Windows to do it (using the default associated application). How can I do this (in .NET or C++/Win32 API)? For example, if I have MS Office and Acrobat Reader installed on the machine, PDF files should be printed by Acrobat Reader, and DOC files should be printed b...

Magnification for PDAs and Smartphones using RDesktop

If I've got some Native Windows App (i.e. Delphi) and I'm having a lot of end users running it on things like the Nokia N800 connected to a windows terminal server using RDesktop. Some of the things on the screen are very hard to see, but I don't want to have some weird magnification of the whole screen because the resolution on those...

Why is the compiler throwing this warning: "missing initializer"? Isn't the structure initialized?

Hi, I'm creating some sort of frontend for a program. To launch the program I'm using the call CreateProcess(), which among other things receives a pointer to a STARTUPINFO structure. To initialize the structure I used to do: STARTUPINFO startupInfo = {0}; // Or even '\0'. startupInfo.cb = sizeof(startupInfo); When compiling the progr...

how to code for reducing flicker? need your help with code. win32 VC++ flicker

I'm trying to bitblt bitmap to mouse cursor position with the mouse movemont.but with flickering problems. I've read about double buffering to reduce flicker but I'm not sure how to ... this causes extreme flickering. I've read about double buffering to reduce flicker but I'm not sure how to implement it in this example. Please can you...

WinAPI function to start help file

when you open help in e.g. Windows Notepad (Help->Help Topics) no child process is started (such as hh.exe), which IMO means there is a WinAPI function called to do the job. I searched MSDN for a while but came up with nothing. what is this function? ...

Non-intrusively unlock file on Windows

Is there a way to unlock a file on Windows with a Python script? The file is exclusively locked by another process. I need a solution without killing or interupting the locking process. I already had a look at portalocker, a portable locking implementation. But this needs a file handle to unlock, which I can not get, as the file is alre...

Distributed GNU Make for Win32

Is there a version of GNU Make, or GNU Make compatible application, which supports distributed builds on Win32? We currently have a large project using gnu makefiles. We use the Win32 version of GMake to build. Our build environment supports parallel builds without a problem, and we'd like to try and perform a distributed build if pos...

Can I capture stdout/stderr separately and maintain original order?

I've written a Windows application using the native win32 API. My app will launch other processes and capture the output and highlight stderr output in red. In order to accomplish this I create a separate pipe for stdout and stderr and use them in the STARTUPINFO structure when calling CreateProcess. I then launch a separate thread for ...

checkbox - change notification

What notification code is sent with the wm_command message to the dialog box procedure when a check box changes state? And more importantly, where would I look in the msdn to find the notification codes for various controls? ...

Google Earth and Windows application

I have a C++ Windows application continually updating lat, long and altitude. I would like my application to incorporate Google Earth to visually "track it". Any advice or pointing in the right direction would be appreciated. Thanks. ...

Qt cursor flickers, when it's over an InkCollector

I am writing a drawing program using PyQt4 for Windows 7. When my program is in "Drawing" mode, I use a InkCollector COM object to collect the ink strokes. When the tablet stylus is pressed down, the InkCollector object supresses the cursor and only shows a writing tip. When the stylus is hovering, I see the normal cursor and it flickers...

How to use the Windows API in MinGW?

How to use the Windows API in MinGW? ...