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

Sir Gras of Berger

@Sir Gras of Berger
About
Posts
12
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Microsoft prohibits free software tools for software development
    S Sir Gras of Berger

    I think they're doing a little more than CYA, I think they're doing FUD. The explanation of "potentially viral software" seems to be at odds with the prohibition from using potentially viral development tools -- how could compiling with gcc, for example, possibly create or purport to make licensing obligations on MS's part. Maybe compiling with gcc is ok, but the license is written in a way to make that unclear.

    The Lounge python perl com linux tools

  • Crash launches VC debugger
    S Sir Gras of Berger

    That's "just in time" debugging and there's a checkbox for it on Debug tab of the Tools - Options dialog.

    The Lounge csharp visual-studio debugging help question

  • .Why C++ Programmers hate VB
    S Sir Gras of Berger
    1. The language encourages poor program design.

    That about sums it up for me. Most of the stuff mentioned in this thread doesn't bother me at all, VB is a different tool for different problems. If you need to care about object lifetimes, or have multiple threads, etc., you just shouldn't be using VB.

    The encouragement of bad design, on the other hand, is unnecessary and evil. You shouldn't have to go out of your way to write logically organized and maintainable code. With VB, you do.

    The Lounge c++ regex question

  • DLL Function Prototypes
    S Sir Gras of Berger

    OLEView itself is a VC Sample.

    The Lounge question

  • Wrapping text within a CListBox
    S Sir Gras of Berger

    The easiest way I can think of is to make it an owner-draw list box (LBS_OWNERDRAWVARIBLE). In MeasureItem(), create a compatible DC and use DrawText() with a rectangle the proper width, but the maximum height you think you'll need. If I read the docs correctly, DrawText() should return the height needed to draw the text. In DrawItem(), use DrawText() with the actual DC to wrap the text inside the available rectangle. In both cases, you should probably select the windows font into the DC before drawing, and restore it afterward. Unfortunately, you're going to have to do all the text/background color management yourself too, not to mention the focus rectangle.

    The Lounge c++ help question

  • Help de-activating system menu in window
    S Sir Gras of Berger

    IMHO, stuff that needs to be running 24h a day shouldn't be in a UI thread at all. (It probably shouldn't even be in a process that has a UI thread, but in a service.) So put that stuff in a background thread and leave the UI thread to do UI processing only. If you can't because the messages you need to process are real windows messages (and you can't change that), process them with a different, hidden window -- which you could put in a different UI thread, though I'm not sure that's necessary. If you take the approach that you want to detect a stalled situation and terminate it, you have to make sure you identify all possible stall situations ahead of time. You've identified one already, and even if there aren't any others now, you or someone else might add one in the future. By using a different thread and/or window, you're more likely to be able to handle all possible stall situations without failing to process the incoming messages. The UI will get out of sync with data perhaps, but the messages will still be processed.

    C / C++ / MFC help question

  • VTable placement...
    S Sir Gras of Berger

    I think the vtable commonly goes at the start of the structure. You can't really put the vtable at the end. Take class A and class B derived from A with more member variables. A pointer to a B object has to be a valid pointer to an A object, but if the vtable is at the end, it can't be. The A pointer would have no way of knowing where the vtable of a derived class would be. Putting the vtable at the beginning, it stays in the same place.

    The Lounge c++ performance tutorial question discussion

  • Chris: No more Anonymous Posting!
    S Sir Gras of Berger

    "Besides, I'd rather spend my time planning CodeProject.NET so that we can all have a better time" I don't quite understand how codeproject.net is going to improve my life any, but I haven't bought into .NET (though SOAP sounds appealling) and I AM a Slashdot participant, so I'm obviously biased ;). But please, consideration moderation. It works well on Slashdot. Not perfectly, but well. I'm not sure how central a part of CodeProject the user comments and forums are, but I don't think there is anything that could improve user comments/forums more than than some sort of moderation. In fact, I admit it, I'm skeptical that "codeproject.NET" would offer more benefit and/or less complexity than a moderation system. Why let the "noisy people hiding in the shadows" have their 15 minutes at your expense when there are demonstrably effective ways of reducing their 15 minutes to 5 seconds?

    The Lounge com question

  • Chris: No more Anonymous Posting!
    S Sir Gras of Berger

    Oops. For example, my post would be modded down as redundant.

    The Lounge com question

  • Chris: No more Anonymous Posting!
    S Sir Gras of Berger

    Sites like slashdot deal with this using moderation. You can read all about Slashdot's moderation at http://www.slashdot.org/faq/index.shtml. Users are occasionally selected randomly to moderate messages by giving or taking points from them. Everybody (moderating or not) sets the minimum rating of messages they want to see, so flamebait, off-topic messages, etc. get "modded down" below the threshold that most people see. (New users and users who get modded down alot don't get to moderate). Oh yeah, anonymous posts start at 0, registered users start at 1. Codeproject could just convert to Slashcode (open source Perl scripts - just kidding) or implement the same features in whatever ASP code is used here.

    The Lounge com question

  • Wireless LANs
    S Sir Gras of Berger

    I've currently got a Proxim Symphony WLAN at home. I've used Proxim stuff at work and found it reliable and well supported, and since I was using the WLAN partially as an excuse to learn some Linux setup stuff at home, I figured I go with a known quantity for the wireless component. It works well, I've got a Pentium running Slackware which acts as a DSL gateway with IP masquerading (aka NAT), as well as a firewall and Samba server for internal use -- I know, I really shouldn't have Samba and a firewall on the same box, but its secured pretty well, and I just don't think I'm that prime a target, except maybe as a zombie where Samba doesn't matter anyway. Everything works well (except for one, documented but unresolved W98 annoyance). Even though I've got two subnets, everybody can talk to everybody else. Best of all, my wife, who was skeptical at first, finds the wireless connection genuinely nice to have. One warning: This may be just a fluke, but within a month of getting the laptop, it fell (just a foot or two to the floor) in such a way that the Symphony card and its plastic attenna transferred all the impact to the inside of the machine where it damage the motherboard. Ouch$! I've now got a detachable attenna that won't do that, and if I could find an 802.11b card with a detachable antenna, I'd probably upgrade right away. Even so, the DLink prices are so appealing, I might anyway. sorry, i don't have a sig

    The Lounge question lounge workspace

  • Wierd
    S Sir Gras of Berger

    I think W2k has some new (and documented) alpha channel transparency features. The menus may be using this.

    The Lounge csharp visual-studio beta-testing json
  • Login

  • Don't have an account? Register

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