It might be because the mayor of Houston, Bill White, is actually a Democrat (the mayor of Galveston may be too, I'm not sure).
TFrancis
Posts
-
Rita Evac? -
It's a family affair ...While I agree with your setiments, it should be noted that Texas beat Lousiana-Lafayette 60-3, not Hawaii. USC beat Hawaii.
-
kayakingThe definition I was taught way back when in the boy scouts was that the difference between a kayak and a canoe is that you sit in a kayak and you kneel in a canoe (the traditional canoe will have rather high seats built into them, but most experienced whitewater canoers will tell you that if you sit on the seats your center of gravity will be too high and you'll end up in the water). Not sure how true this difference is in real life, but it seemed to make sense at the time.
-
JOTDI believe it is Bill Engvall (as someone else said, a "cohort" of his in the Blue Collar Comedy Tour/show)
-
Com portsdisclaimer: don't know how well MS supports this in all versions of Windows, so use at your own risk The list of serial ports can be found in the registry at HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM You can use RegEnumValue() to enumerate and create the list you need.
-
Window not being PaintedSorry, I found the answer shortly after posting the message and forgot to update my message here. I wasn't calling PreTranslateMessage() for the two windows. Once I did this it started working perfectly.
-
Window not being PaintedI have a WTL based application. In response to a particular user action, it is to create and show a new CFrameWindowImpl<> based window that includes a splitter and two client windows. This all works fine on my development computer. It does not work when I distribute to the computer that this application is suppose to be run on. On the other computer, the two client windows are not being painted. Both computers are running Win2000 Service Pack 3. Any clues?
-
Weird pointer behaviorIf, GetAddressOfApproachSomePlaceElse() calls new, then yes, this would be a memory leak. If in your function you want to change what object a pointer points to (not the object itself, but what object it points to), then one technique is to pass it a pointer to a pointer. CApproach* pApproach = NULL; GetNextApproach(&pApproach) void GetNextApproach(CApproach** ppApproach) { *ppApproach = GetAddressOfApproachSomePlaceElse(); } If you simply pass it a pointer, then it makes a copy of the pointer (not a copy of the object, but a copy of the pointer to the object). Any changes you make to the pointer (not the object, but the pointer to the object) will not be kept when the function returns, they are thrown away with the copy of the pointer. Hope this helps, Tim
-
pointer questionint main() { float v1 = 0.0; float v2 = 0.0; .... MyFunc(v1,v2); ... return 0; } void MyFunc(float& v1, float& v2) { //Change value of v1 & v2 } "float&" versus just "float" means that you will be passing by reference, not by value. I suggest you look up by value and by reference in your text/reference book to get a better understanding of this concept.
-
BWAHAHAHAHAHAHAYou missed David Robinson. And Laetner was the only amateur (and he was only a month or two away from being a pro)
-
Base Class UndefinedA long time ago I came up with a bunch of COM interfaces that were all defined in one IDL file. I created a number of COM objects that supported those interfaces by having the object's IDL file include the first idl file. It worked. All was well with the world. Now, I am trying to make some changes, so I created a Ixxxx2 interface that inherits from Ixxxx in that first IDL file. When I try to get my ATL object to inherit from Ixxxx2 I get compiler error C2504, base class undefined. I've compiled the new version of the IDL file. The new interface is defined exactly the same in the .h file as all the other older interfaces. What am I doing wrong? Thanks, Tim
-
what does "rhs" mean?rhs = Right Hand Side. And yes, you can use anything you want, but rhs is normally used because it does a good job of describing the fact that the parameter will be on the right hand side of the = sign. Tim
-
C++ pointer questionIf there's some function call out there that tells you if a spot in memory is valid that'd be a real easy way of doing this. But I don't know of one. My suggestion. Make ptr a static member of the foo class. Then, in your foo destructor, if ptr == this, set ptr = NULL. Tim
-
how to change view in a sdi frame windowYou need to call Create() on m_view2. Then, in your code that switches the view, you need to hide m_view, show m_view2, and then set m_hWndClient to m_view2.
-
CTreeViewCtrlI'm using a CTreeViewCtrl in my project. It works great except for one small problem. When I change the system UI appearance to something like "Plum" so that the background color changes the tree has problems. When you expand an item in the tree sometimes the newly visible items are drawn with a white background. Is there a workaround? I'm using Win2000, VS .Net 2002, and WTL ver 7.0. I'm kinda in the middle of the project so I figured I'd finish it before switching over to WTL 7.1. Is this something that was fixed in 7.1 and I should just switch over to it?
-
Copy Constructors"Always" is such a strong word. As the previous reply said, if you don't define one, one is created for you. It's important for you to define one if the default behavior won't work for you. The perfect example of this is if your class includes a pointer to an object on the heap: class CFoo { ... CBar* m_pBar; }; The default copy constructor will just copy the pointer, so you'll end up with two CFoo objects pointing to the same CBar object on the heap. This can result in ugly crashes if the destructor includes deleting the CBar object. So, in this case you will want to define your own copy constructor that will make a copy of the CBar object. There's one more theory on all this. If you have a really large class with a lot of member variables and items on the heap you won't necessarily want the user of your class to be able to copy it as this will lead to poor performance. So, instead in the private section of your class declaration, declare your Copy constructor but never define it: CFoo { ... CFoo(const CFoo&); }; Thus, anytime you or another future programmer accidentally calls the copy constructor on your huge class the compiler will disallow it. So, the short answer, no it's not always a good idea.
-
How many Serial Ports do I have?Look at HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM and see if that's at all helpful. Tim
-
Virtual Function QuestionJust FYI, this really does work, and is infact the basis of the template design pattern. Where I went wrong: class A was written by somebody else (in this case it was part of WTL written by Microsoft). I thought it was virtual, it wasn't. If it was virtual it would've worked, as I've now found out. Why it works: The method in class B that calls the virtual function is calling it on the this pointer. Thus, the virtual table is used to figure out which version to call, so even though class B doesn't know about class C, class C's definition of the function is used. Pretty cool when you do it right.
-
Virtual Function QuestionI'm actually using WTL in this project, but this appears to be a basic C++ question so I thought I'd ask it here. I have class A, which is a base class for class B. Class B is in turn a base class for class C. In class A there is a virtual function. Let's call it Func1(). This function is defined in both class A and C (the A version just asserts, the C version actually does the work). In class B there is a non-virtual function that calls Func1(). As I understand it, it should call the class C version of this function, but instead it's calling the class A version. Where have I gone wrong?
-
problem with if statementIf I understand it correctly, you don't want it to run the block of code if status = "sent" or "cancelled by user". Try doing the following if statement: if (!((str_Status == "Sent") || (str_Status == "Cancelled by User"))) If it's equal to "Sent", then it returns false If it's equal to "Cancelled by User", then it returns false If it's equal to "Anything else", then it returns true. Hope this helps, Tim