windows

MFC Panel and window handle

Is there something like a panel that I can use in a MFC application. This is to overlay the default window in MFC (a dialog application). Then to paint the panel black and paint some random stuff on top of it. Something like a view port. is there a better option than this to achieve the same effect ? ...

Underused features of Windows batch files

I think everyone agrees that DOS batch scripting is lame. Nonetheless there are many situations where it is expedient, or you must maintain existing scripts. Guidelines: One feature per answer Give both a short description of the feature and an example, not just a link to documentation Limit answers to native funtionality, i.e., does ...

Checking files for errors

I have lots of files in different formats (mostly pdf files) and I need to check if they can be opened without errors and get a list of those that are broken. Other than opening them all separately is there a way to find out which won't open / are corrupt? ...

Coding color scheme for programming in Windows, not just Visual Studio

Like many SO people, I'm in front of a computer almost all day. I like having a dark theme for Visual Studio (easier on the eyes), but since the rest of Windows and apps (explorer, dialogs, Outlook), have the full white background, it's even harder to switch between nice dark VS and sunshine bright Windows. I tried a UXTheme.dll patch b...

How are Windows VK_ constants declared?

For example VK_LEFT, VK_DELETE, VK_ESCAPE, VK_RETURN, etc. How and where are they declared? Are they constants, #defines, or something else? Where do they come from? If possible, please provide a file name/path where they are declared. Or some other info as specific as possible. ...

Group Similar Taskbar Buttons

Our app is made up of several Modules, and we would like to take advantage of the XP feature that would allow these to be grouped together. For example all windows in "Module A" would be grouped together, separately from windows in "Module B". I've tried setting the AssemblyTitle attribute in the project's AssemblyInfo.cs file but sti...

How can I recursively copy files of a specific pattern into a single flat folder on Windows?

I need to copy a set of DLL and PDB files from a set of folders recursively into another folder. I don't want to recreate the folder hierarchy in the target folder. I want to use built in Windows tools, e.g. DOS commands. Thanks in advance. ...

Do you know a similar program for wc (unix word count command) on Windows ?

A quick search gives me tawbaware wc, but it does not accept stdout as input stream, meaning I can not use pipe within a DOS session. Note: I can not install cygwin or use powershell (which would have allowed a '|foreach-object {(get-content $_).count}') unxutils and and gnuwin32 Packages might have this feature... ...

How do I control which symbols a Windows DLL imports from the application?

I'm trying to build a shared library (DLL) on Windows, using MSVC 6 (retro!) and I have a peculiar link issue I need to resolve. My shared library must access some global state, controlled by the loading application. Broadly, what I have is this: application.c: static int g_private_value; int use_private_value() { /* do somethin...

Windows API for detecting out of paper on specific printer tray

I'm looking for a way to determine if a specific tray on a given printer in Windows is out of paper. Currenly I'm using the WMI Win32_Printer object to get the status of the entire printer, and if one of the trays is out of paper I do get a status that tells me the entire printer is out of paper. But I'd like to know if a specific tr...

Syntax of shell\command\open values - %1 vs %l vs %L

Hi, one of the programs I'm developing at work is reading the registry to figure out how to open files that it is given from another application (we didn't use ShellExecute because we need to process id, and I failed to look at ShellExecuteEx closely enough to see that it gives the process handle, and it's too late now, anyway). It alrea...

Are there C++ free and fast (maybe standalone) refactoring tools for Windows?

At the moment I am working in a pretty big project and I have been been asked to refactor some old code. Most of the refactoring is setting apart a big class into smaller components and functions. I've searched and seen some other questions related with the topic but I am not very happy with the proposed options. The problem with these ...

Restrict adding control on Panel

How can i restrict adding controls in Panel in C# window controls? I have to restrict user to add controls in a panel at design time. ...

Making Thrift calls from a C++ app in Windows

As the title says, I have a Windows app written in C++ from which I need to make calls to remote Thrift services, and I'm a bit lost on the subject, to be honest. http://wiki.apache.org/thrift/ThriftInstallationWin32 states that "The Thrift C++ runtime library does not currently work on Windows". Does that mean I'm shit out of luck, or i...

Windows Service or SQL Job?

I have an archiving process that basically deletes archived records after a set number of days. Is it better to write a scheduled SQL job or a windows service to accomplish the deletion? The database is mssql2005. ...

How to check, from C#, are files for complex script and rtl languages installed?

How to check, from C#, are files for complex script and rtl languages (Regional and Language settings) installed? Edit: Or is there another way of checking whether right to left text will display correctly in my form? Edit for better explanation (I hope :)) I'm creating an application that will use Arabic letters (free dictionary). So,...

Installing PHP extensions on Windows

I am using a Windows XP Home Edition. I need to install a few extensions to PHP -- memcache, APC, .etc. And I would very much like to use PECL to make this happen. The problem is PECL takes it for granted that I will have certain programs on my computer. On another post, I read, for instance, that you need to have Microsoft Visual Studio...

Re-installing MYSQL(windows) - How to get to the old data with the new install?

I needed to re-install my computer but I didn't think about exporting the data from mysql 5. How do I get the data from the old installation into the new installation, is this just copying the data directory or do I have to take other steps to get to the data? ...

How can I get the SID of the current Windows account?

Hi there, I am looking for an easy way to get the SID for the current Windows user account. I know I can do it through WMI, but I don't want to go that route. Apologies to everybody that answered in C# for not specifying it's C++. :-) ...

How to get GDI objects associated to a process

I am investigating GDI leaks issue in one of our smart-client application. I am looking for a tool (like tasklist) to get the GDI objects associated to a process. I can see the GDI objects in taskmanager, But my requirement to capture it periodically somewhere. For example in a text file. ...