windows-programming

What should I know to build a framework like WPF?

I want to make this clear: I'm not really going to build WPF from scratch. But ever since I've seen WPF I wanted to be on the WPF team and build WPF. I know WPF considerably but if you just know WPF, you cannot build it. WPF is built on DirectX and uses User32. I think Programming Windows by Charles Petzold is the first book that I nee...

Is there a Click Handler for Shell Extension

After going through MSDN Shell Extensions I am not quite sure if I can extend the behaviour of Shell Click or Click Event of explorer. Any suggestion or Code Snipet, article or Walk through? ...

Notify user if file is used by other user in windows

Hi , I am working in a project where all developers are working in a single windows system through remote sessions(remote desktop).Where we all have to share a common workspace folder..We have an issue, some times multiple user may work in same file at the same time..So when both user do some changes in the file..Only the data saved by ...

PostMessage seems be blocked by other Window's operation

Hi, It happens only on Windows XP, the Windows API PostMessage will be blocked during maximum or minimum a window of another application. It takes more than 200ms. I've set priority of my application to High. There's no problem on Windows Vista or Windows 7. Any hints how to solve this problem? Yun ...

Getting GLE=5 (Access Denied ) Error While creating Named Pipe

I have tried creating a named pipe but getting GLE 5 (access denied Error) #include <windows.h> #include <stdio.h> #include <conio.h> #include <tchar.h> #include "iostream.h" //#define PIPE_ACCESS_DUPLEX 0x00000003 //#define PIPE_ACCESS_INBOUND 0x00000001 //#define PIPE_ACCESS_OUTBOUND 0x00000002 #define BUFSIZE 512 int main() { ...

python+win32: detect window drag

Is there a way to detect when a window that doesn't belong to my application is being dragged in windows using python/pywin32? I want to set it up so that when I drag a window whose title matches a pattern near the desktop edge, it snaps to the edge when the mouse is let go. I could write code to snap all windows with that title to the d...

putty on windows using AF_UNIX

Hi, I have recently downloaded source code for putty for windows client. It is using AF_UNIX address family. AFAIK AF_UNIX socket family is not present in windows. Then how it is working here ? I am working on porting a *nix project to windows which has AF_UNIX socket family. Thanks Arpit ...

Implementing a tabbed Windows dialog window in C.

Background: I’ve inherited a project, about 10k loc implementing an odbc driver. To configure the driver a configuration window is opened. The configuration window is defined by an .rc file (a resource script) which defines all the buttons and checkboxes using x,y coordinates. Up until now when adding a new feature I just copy/pasted an...

What's a good way of connecting a Windows service with an interactive window (HWND) ?

I have two pieces of Windows technology which I'd like to plumb together: a TSP (a TAPI service provider) and an API wrapped around some hardware. The API accepts requests synchronously but returns success/fail/status result asynchronously by sending messages to a passed-down HWND. As I understand it, the problem is that because a TSP r...

Windows poll or select on Named pipe

Can I use select and poll on the Named pipe handle in windows? It will be great if an example can be given. (I am very new to windows programming) In case one of process goes down and I am polling on other end, will I get any error message on the other process that the process is down? ...

trying to replace gets_s with getche

I am trying to do a replacement of gets_s() with getche() because I want to terminate the input when a tab is encountered rather than a carriage return is encountered. But I got into another problem. It used to be that when you type the uparrow key, previous input will repeat automatically in the screen, but after I use getche(), when I...