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
A

armentage

@armentage
About
Posts
30
Topics
7
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Whining
    A armentage

    Yah, what's with the slowness lately? The site's getting close to unusable lately. Didn't we just get a big server upgrade? And we pay for access by ways of advertisements. The site is covered with adds (that take time to load) and "sponsored" links which are nothing more than ads for products disguised as articles. Honestly, the overall quality of CP has gone way down in recent months, especially the C++ sections. The raw C++ articles still continue to be worthy, but the Win32/MFC specific articles are degenerating into mindless drivel.

    The Lounge mobile com question discussion announcement

  • Loading OEM Icon's into a Dialog Template
    A armentage

    Is there any way to use the standard Windows OEM icons in a Dialog Template resource? I'm using VC++6.0. When I add an Icon to a dialog, the dialog editor wants a path name to .ico file. I'd want to use the built in IDI_EXCLAMATION here (it's an alert dialog), rather than supply my own .ico file. You can load this icon by doing ::LoadIcon(0, IDI_EXCLAMATION), but there doesn't seem to be anyway to do this with the resource editor.

    C / C++ / MFC c++ question learning

  • Clearcase Users
    A armentage

    My company uses Clearcase and VC6 to develop a large application, with thousands of .h/.cpp files, all under source control. My workspace loads up 15 seperate projects, which each contain as many as a hundred seperate source-controlled elements. The thing is, workspaces open up SLOW. VC6 loads the actual workspace & projects up very quickly, but then stops for up to 10 minutes "Updating Source Control Status". I know Clearcase can, be slow, but this is too much. Does anyone have any advice on how to speed things up? It seems that VC6 is checking the checked-in/out status of each file individually, blocking the whole app until it is done with the thousands of files I work with. Is there anything I can do make this process go on in the background, or surpress it altogether? I would appreciate any insights or comments.

    C / C++ / MFC c++ performance tutorial question workspace

  • Using WTL controls in an MFC app
    A armentage

    Thanks for the explicit examples! There are so many hot (trendy?) WTL controls out there that I'd love to use in my apps, but getting the code to compile together has always been a bottle neck.

    ATL / WTL / STL c++ tutorial question

  • Using WTL controls in an MFC app
    A armentage

    aha, CodeProject to the rescue. http://www.codeproject.com/wtl/mix_wtl_mfc.asp Apparently there are some #define's you can set to cause WTL to not define symbols that will clash with MFC (which puts everything in the global namespace)

    ATL / WTL / STL c++ tutorial question

  • Using WTL controls in an MFC app
    A armentage

    I've been trying to use WTL controls in my large MFC based project. I've got the WTL7 libraries installed on my VC6 system. I can compile the WTL ctrl's sample code just fine, but when I try using it with MFC code, I'm getting all sorts of namespace collisions. CEdit, CButton, etc. Can WTL and MFC code be intermingled? Does anyone have an example of how to do this? I'm guessing careful use of "using ... { ... }" is the key, or being more explicit with class names.

    ATL / WTL / STL c++ tutorial question

  • Platform SDK on VC6
    A armentage

    Can someone please post the lines I need to add to my INCLUDE & LIB paths to use the latest Platform SDK's with VC6? I've been trying to use the "Setup Environment" programs that comes with the SDK, to no avail. I can neither get the paths into my VC6 options-directories nor my environment. My attempts at setting these directories by hand have just left me with tons of build errors. Mostly "operator new does not take 3 parameters".

    C / C++ / MFC workspace question

  • UI Design Discussions
    A armentage

    The best reference I know on the topic is About Face 2.0 The Essentials of Interaction Design by Alan Cooper & Robert Reimann. It's not just an interesting read, it's vital. I think every developer out there should read it. The book touches on the basic tennents of what good software should do, and describes some interesting new UI designs for old concepts For example: Calendar controls that break away from the physical constraints of real-world paper calendars, and display the days/weeks of the year in a more natural flowing format. Unique controls that aim at solving just ONE problem very, very effectively. We usually use Comboboxes, Edits, and Pushbuttons to solve EVERYTHING. Imagine a custom control for indicating hotel vacancies, that started with a map of each floor and displayed numbers & icons in each room to indicate its occupancy state. Sometimes its better to get low-level and come up with something completely new, and then maybe add it to your repetoire of controls. I'm looking for a forum where I can ask "how can I do THIS?" and people respond "Well I once tried this". Maybe a FAQ or compendium of these solutions, refined and retried over time.

    C / C++ / MFC design c++ graphics tutorial question

  • UI Design Discussions
    A armentage

    A little off-topic here-- Does anyone know of any good message boards (EZboards, webforums, whatever) that host active discussions on User Interface Design? I don't mean MFC, QT, VC++, etc, but the actual interaction design of a program. Interaction Design addresses these sorts of topics: What sort of controls to use for capture certain types of data Where to layout controls in your window How to use colors & graphics Disscecting simular interactions (on different data) into common UI paradigms. I'm looking for a board where neither the programming language nor UI toolkit are important, but rather what it is you want your program to do.

    C / C++ / MFC design c++ graphics tutorial question

  • Monthly payment
    A armentage

    You really want to consider Cout'ing pay, apb, and intpd AFTER YOU HAVE CALCULATED THEM.

    C / C++ / MFC help question learning

  • dialog scroll bars!!!
    A armentage

    Dialog with scroll bars are BAD.

    C / C++ / MFC tutorial question

  • fault on delete[ ] ?
    A armentage

    Brian Hart wrote: I discovered this goes away when I set the size of the array to size + 1; i.e. delete[] sometimes faults because the debug version of things told me that I was having buffer overruns. Setting the array size to size + n where n is some arbitary number gives the computer a 'buffer' to work with to protect agsinst overruns. What you're describing here is a sever programming error. You're going past the end of your allocated 'arr' somewhere, and corrupting your stack. Your 'buffer' is just hiding the problem. You really should take a close look at your code, and figure out what's going wrong. You probablu have an array bounds problem. I would bet you're not even performing your calculation correctly. What you've said about "protecting against buffer overruns" is complete nonsense.

    C / C++ / MFC csharp visual-studio game-dev help question

  • fault on delete[ ] ?
    A armentage

    Brian Hart wrote: if (arr != NULL) { delete[] arr; arr = NULL; } delete is smarter than the C free() function and does the right thing (which is to do nothing at all!) when you delete a pointer that is NULL (or 0). Ofcourse, still want to set your pointer to 0 when you are done.

    C / C++ / MFC csharp visual-studio game-dev help question

  • Loginging into a Domain?
    A armentage

    Well, so far the best bit information I've found is the SSPI Authentication Sample on MSDN. SSPI lets me take a username, password, and domain, and see if its valid. It does all the work finding & contacting the domain servers. I haven't been able to 'store' a successful login, or find any sort of standard dialog for handling the login, but for the moment this SSPI function is enough. One thing I am having trouble with though, is getting the current domain on Win98. There is the LookupAccountName API function, which is not supported on Win9x. I just need to know which domain the user has logged into. Google searches aren't turning up much, other than affirmation hat LookAccountName sucks.

    C / C++ / MFC sysadmin xml visual-studio wcf security

  • - Screen Resolution -
    A armentage

    Greg S. wrote: int x = GetSystemMetrics(SM_CXSCREEN) int y = GetSystemMetrics(SM_CYSCREEN) This might only give you the resolution of ONE screen, not your whole desktop.

    C / C++ / MFC question

  • - Screen Resolution -
    A armentage

    hwnd desktop = GetDesktopWindow(VOID); RECT myrect; GetWindowRect(desktop, &myrect); This will load 'myrect' with the size of the desktop window. I'm not sure how it will behave on a multi-screen setup. You might get the size of the first display's desktop only, or maybe the size of the ENTIRE desktop. There are some functions to enumerate the actual displays, but I don't remember any of the details.

    C / C++ / MFC question

  • Loginging into a Domain?
    A armentage

    At my company, we've got a client/server that requires user-names for security reasons. Some users can access more data than others. It runs on our company LAN, and is only used in-house. We use raw TCP/IP to do all of our communication (no SOAP or fancy XML stuff). We've got a complex network with several domains and centrally administered user accounts, so we thought functions like GetUserName() are enough to know who we're dealing with (the app sends the name over with each request). Turns out we were wrong. We have many users who go home and use Cisco VPN to run our app. Many of them run Windows98/ME, or XP without logging into our company domain. They'll have usernames like "Frank" instead of "FPrisco", and worse, they can make up any user name they want and pretend to be anyone. I've looked into the Win32 security apis, and my god they are complicated. What we want to do is avoid jostling local users who have legitamately logged into the PC, vs people who are using non-authenticated logins on crappy OSes. I have two specific questions: 1) There do not seem to be any standard OS dialog for handling a domain login (gathering the username, password, and domain-name and then doing the authenticate), a'la what you see in explorer when you try to access shares you are not authenticated for. Is there such a thing? Do all apps that can do domain logins re-implement this dialog? 2) In the absence of any library code to do (1), I've figured out how to determine whether a username/domain/password combinationis legitamate. Once I have a valid login, is there anyway to "set" this into the user's environment, so they are not-reprompted every time they start up our app, or use other network services that require a domain login? Any help would be appreciated.

    C / C++ / MFC sysadmin xml visual-studio wcf security

  • "Ability to write bug-free code as a matter of course"
    A armentage

    That's the point about STL. You never have problems with YOUR OWN use of it. It's when anyone else tries to do something to your STL code that the trouble starts. As for the Lakos book, what makes it great is that rather than explaining language featury theory and what's possible, he explicitly shows you HOW to write code. Designing acyclic class hierarchies, sensible function signatures, actually designing classes properly, this is what his book is about, not Meta-Patterns which seem amazing on paper and turn out to be almost useless in practice. You can't compare Eiffel's templates (or any other languages) to C++. There are only 3 languages who have anywhere like the number of users C++ have, Java, Perl, and C, none of which actually have templates. People using Eiffel today are either going to be playing around with it for fun, or researchers who may or may not have any actual real-world programming experience and may or may not have participated in any industrial strength applications with millions of lines.

    IT & Infrastructure help question career learning

  • "Ability to write bug-free code as a matter of course"
    A armentage

    Check out Large-Scale C++ Software Design by John Lakos, if you want a peak into what "bug free software" means. If C gives you enough rope to hang yourself with, C++ starts you off with a broken neck and gives you a bunch of screws to repair your spine with. Lakos' book is full of guidelines and conventions that can seriously improve your code quality. I know it sounds like bullsh*t, but you would be amazed at the some of the little things people take for granted that expose them C++ pitfalls. Check out reviews on Amazon, but take the negative ones with a grain of salt - While its true that the book is somewhat dated, the reality is that C++ exceptions are horribly designed and implemented, and STL's excessive use of templates just makes code unreadable to anyone but the original author and completely undebuggable, especially on the platform of choice for most of the people who frequent these message boards.

    IT & Infrastructure help question career learning

  • Any better replacement for these functions
    A armentage

    Try using memmove instead of memcpy. As for abs(), try replacing it with this inline function: inline int myAbs(int n) { if (n < 0) return -n; else return n; } That would be a lot quicker than a function call. There maybe more to the abs function than that, but I don't know the details. As for min(), I've never seen that particular version of it before. If you are doing something thats computationally heavy on prepared data, you could sort the data ahead of time and then just pull out the first element, that'd be your min.

    C / C++ / MFC performance code-review
  • Login

  • Don't have an account? Register

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