windows-7

Create child Window of another process's HWND? (e.g. screensaver preview)

霸气de小男生 提交于 2019-12-11 02:39:10
问题 I'm writing a screensaver in Java. It's primarily for Windows, though I'd prefer it to be as portable as practical. According to http://support.microsoft.com/kb/182383, when a screensaver is invoked with command line args /p HWND , the screensaver should "Preview Screen Saver as child of window ." Presumably this is how screensavers should their little preview in the Screen Saver Settings dialog. So how, in Java, do you create a JFrame or JComponent that's a child of a window that belongs to

Force ofstream file flush on Windows

纵饮孤独 提交于 2019-12-11 02:36:16
问题 I'm using an ofstream to write data to a file. I regularly call flush on the file but the backing file doesn't always get updated at that time. I assume this is related to an OS-level cache, or something inside the MSVC libraries. I need a way to have the data properly flush at that point. Preferably written to disc, but at least enough such that a copy operation from another program would see all data up to the flush point. What API can I use to do this? 回答1: FlushFileBuffers will flush the

Batch rename pc by prepending the current pc name

为君一笑 提交于 2019-12-11 02:24:06
问题 Background: I am migrating several thousand computers from xp to 7 as a sub-contractor. The computers are on a domain. We have admin rights to add, modify and delete computers from the domain. When we first approach a xp machine, we have to add "delete" in front of the name and rename it (example: old name "pc12345" new name "deletepc12345"). I am working on a batch file that will help with this process, but I am running into some trouble. Script: @echo off SET /P PCNAME=delete%computername%

Windows 7 64 / Visual Studio 2008 / OpenCV2.1 error: “The application was unable to start correctly (0xhex)..”

给你一囗甜甜゛ 提交于 2019-12-11 02:04:09
问题 I'm building OpenCV2.1 from top of branch in 64 bit mode, when I link the libraries against my code (that works in 32 bit mode on XP), I get the dialog: "The application was unable to start correctly (0xc0150002) Click OK to close the application" When I start the application. The event viewer is pointing at one of the OpenCV dll's & says it's a Side-by-Side error, but I'm definitely building OpenCV & my code as a 64 bit compile, and there are no errors during that process. I've tried

CMD file - delayed variable expansion

[亡魂溺海] 提交于 2019-12-11 01:57:51
问题 I am writing a CMD/batch file (running under Win-7 cmd.exe) and I seem to be getting hung up on delayed variable expansion. I am using text file input that is in the form: 9 .CN=ISRJX.OU=Linc.OU=thisco.O=UCOM.T=UCOM. 8-20-13 10 .CN=FXXLISHER.OU=Linc.OU=thisco.O=UCOM.T=UCOM. 10-13-13 11 .CN=QXX004F.OU=Linc.OU=thisco.O=UCOM.T=UCOM. 10-14-13 12 *.CN=QXX1001OB.OU=Linc.OU=thisco.O=UCOM.T=UCOM. 10-15-13 as contents in "inputfile.txt". Purpose is to extract the first word after ".CN=", at this point

error “\.. was unexpected at this time”

て烟熏妆下的殇ゞ 提交于 2019-12-11 01:57:04
问题 I have created a .reg with this to add a Delete empty folders command in my context menu. When I right click on a folder, this should delete its empty child folders. I have the "Delete empty folders" in my context menu but when I select this, a cmd windows open and I get this error: .. was unexpected at this time. Any idea why? Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Directory\shell\Delete empty folders] [HKEY_CLASSES_ROOT\Directory\shell\Delete empty folders\Command] @="cmd

Mapping “jj” to <ESC> causes cursor to try to jump forward

谁说胖子不能爱 提交于 2019-12-11 01:45:09
问题 I have begun debugging my .vimrc file after migrating to windows (see related question here). In Ubuntu, I mapped the jj key combination to ESC like so inoremap jj <Esc> Although pressing jj does help get me out of insert mode, it tries to seek forward 10 or 15 characters (I haven't actually counted). Here are some other things that may be relevant, ; enters command mode but q; does not give me the command mode history, I have to type q: I have mapped SHIFT + J ( <S-J> ) to previous buffer

Error in Java : java.io.FileNotFoundException: C:\Users\FSSD\Desktop\My Test (Access is denied)

和自甴很熟 提交于 2019-12-11 01:34:30
问题 I have a java code for copy file from one folder to another folder. I used the following code (I used Windows 7 operating system), CopyingFolder.java import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.nio.channels.FileChannel; public class CopyingFolder { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub File infile=new File("C:\\Users\\FSSD\\Desktop\\My Test"); File

IIS 7 Welcome Page not showing

♀尐吖头ヾ 提交于 2019-12-11 01:34:25
问题 O/S: Windows 7 ,Home Premium I have just installed IIS manager Express from Web platform installer and Turned on the IIS7 feature from the Program Feature in control panel. Q) I was playing with IIS Manager (inetmgr) I was able to view the Welcome page on typing localhost but after adding some sites and deleting them I'm unable to see any site hosted on IIS and even can't see Welcome page of IIS Note: I was assuming IIS switched off ,but its running Services.msc from start menu > run Progress

Windows 7/Vista process management - how to start an external program after long idle time?

强颜欢笑 提交于 2019-12-11 01:33:00
问题 This is a follow-up to that question. Basically, i have a python script which should start another program (.exe) via a timer after some 2-6 hours. Everything works fine as long as i test it with a short countdown or as long as the computer is "active" (=userinput before, screen on) before the timer expires or as long there is no other program working at the same time (an Excel VBA script in my case). On Windows 7, for long countdowns and with Excel running, the external program just doesnt