use the windows shell: ShellFileExecute
Scott H Settlemier
Posts
-
How to start a file's application in C++ -
Can't prevent new window opening!handle OnBeforeNavigate2, cancel the navigation if it's to another window, and navigate to the url just cancelled... something like that.
-
SetForegroundWindow failsThe old way was to use AttachThreadInput-- (there's a hefty list of under just what conditions SetForegroundWindow will work) search for that in the Message Boards. The new way to use MS's settlement API: SwitchToThisWindow http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/windows/windowreference/windowfunctions/switchtothiswindow.asp[^]
-
Some views or ideas required....the shadow is the intersection of the plane of the paper and the cone whose apex is at the light and whose sides are tangent to the sphere. The distance from apex (light) to center of sphere is the hypotenuse of a triangle whose side opposite the apex angle is the radius of the sphere. This is enough to determine the cone.
-
Fast work: OVERLAPPED vs MEMORY MAPPEDIt's a generic class for all instances of work that's i/o bound. Specific uses are filters and hashes which take a score or so of cycles per byte of data. (much less than time to read the data) I'm allocating the buffers on the stack and using overlapped i/o but wasn't sure if the operating system was actually able to asynchronously read the data or if just spawned another thread to do it. If it's just another thread, for a single processor, it'd seem better to just use a memory mapped file right? No overhead for the wait operations and processor is fully tied up reading (on each page fault) or processing. If overlapped i/o really is asynchronous on a single processor, then what I've got now should be optimal. Also I wonder, if the OS has the capability for real asynchronous reads on a single processor, would it be using that to help page in from a memory mapped file? Maybe the memory mapped file can match the overlapped i/o technique because the os is smart? (opened with sequential access for clue? I doubt but wonder.) (yeah buffer sizes are calculated for optimal size-- you have to pass working block size, processing cost and wait cost (about 10K cycles I found from experiments on XP) for the overlapped i/o-- it can be shown that optimal # of rounds is independent of read cost assuming that it's greater than processing cost.) Thanks!
-
Skipping Bytes When Reading Filesfseek
-
Fast work: OVERLAPPED vs MEMORY MAPPEDFor an i/o bound processing job, which would be faster: 1) Memory map the file and process it in place 2) Use overlapped I/O, reading into one of 2 buffers, while processing the other (pipelined) On a single cpu, would I get any benefit from #2? On a dual cpu, does #1 get no improvement over that on a single cpu? Thanks.
-
WaitForMultipleObjects( ) and thread objectwhen a thread in the handle array becomes signalled and the wait satisfied, handle the case and then remove that handle from the array (dec. the count, shift over remaining handles as required..) That handle will remain valid and signalled until you call CloseHandle on it, so you must remove it from the wait.
-
C++ related issueThe magic words you are looking for are "virtual inheritance[^]."
-
Problem with threadSleep(0) is perfect here. You can be nice to the system by simply using your time slice to make *one* check of the flag and then turning over control to another thread. Although typically I would argue against using a flag and using an appropriate synchronization object instead.
-
access JS vars on page in web browser control?I've got a web browser control. It loads a page. The page has some javascript. In particular, one variable, an array is defined there. I want it. any ideas on how to get it?
-
Kids and coffeeTea: ever since I recall. (grandparents would push it, parents'd just provide it.) (caffeinated) Coffee: hated it until addicted to espresso in univ. My son'll have nothing to do with either of them.
-
How to supply a generated image to a HTML page in a CHtmlViewI think that might be supported as an mhtml document. I'm not sure how far the support for such has yet gotten.
-
EverclearAh, I miss the old days at the Mt. Tabor Theatre pub.
-
MS Cert.-or bustWheeee! I am unemployed. A colleague and I have gotten the MCAD self-paced training kit book from MS Press and will take the 70-316 course to create that uber drool C# resume fodder. Any hints this way? Myself, I would like to venture more into the Unix woods with Qt, or maybe some OpenGL work on OpenSource using vtk and etc. Weather graphics would make me really happy. But I will take what is offered. Anyone got some best practices for getting technical programming jobs?
-
Looking for a VC++ Sample for Wake up on LAN (WOL)?Here's a short program [^]for doing this on linux. (discussed here[^]) It should be easy to port.
-
paint a DCremember, a dc is not a surface, but the means of accessing one. If you create a memory dc, it is created with a default 1x1 monochrome surface. (If I recall) What you need to do is create a bitmap (the surface) and select it into the memory dc. Then you can paint on that surface using the memory dc and finally blit from the bitmap (using the memory dc) to the display surface (using the window dc)
-
will GPS still work?I think that Selective Availability has been turned off.. http://www.ngs.noaa.gov/FGCS/info/sans_SA/docs/statement.html[^]
-
Windows 2000 DDKI couldn't find anything either and ordered the DDK a couple weeks ago. Had to pay shipping only and it arrived a few days ago. Once they finally shipped the order it took only a day to arrive. (but it took them awhile to ship the order. I kept getting notices with estimated shipping dates long off.)
-
OnInitDialog and 'return TRUE'yep