Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
C

Charles Oppermann

@Charles Oppermann
About
Posts
41
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • ShellExecute() launch .CHM and PDF file not work in Window 7
    C Charles Oppermann

    I strongly suspect that COM initialization is at issue here[^]. Earlier, I mentioned that COM has to be initialized as follows:

    CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE)

    This is why I think you're new project works and the old one doesn't. Is your old project using multithreaded COM? If so, the calls might fail. [Just saw your other post that resolves your issue. I'm posting this for other people who might encounter ShellExecute problems.]

    /* Charles Oppermann */ http://weblogs.asp.net/chuckop

    C / C++ / MFC help question c++

  • ShellExecute() launch .CHM and PDF file not work in Window 7
    C Charles Oppermann

    Andraw111 wrote:

    Yes, you are right, ShellExecuteEx() return true or false.
    But still cannot solve my problem.

    Okay, but what is it returning? True or False? If false, did you check GetLastError()? What was it's value?

    /* Charles Oppermann */ http://weblogs.asp.net/chuckop

    C / C++ / MFC help question c++

  • ShellExecute() launch .CHM and PDF file not work in Window 7
    C Charles Oppermann

    You're calling ShellExecute_**Ex**_ but testing the return value for the for SE_ERR_ values? With ShellExecuteEx[^], the return value is true/false and the more information is provided by GetLastError(). For backward compatibility, the SE_ERR_ codes are placed in hInst member of the structure. Try this instead:

    SHELLEXECUTEINFO sei = { sizeof(sei) }; // Will zero out the structure, no need to set NULL on everything
    sei.fMask = SEE_MASK_NOASYNC // Important when you don't have a message loop
    sei.lpFile = FilePath;
    sei.nShow = SW_SHOWMAXIMIZED; // Annoying to force apps to open full screen
    if (false == ShellExecuteEx(&sei))
    {
    // Check GetLastError() here
    }

    /* Charles Oppermann */ http://weblogs.asp.net/chuckop

    C / C++ / MFC help question c++

  • ShellExecute() launch .CHM and PDF file not work in Window 7
    C Charles Oppermann

    Have you initialized COM first? From the remarks section on ShellExecute()[^]:

    CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE)

    Can you use ShellExecuteEx[^]? ShellExecuteEx is preferable in this case because you'll get better result information.

    Andraw111 wrote:

    I try to use system() to launch .CHM or PDF file, it works fine in both Window XP and Window 7, but it has MS-DOS black screen there, how can I let MS-DOS not shown?

    The system() C runtime function would not be appropriate here, as you are a Win32 application. Try this, from a command prompt, type start myfile.chm and report on what happens. Same for Runas.

    /* Charles Oppermann */ http://weblogs.asp.net/chuckop

    C / C++ / MFC help question c++

  • what do you do to block tracking cookies, etc. now ?
    C Charles Oppermann

    Quote:

    I'm just curious what you are using now to block tracking.

    I use IE9's Tracking Protection Lists[^]. I have the following enabled:

    Name Abine
    Address http://www.abine.com/tpl/abinekidsteens.txt

    Name EasyList
    Address http://easylist-msie.adblockplus.org/easylist.tpl

    Name EasyPrivacy
    Address http://easylist-msie.adblockplus.org/easyprivacy.tpl

    Name Fanboy
    Address http://www.fanboy.co.nz/adblock/ie/fanboy-tracking.tpl

    Name Fanboy
    Address http://www.fanboy.co.nz/adblock/ie/fanboy-noele.tpl

    Name Stop Google Tracking
    Address http://ie.microsoft.com/testdrive/Browser/p3p/google.txt

    This way I get the benefits of cookies for keeping credentials around, without the hassle of ads or ad-network tracking. I strongly recommend you do not use the TRUSTe TPL. More Info[^]

    /* Charles Oppermann */ http://weblogs.asp.net/chuckop

    The Lounge com adobe sysadmin tools question

  • Microsoft Surface - it is now a tablet!
    C Charles Oppermann

    Pete O'Hanlon wrote:

    Hmmm. I'd want to compare it to a Retina display before I made any real judgements on that one.

    Speculation is the Windows Pro (Intel) version is "full HD" at 1920x1080 in a 10.6in 16:9 screen. The Windows RT (ARM) version would be 1280x720 in the same size screen. iPad3 is 2048x1536 in a 9.7in diagonal screen, and they claim 264 dots/pixel per inch (dpi/ppi). I haven't done the math, but with an inch more screen and less pixels, the Microsoft Surface tablets are going to be sub-200 DPI range. Even with the improvements in DPI support starting with Windows Vista and continued in Windows 7 and 8, many Windows desktop apps are going to look awful at 150% (144 DPI) and 200% (196 DPI).

    /* Charles Oppermann */

    The Lounge mobile com collaboration question announcement

  • Microsoft Surface - it is now a tablet!
    C Charles Oppermann

    Zune also offered built in FM radio before iPod did.

    /* Charles Oppermann */ http://weblogs.asp.net/chuckop

    The Lounge mobile com collaboration question announcement

  • Thats why i hate c++
    C Charles Oppermann

    Vasily Tserekh wrote:

    yes I know but at least in managed languages you get a nice error message not a blank error messsage, thats why I hate c++

    You "hate" C++ because you don't understand it. To be clear, in .NET languages like C# and VB.NET (and similarly in Java), when there is a unhandled fault, the end user is presented with a exception that includes a stack trace. Generally you would never want a end-user to see a stack-trace. You can get exactly the same thing in C++ if you choose to, but it requires additional work that is done for you in a managed environment. Generally stack traces are available in a debugger.

    /* Charles Oppermann */ http://weblogs.asp.net/chuckop

    The Weird and The Wonderful c++ help learning

  • Is It jus me?
    C Charles Oppermann

    Having used the Zune and then Windows Phone 7 Metro interfaces, and now the Windows [8] Developer Preview since September, I like it a lot. Yeah, I'm biased, but I have also used a Mac OSX for quite a while and found it quite lacking. My Kindle Fire interaction isn't very good either. I much prefer reading email on my WP7 phone than on the Kindle Fire apps.

    /* Charles Oppermann */ http://weblogs.asp.net/chuckop

    The Lounge visual-studio com security question announcement

  • recommend cloud based note taking and task management solution for programmers
    C Charles Oppermann

    I love OneNote and for the last few years keep the notebooks on SkyDrive where I can access and edit them without the desktop client. Now that I have Windows Phone 7.5, the cloud-based nature of OneNote is paying off for me.

    /* Charles Oppermann */ http://weblogs.asp.net/chuckop

    The Lounge hosting cloud collaboration tools

  • Wow! That is fast software...
    C Charles Oppermann

    OriginalGriff wrote:

    Remind me again, just what is it that Office wants 3GB of my hard drive for?

    On my 64-bit machine, I have Microsoft Office Professional 2010 (64-bit edition) installed with the following: Microsoft Office Professional 2010 (64-bit): Access Excel InfoPath Outlook PowerPoint Publisher Word Also includes: Visio Professional 2010 SharePoint Designer 2010 Project Professional 2010 All components EXCEPT the following are installed: Access\Add-ins\Package Wizard InfoPath\.NET Programmability Support\Visual Studio Tools for Applications Outlook\Outlook Templates SharePoint Workspace (formally Groove) That includes: Complete Clip Art Gallery Full proofing for English, French, and Spanish. Optical Character Recognition (default is not to install, but I like it) So, 10 major applications, with three supported languages, with more than the default install. Gotta be more than 3GB, right? Nope, on my machine its 1.18GB in \Program Files plus a few hundred more megabytes in \Program Files\Common Files Sure, there is 1.46GB in \MSOCache, but that’s optional and I can blow it away. I have a 1TB drive, and don’t want to hunt for the installation disks, so I don’t mind spending 1.5% of my space for a cache. Do we really want to get into a discussion about features? I’m a power user and use a lot, but there are many things I don’t use that others find vital – like the legal features that are essential to law firms. If you’re going to bitch about HD space, at least get the numbers right, and then compare how much space it takes up relative to the size of your hard drive. Then consider what that ~1.5GB is doing for you. I took more than 3GB in photograph and video this past weekend.

    /* Charles Oppermann */ http://weblogs.asp.net/chuckop

    The Lounge question tutorial

  • Daylight Savings Time
    C Charles Oppermann

    loyal ginger wrote:

    I don't quite like switching back and forth between standard time and daylight savings time because it makes not much sense to me.

    If I didn't like everything that didn't make sense to me, I'd be very unhappy. Hopefully when you take the time to write about something that you admit you don't understand, you also do a little research into the reasons why it is.

    loyal ginger wrote:

    It also confuses Windows XP on my computer. Today I noticed the "Date Modified" field listed in the Windows Explorer for files on a hard drive (NTFS) all have a 1 hour difference from the "Date Modified" field listed in the Windows Explorer for the same files on a USB flash drive (FAT32). Looks like Microsoft is confused by the time change.

    Microsoft isn't confused any more than COBOL was confused about years with more than 2 digits. FAT has been around a long time (35 years) and always stores the current time. FAT has no knowledge of timezones. NTFS on the otherhand always uses UTC. The operating system knows that NTFS uses UTC and displays the time corrected to local time.

    loyal ginger wrote:

    The files on the USB flash drive were backed up from the hard drive some time in October, at which time they had the same time. Go figure. I expect something similar happen in March next year.

    Nothing "happens". Files written to FAT use local time. A file written to a FAT32 file system at 9am Eastern Daylight Time, will show as 9am regardless of when or where it is.

    /* Charles Oppermann */ http://weblogs.asp.net/chuckop

    The Lounge adobe

  • Odd Windows 7 feature
    C Charles Oppermann

    The feature was added to Windows 7 to help with touch-centric devices (yes, that was a goal of Windows 7). In a touch-centric world on smaller form factors, it's not to focus on one-thing easily. The feature is named "Aero Shake"[^] My favorite Aero feature is the ability to throw windows around the screen, particularly with multiple monitors using WIN+Left/Right/Up/Down Arrow keys. Need to move window to the monitor on the right and maximize it? WIN+Right Arrow, WIN+Right Arrow, WIN+Up Arrow Try it now on a multi-mon setup; repeatly press WIN+Left or Right Arrow. It'll wrap around.

    /* Charles Oppermann */ http://weblogs.asp.net/chuckop

    The Lounge question

  • BIF_RETURNFSANCESTORS in BROWSEINFO - what does it really mean?
    C Charles Oppermann

    Thanks for the info, but I can't reproduce.

    Paul Watt wrote:

    BIF_RETURNFSANCESTORS definitely excludes the root dir, which might be the difference between the two flags, and this flag also excludes the use of certain network shares.

    With these flags, I do get root directories (C:\ for example):

    BIF_RETURNONLYFSDIRS | BIF_NEWDIALOGSTYLE | BIF_UAHINT | BIF_RETURNFSANCESTORS

    Weird, huh? Thanks anyway. I'm not blocked by this problem thankfully.

    /* Charles Oppermann */ http://weblogs.asp.net/chuckop

    Windows API csharp asp-net question

  • All window handle from point
    C Charles Oppermann

    That's what RealChildWindowFromPoint handles.

    /* Charles Oppermann */ http://weblogs.asp.net/chuckop

    C / C++ / MFC question tutorial

  • Combination to avoid: DailyMail + IE9
    C Charles Oppermann

    By default, Internet Explorer 7/8/9 on Windows Vista and Windows 7 runs in the low integrity mode and shouldn't be able to download/execute anything without user interaction. If you've changed your security settings, or turned off Protected Mode, or have a add-in, then maybe. I'm much more suspicious of Flash or another add in. I seriously doubt this is an IE9 problem. What was the name of the executiable that got downloaded?

    /* Charles Oppermann */ http://weblogs.asp.net/chuckop

    The Lounge php com

  • Combination to avoid: DailyMail + IE9
    C Charles Oppermann

    Hang on now. Can you give some more details? What actually got installed. IE9 reputation-based downloads should prevent this and would be considered a major bug if it didn't. I'm very skeptical without more details.

    /* Charles Oppermann */ http://weblogs.asp.net/chuckop

    The Lounge php com

  • How to increate network transfer speed?
    C Charles Oppermann

    So your application is more important than any other and you should be given priority? Consider using QoS services[^]

    /* Charles Oppermann */ http://weblogs.asp.net/chuckop

    C / C++ / MFC sysadmin performance tutorial question

  • GetCharABCWidthsFloat returns different values on XP, Vista and Windows 7
    C Charles Oppermann

    transoft wrote:

    I did not say "I think". I actually tried the function and got the results. I tried on different machine (XP, VISTA, WIN 7). I used exact same configuration. But I got different results.

    But it's not the same configuration - it's a different platform and there is no way it can be the same video drivers. Windows is constantly changing how text is drawn. ClearType, NTDDI, and changes to the fonts themselves mean that there might be different values. Are we talking about large differences in the return values? Maybe as a test, you can write a string, and measure the bounding rectangle and see if it's different on each platform.

    /* Charles Oppermann */ http://weblogs.asp.net/chuckop

    C / C++ / MFC question help

  • All window handle from point
    C Charles Oppermann

    WindowFromPoint, ChildWindowFromPointEx. For windows under windows, you'll have to EnumWindows and do your own hit testing.

    /* Charles Oppermann */ http://weblogs.asp.net/chuckop

    C / C++ / MFC question tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups