windows-vista

How programmable detect if a user has admin rights (can run installer)

Hi in my code I need to detect if current user has rights to install other application (other application VC2005 redist. package)... and it should work on Vista. As I understand CheckTokenMembership or IsAdministrator do not give a complete solution. Thank you ...

How to utilize the Windows Vista/7 Dialogs?

I have noticed that the Windows Vista/7 dialogs look MUCH better than just a MessageBox. How can I use them with a P/Invoke? ...

Why do calls to waveOutGetPosition hang?

I'm using the winmm.dll API method waveOutGetPosition to get the current position of the playback of a WAV file. Sometimes this works as expected for me, but eventually one of the calls never returns and my application locks up. I found this thread with a few users who have experienced the same problem: http://social.msdn.microsoft....

Preventing Windows from using Alt+Shift key combination to switch locale

Our program requires the user to hold the Alt+Shift keys together in order to carry out some operations. The problem is that Windows uses this combination to switch locale on some setups. Anyone got any ideas as to how we can "override" this behaviour of Windows whilst our program is running? Can we do some sort of message intervention? ...

OpenGL: rubber bands in Windows Vista/7

Hi there. I've been looking for any solution to draw rubber bands and cursors via OpenGL without redrawing whole window in Windows Vista/7, but can't find anything suitable. Overlay plane approach doesn't seem to be supported widely on all videocards, especially when it comes to dual screen rendering. I found a solution that suggests ma...

Hide the Linux Hidden files in windows

Hello, Is it possible to hide the Linux hidden files (.* files ) in Windows. Does explicitly hiding the files by changing the file properties in windows have any effect in Linux.. ?? Thanks Kiran ...

Sql Server Backup and move backup file: How to cope with file permissions?

With our product we have a simple backup tool for the sql server database. This tool should just make a full backup and restore to and from any folder. Of course, the user (usually an administrator) needs permission to write to the target folder. To avoid the problem of not being able to perform a backup to a network drive, I write the...

Vista Basic theme ribbon issue

Under Vista, when in Basic theme, after calling IUIFramework::Destroy() the Vista theme is lost, and enlarging the window does not display outside of the initial area. You can repro it easily with the SimpleRibbon SDK sample. In simpleribbon.cpp, insert in the WndProc switch block: case WM_KEYUP: DestroyFramework(); InvalidateRec...

How do I copy the newest file in a directory somewhere else from the command line in windows vista

I have a directory of many files in Windows Vista. I'd like in a batch script to be able to pick the newest file and copy it to another location. Any ideas how I do that? ...

DWM and painting unresponsive apps

In Vista and later, if an app becomes unresponsive, the Desktop Window Manager is able to handle redrawing it when necessary (move a window over it, drag it around, etc.) because it has kept a pixel buffer for it. Windows also tries to detect when an app has become unresponsive after some timeout, and tries to make the best of the situa...

Win32 window capture with BitBlt not displaying border

I have written some c++ code to capture a window to a .bmp file. BITMAPFILEHEADER get_bitmap_file_header(int width, int height) { BITMAPFILEHEADER hdr; memset(&hdr, 0, sizeof(BITMAPFILEHEADER)); hdr.bfType = ((WORD) ('M' << 8) | 'B'); // is always "BM" hdr.bfSize = 0;//sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER) + (width *...

How to access the Desktop Composition Engine from a WinForms app?

Is it possible to access the Desktop Composition Engine in Windows Vista from a winforms application? The DCE apparently involves applications rendering to DCE buffers instead of directly to the screen. Since a winforms app has no way of getting information about the monitor's refresh rate and scanline status (other than via DirectX), ...

How to add the UAC shield icon to program that still must target XP?

I have a program that still must target Windows XP (_WIN32_WINNT 0x501), as most of our customers still use XP. However, we have been shipping Vista for a while, and are now pushing Windows 7 upgrades. For the software to work correctly on the newer OSs, there are a couple operations that require UAC elevation. I have the elevation cod...

How to list all symbolic links on an NTFS filesystem

Hi, since Windows Vista there is an new Win32-API call CreateSymbolicLink to create a symbolic link on the NTFS filesystem. Does anyone know if there is an way to list all existing symbolic links on the filesystem? ...

Creating application forms without border, but with shadow (in Windows Vista&Windows 7)

How to do that in WinForms? ...

Graphics library used by Windows Vista Freecell and Solitaire

What graphics library is used to create the graphics in the Solitaire and Freecell games included with Windows Vista (e.g. XNA, GDI, WPF)? A good answer would include the name of the library and evidence. I looked at solitaire.exe with dependency walker and it shows many calls to gdi32.dll and gdiplus.dll, but also a call to Direct3DCr...

speed up wamp server + drupal on windows vista

Hi, My localhost performance with drupal six is pretty slow. I found a solution to add a # before the :: localhost line of the system32/etc/hosts file but this was something I had already done and didn't help much. does anyone know of any other optimisations that might work? tHanks Andy ...

Windows Media Center 6 Development on Vista

I have two development machines -- one is Windows 7, the other is Windows Vista. Depending on where I am in my house is which machine I use. I am writing a Windows Media Center 6 (which ships as part of Windows 7) application. I installed the WMC6 SDK on my Windows 7 machine with no issues. However, when I try and install it on my Vista...

How to I get raw 'mouse' events with touch screens on Windows Vista/7?

Does anyone have a clue how to completely disable the touch/tablet 'magic' introduced in Windows Vista? When I follow the steps on http://msdn.microsoft.com/en-us/library/bb969148(VS.85).aspx (both SetProp disable and WM_TABLET_QUERYSYSTEMGESTURESTATUS override) I succeed in stopping windows from treating press-and-hold as a right-click...

What directories do the different Application SpecialFolders point to in WindowsXP and Windows Vista.

Namely I have: Environment.SpecialFolder.ApplicationData Environment.SpecialFolder.CommonApplicationData Environment.SpecialFolder.LocalApplicationData I am unclear as to were these point to in Windows XP and/or Windows Vista. What I found so far is that the ApplicationData points to the ApplicationData Folder for the current user i...