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
S

Sean McKinnon

@Sean McKinnon
About
Posts
13
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • The Good Doctor passes on
    S Sean McKinnon

    The cover of the "final" issue is from January 2009, yet I am holding the February 2009 issue in my hand (yes, I am typing one-handed to make a point). The issue is quite thin (as have been most recent ones), but it looks like they are still publishing...

    The Lounge help html com tools question

  • Install Files...
    S Sean McKinnon

    me too! Advanced Installer is 1/4 the price of InstallShield and Wise, is easy to use, and pretty powerful. We haven't regretted the decision to buy it. - Sean

    The Lounge csharp question

  • Your Second Life?
    S Sean McKinnon

    ednrgc wrote:

    Did you miss the joke icon?

    Yup! That's way too subtle for this early in the morning after an hour's commute on icy roads... Cheers - Sean

    The Lounge question csharp wpf com graphics

  • Your Second Life?
    S Sean McKinnon

    5 million Japanese yen = 42 251.1408 U.S. dollars (from Google)

    The Lounge question csharp wpf com graphics

  • hide or remove toolbar buttons?
    S Sean McKinnon

    Okay, finally got it. When populating the customize dialog, there are messages handled by OnGetButtonInfo. In the handler, I can test for the "forbidden" command ID's, and set the button state to TBSTATE_HIDDEN for those buttons. Now the buttons don't even show up in the available list. Thanks again (and sorry for being such a dutz!) Cheers - Sean

    C / C++ / MFC graphics help question learning

  • hide or remove toolbar buttons?
    S Sean McKinnon

    Well, not quite. DeleteButton (with index) does delete the button from the toolbar, so it no longer shows up in the right-side list of the customize dialog (like it did when the button was hidden), but it DOES still appear in the left-side (available list). Doh! Is there another way to delete/remove the button from the CToolBarCtrl after it has been loaded from the resource? Thanks again, Sean

    C / C++ / MFC graphics help question learning

  • hide or remove toolbar buttons?
    S Sean McKinnon

    cmk wrote: you will have to manually add/delete buttons after you create the toolbar from the resource Ah Ha! Yes, this is what I had been trying to do, but DeleteButton didn't appear to work for me. I went back to try again, and I now realize my mistake. HideButton takes a command ID to hide, but DeleteButton takes an index (which you have to get by using CommandToIndex). I had been calling DeleteButton with a command ID. Now I can delete the unnecessary buttons at startup, once I've determined the configuration I need. I knew there had to be an easy answer. Thanks very much for your help! Cheers - Sean

    C / C++ / MFC graphics help question learning

  • hide or remove toolbar buttons?
    S Sean McKinnon

    Thanks for the reply! I am using MFC, and the HideButton method works for hiding buttons on the Toolbar in the MainFrame, but does not work when showing the customization dialog. When the customization dialog is shown, hidden buttons ARE shown in the right-hand list (populated buttons), but are shown with grey text (indicating they are hidden/disabled). ALL buttons not already in the toolbar are shown in the left-hand list (available buttons). I need to be able to prevent buttons in the toolbar resource from showing up in both the available and populated button lists on the customize dialog. (i.e. make it look like the button does not exist at all). During the building of the customization dialog lists, there are messages sent that query whether a button should be included, but if you indicate that it should not, then the process stops right there, and no more queries are sent for buttons that follow that one in the resource. (i.e. the first time you say "No" to a button, it aborts the queries for any remaining buttons). I thought there might be a way to either respond differently to the message, respond to a different message that I am unaware of, or get access to the dialog lists and manually remove the unwanted items before the dialog is displayed. Thanks again, Sean

    C / C++ / MFC graphics help question learning

  • hide or remove toolbar buttons?
    S Sean McKinnon

    DavidCrow wrote: Wouldn't it be easier to just enable/diasble the buttons? If not, then you'll probably need to create multiple toolbars (one for each situation). Yes, it would be easier, and I do that in other circumstances. My problem is that I have a single application that talks (serial or ethernet) to several different versions/types of hardware. The application automatically configures itself to the capabilities and resources of the attached hardware. (It is a user-interface for status monitoring and configuation of the hardware). The application has always removed menu items for features that the attached hardware cannot support, and disabled menu items for features that the hardware could support, but that are not currently enabled. This works fine for menu items. The toolbar used to be fixed (and only included items that were supported on all hardware platforms). Now, we've added customizable toolbars, so I now have buttons for features that may not be supported on various hardware platforms. I can (and do) still disable toolbar buttons for features that are supported but not enabled (and I also do this for toolbar buttons for features that are not supported at all, but would really prefer to hide/remove these buttons like I do for menu items). Creating multiple toolbars for all the possible configurations would be a nightmare for sure. I guess this isn't as easy as I had hoped for? Thanks - Sean

    C / C++ / MFC graphics help question learning

  • hide or remove toolbar buttons?
    S Sean McKinnon

    I'm sure there is something simple and obvious that I am missing here, maybe somebody can help me? I have a toolbar that gets initialized from a toolbar resource (one big bitmap with all images in it). The toolbar is customizable (using standard dialog), so that when the dialog is displayed, you get a list of all the buttons available on the left, and a list of all the buttons currently on the toolbar on the right. The buttons on the left and right together are all of the buttons available in the toolbar resource bitmap. In some cases, I would like to exclude some buttons in the toolbar resource bitmap from being displayed as available (i.e. remove them from the left list). When the list is populated, you get messages that let you say whether the button is available, but the first time you say no, it stops asking about the remaining buttons. Like I said, there must be something simple I am missing. Thanks for you help! - Sean

    C / C++ / MFC graphics help question learning

  • compacting a database on-the-fly
    S Sean McKinnon

    This is a Visual C++ app, using a CDaoDatabase (and the Jet engine). My current solution is to check the database size at startup, and prompt the user to see if they want to perform a compaction if the database is larger than a certain threshold. The user is also prompted to shut down other applications which may be accessing the database. The problem with this solution, is that it forces the user to periodically shut down and re-start the application (as well as other applications). To do the compaction, I use the CDaoWorkspace static member function CompactDatabase. This works, but I wish there was a better solution. Thanks - Sean

    C / C++ / MFC database question

  • compacting a database on-the-fly
    S Sean McKinnon

    Hi All, When you delete records from tables in a .MDB database file, the record space is marked as available, but is not removed from the file. So the file size grows over time. As near as I can tell, the only way to reclaim that space is to compact the database. It would be really nice if the "available" space could be re-used by new records, but it doesn't look like this can happen. It would also be nice if you could compact just a single table in the database, but again, it looks like you have to do the whole .MDB file. To compact a database, you must have exclusive access to it, and it must be closed (so how do you tell other applications to drop their connections to it?). The database file must be compacted to a temporary file, and then the original deleted, and the temp file renamed. This is a major pain when you have an application that is running ALL the time (and also when there are other apps also accessing the .MDB file). Does anybody know of a way to reclaim the "available" space in a .MDB file, either by have the space be re-used for new records, by compacting only a table within the database, or by being able to compact the database without having to shut EVERYTHING down? Thanks VERY much! - Sean

    C / C++ / MFC database question

  • Recommend debugger (i.e. BoundsChecker, etc...)?
    S Sean McKinnon

    Hi All, I am considering getting a Windows debug tool such as BoundsChecker (the only such program that I am even a little familiar with). I am looking for opinions on the usefulness of these tools, and specific recommendations for products. Who are BoundsChecker's competitors? I seem to recall a tool called Purify, but can' really think of much else. It seems like the market for these tools is diminishing (there aren't even any adds for debuggers in recent issues of MSDN magazine). Is this because the debugger in Visual Studio is good enough? Any opinions and advice will be greatly appreciated. Thanks very much, Sean

    C / C++ / MFC debugging csharp visual-studio tools question
  • Login

  • Don't have an account? Register

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