Skip to content

The Lounge

For discussing anything related to a software developer's life but is not for programming questions. <b><a href="/Questions/ask.aspx" style="color: rgba(255, 0, 0, 1)">Got a programming question?</a></b><br><br>

This category can be followed from the open social web via the handle the-lounge-ecd8bc40@forum.codeproject.com

3.0k Topics 28.8k Posts
  • DOS

    7
    0 Votes
    7 Posts
    0 Views
    W
    This is Win 98 specific 1. Open up the command prompt and select properties. 2. Go to the Screen Tab. 3. Change the Initial Size to the max which is 50 lines. Now you may not see scroll bars because the command line will be 50 lines long, but if you resize it to only display <50 lines then the scroll bars will appear. Wayne
  • Windowless Applications

    5
    0 Votes
    5 Posts
    0 Views
    S
    You could write a service application
  • A serious VC++ Compiler Bug

    23
    0 Votes
    23 Posts
    0 Views
    L
    Russell, You really are determined to nail Microsoft over this, aren't you! I agree, a warning is probably a good idea (or maybe not - Erik may have a point if there are too many of these warnings in 'real world' code). We now all agree that Microsoft is correct - this is not a bug. It is also probably the only possible choice that Microsoft (or anyone else) can make. The choice to use 'reinterpret_cast' on imcomplete types not really a choice! Since the incomplete type may in fact be resolved in another '.cpp' file, the comiler at the time of compilation of the current compilation unit can NEVER know the 'true' type of the incomplete class. Therefore, a 'static_cast' will be impossible. What you are suggesting is that "if the incomplete class is actually completed further down this compilation unit, then use 'static_cast' (if the types are related) - otherwise use 'reinterpret_cast'". This simply moves the problem into a different set of circumstances. So, this means that (a) Microsoft are allowed to do what they do and (b) the implementation of the 'object Model' (I'll deal with this in a moment) gives them no alternatives. And your compariosn of VC++ to other compilers may be flawed - as far as I know, all compilers may implement this situation as a "reinterpret_cast", but because of their internal object model the effect is the same as a 'static_cast'. As far as the "Object Model/Memory Map' of C++ is concerned, 'other compilers' quite often do use the same model as Microsft have adopted. Stan Lippman points out on page 90 of his book "Inside the C++ Object Model" that the Microsoft model is now generally accepted as being the more common implementation since Multiple Inheritance was added to the language. Prior to that it was more common to place the 'vptr' at the end of an object. This 'new' model gives better efficiency and performance in multiple inheritence situations. As he says, a side effect of this change is 'a loss in C language ineteroperability'. So there's the root of this - a better model to more efficiently handle a 'new' language feature (multiple Inheritence was 'new' in Release 2.0 of C++) also causes a loss of 'C' compatibility. And as I have said, the answer is to avoid mixing the two ways of thinking - classes, inheritence and virtual functions are C++, and the old style casts are 'C'. When you mix them, you can get 'odd' behavior. Don't mix them! Personally, I'd like to see the standard 'ban' old style casts, and force a programmer to use a compiler switch (
  • Curtain falls for Windows 95

    3
    0 Votes
    3 Posts
    0 Views
    D
    Microsoft has stated more than once that 95 is included as a .Net target OS, so I wonder how this jives with dropping support for it. David
  • What's the deal with IE6?

    6
    0 Votes
    6 Posts
    0 Views
    A
    The icon in the statusbar, indicating a security-issue on some websites is very annoying. (Or maybe I'm visiting the wrong sites :)) -- Alex Marbus www.marbus.net But then again, I could be wrong.
  • CPU % by process

    7
    0 Votes
    7 Posts
    0 Views
    A
    Tnx Norm, I'll download and install it at my work tomorrow (since I run WinME @ home). -- Alex Marbus www.marbus.net But then again, I could be wrong.
  • Problems getting VS.NET beta1?

    4
    0 Votes
    4 Posts
    0 Views
    D
    No problem here. I can't remember when exactly I got them, but I can remember it was only about two weeks after I was accepted as a tester. David Wulff dwulff@battleaxesoftware.com
  • Transmeta and Microsoft

    4
    0 Votes
    4 Posts
    0 Views
    P
    which one?! You will find it! in my name. Regards, Paul. Paul Selormey, Bsc (Elect Eng), MSc (Mobile Communication) is currently Windows open source developer in Japan, and open for day job or programming contract anywhere!
  • What happens to DirectX

    5
    0 Votes
    5 Posts
    0 Views
    C
    Just coz they build it, doesn't mean we have to come. Quake is still written in C ( not C++ ). I doubt that many serious gaming houses will take on .Net, why should they ? Christian The content of this post is not necessarily the opinion of my yadda yadda yadda. To understand recursion, we must first understand recursion.
  • .NET Frameworks as C++ classes

    10
    0 Votes
    10 Posts
    0 Views
    P
    >> "I haven't noticed any problems with user interfaces in terms >> of response speed etc, and that's with a beta" Oh I really >> think you must be running your beta on a Cray Supercomputer, >> .Net runs like a pig on my machine (256Mb Ram, AMD950mhz), >> "and its not slow", pull the other one :| Anyway can't arsed >> arguing all day, I have _REAL_ applications to write in >> _REAL_ world, until VS7.0 is officially released and has been >> aired for a while, I wont be touching it, even for beta >> purposes. Dual 933 actually, but my mistake - I meant the user interface of programs made with .NET - not the .NET interface itself - that *is* very slow - and the help is even slower. >> "and less of the WTF" No problem - but less of the quoting out of context. Cheers, Peter Pearson
  • Editing on codeproject.com

    16
    0 Votes
    16 Posts
    0 Views
    L
    > Magazine editors edit, what 6-10 articles a month, and usually only take > submissions from authors who can explain their topics relatively clearly. > Codeproject gets multiple postings per day! That's the answer I expected to hear: sheer volume of posts. I was mostly wondering what the editing paradigm was. From the replies, it seems that Chris is much more averse to "deep" editing than most magazine editors are. There's nothing wrong with that; it's simply a different opinion. I've yet to submit an article to a major magazine that wasn't chopped up pretty well (not only stylistically, but also substantively--one article actually had an entire section added because the editor wanted some more exposition). Every editor I've ever worked with is very honest about this: there's an explanation of why it happens at http://wdj.hightechinfo.com/authors/authedit.html. > Codeproject is also pretty unique in that it allows for the posting of > unedited articles by authors, so that you can see the unvarnished articles > right away which is also really cool I agree--it's a good idea. I read the "unedited articles" section, and I don't expect as high a standard of writing there. > All that being said, I'd like to see an edited article you think is not up > to snuff. I considered doing this at first, but I didn't intend to embarrass the original authors. I certainly don't want to imply that developing writing skills should keep people from writing useful articles! But since it's been requested by multiple people (including Chris!) here are two examples: http://www.codeproject.com/gdi/alphablend.asp [The first sentence sets the tone: "Do you want to cool splash window?"] http://www.codeproject.com/dialog/msgboxdemo.asp [misspellings and incorrect use of hyphens mar an otherwise very good article] I'd feel bad if I didn't also list some very well-written articles as counterexamples: http://www.codeproject.com/gdi/guiowner.asp [actually, I've yet to see an article by Mr. Newcomer that wasn't well-written and enjoyable]. http://www.codeproject.com/shell/shellextguide1.asp [the whole "Complete Idiot's Guide" is an excellent reference. I didn't meant to offend anyone with my statement, and I certainly don't want to imply that CodeProject isn't a valuable resource. Chris's hard work and dedication create a valuable service to the Windows programming community. As to why I didn't provide my name: I currently don't publish much on the web, only in "dead trees". I was concerned
  • const OR NOT const

    14
    0 Votes
    14 Posts
    0 Views
    A
    IMHO the compiler smartly makes an optimization that if your variable is not a l-value then there is no need to read once it has been read at start. So maybe if an register is free this value goes in there and there are no further reads to that variable throuhout the program. This optimization can be disable by preceding any variable with the keyword 'volatile' which turns off this optimization. So const keyword makes clear to the compiler that this variable cannot be a l-value. Using const with member functions is just a checkpoint that none of the member variables are being changed and if some coder tries changing other coder's code by assigning some values to member vars it will be flagged of as an error keeping the orig coder's intentions intact...
  • Meeting

    19
    0 Votes
    19 Posts
    0 Views
    P
    I'm half-Texan by way of my dad. I'm currently living in Georgia. Phil Boyd MCP "I took the road less traveled..."
  • Why does this Curious Code work?

    4
    0 Votes
    4 Posts
    0 Views
    L
    Actually, it is virtual. What this trick is trying to do (to the best of my understanding), is force the compiler to invoke the CWinApp::DoMessageBox virtual function directly instead of through the nonexistent v-table (NULL pointer).
  • OOP: part of discipline, science or art?

    6
    0 Votes
    6 Posts
    0 Views
    L
    "p.s. Is this software engineering forum or f* Woodstock? And what kind of stuff are you on?" rofl --- "every year we invent better idiot proof systems and every year they invent better idiots"
  • OOP principle wrong?

    36
    0 Votes
    36 Posts
    0 Views
    E
    Bjarne does in fact discourage the use of protected data, but he didn't always feel that way or he wouldn't have made protected data in the first place. Further, C++ isn't truly an OO language. It's a hybrid and doesn't offer certain things you might expect from a "true" OO language such as SmallTalk. Many things in C++ are not objects in their own right, such as POD's (Plain Old Data). An int isn't an object in C++. Technically, using C++ at all isn't doing OOP if you want to be technical, but in reality we can say that C++ offers a good deal of OOP in a realistic way. OOP talks of sending messages beteween objects, which C++ doesn't really offer, though calling member functions is about the next best thing. Windows does offer a form of message passing, but C++ itself doesn't. It's quite silly to get all defensive about "not doing oop" in C++ when the language itself is not really OOP even when using it in the way intended by its creator. It's all a hybrid, and where one draws the line is largely a subjective judgement by those using it. As i've said. I see nothing wrong with accessing members directly that are const or effectively const. This doesn't violate encapsulation in any form because the members cannot be calculated or changed. I also don't see how they can violate OOP since even calling getters and setters violates OOP in it's purest form.
  • Oh man... "fake" Microsoft Digital Certificates floating around...

    7
    0 Votes
    7 Posts
    0 Views
    A
    IE on itself isn't the problem, those ActiveX controls are. Ofcourse it's cool to view any type of document (Word/xl/powerpoint/pdf etc) in your browser, but that also means you can't be sure about your security anymore; it's in the hands of third parties. Makes me wonder, is it possible to do something with a filesystem in a PDF (like deleting or renaming files?) -- Alex Marbus www.marbus.net
  • OOP??

    13
    0 Votes
    13 Posts
    0 Views
    D
    >Very useful if the application you are working on has 2 million >lines of code and 40 or more developers in 3 continents. In any case size should not matter. "There are no small projects - just young projects." Huffs Law ;)
  • VS6 Service Pack 5 CD

    2
    0 Votes
    2 Posts
    0 Views
    N
    I've seen that label on previous service packs. I guess they just want to make sure you have all the fixes in your applications. Nick Carruthers
  • How's this for OOP?

    10
    0 Votes
    10 Posts
    0 Views
    L
    I hate to get picky (but I will anyway!), but this simple example reveals a VERY common theoretical issue in C and C++ code - "width" is a mesurement of a physical attribute - it cannot be negative in any valid sense, so 'int' is a poor choice as either the internal or public representation. It should be unsigned. Always. Without exception. This problem occurs again and again in C and C++ code because the compiler will cheerfully (and sometimes very unexpectedly) convert between signed and unsigned. So programmers don't worry too much about it, and 'unsigned int' takes longer to type! So, we have dates stored as ints (what exactly does a negative day represent?), and everything else as well. And (just to add a final point) this leads to another 'common' practice - using '-1' ot indicate 'not valid'. That's just being sloppy.