Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. sandup

    functions calling parents in MFC -- how does it work?

    >> it will be initialized through some constructor. Right! Should have figured it out. When the child constructor gets called, it calls the parent's constructor as part of the construction process, so the parent (which is a 'subset' in the child) is properly initialized. >> A parent can only...
  2. sandup

    max allocatable size for malloc()?

    hey zanza maybe malloc() took it as a negative number ;) just messing around...
  3. sandup

    functions calling parents in MFC -- how does it work?

    Got it! You can't call a class' method from anywhere, presumably because 'this' doesn't get passed. I'm curious though -- what are the risks of calling the methods of a class which hasn't been initialized? By that I mean, normally an instance of a class is constructed, etc., after which its...
  4. sandup

    max allocatable size for malloc()?

    Funny guy zanza :):) 4 gb for a key :) anyway, how did you pass 2^32 in a 32-bit parameter? Or did you cleverly subtract 1? ;)
  5. sandup

    functions calling parents in MFC -- how does it work?

    Most MFC functions call their parent's functions, like for instance: void CMyDoc::DeleteContents() { ...do stuff CDocument::DeleteContents(); } How do they do this? They aren't calling member functions of an *object*, they are calling member functions of a *class*. And those member...
  6. sandup

    VC++ 6.0 locks up during build

    Sometimes when there is a compile error the output window shows the error, but when I correct it, the build won't *start again* ! If I try to quit VC, it says "there is a build in progress, stop it first with Stop Build". Only Stop Build doesn't do anything. So my only recourse is to...
  7. sandup

    Media player won't play movies

    After a recent XP install, Windows Media Player doesn't play movies. It used to work fine just days ago, now it suddenly just plays the music, not the video.
  8. sandup

    Windows just keeps uploading something like crazy

    In addition to my question... I'm connecting using dial-up (a Conexant softmodem). Aside from the obvious suggestion "it's a virus dude" what could it be?
  9. sandup

    Windows just keeps uploading something like crazy

    I just installed XP on a clean new system. I don't have automatic updates turned on (I checked it off), I don't have anything on this system, not even Office. When I dial up, the connection status shows a constant upload - no programs are running, the task list is empty, and still it keeps...
  10. sandup

    Problems with WM_PAINT

    I had the same problem. Revert to stock objects (brushes, pens) and delete created objects *before* closing the DC. That will do it. See here: thread713-686470
  11. sandup

    (Help please) Question on more than one functions

    void GetScore(double& score); void DetermineGrade(double score, char& grade); notice the &'s. You need to mark these parameters as references so the functions can change them and the values still exist after the functions have exited. Otherwise they're deleted.
  12. sandup

    [MFC] How to change background color of a window?

    wndclass.hbrBackground = (HBRUSH)GetStockObject (BLACK_BRUSH); when registering the window class (in bare Win32 API). In MFC, look it up where you can pass arguments to the window class.
  13. sandup

    same hInstance in all my programs! HUUUH??

    I'm running multiple instances of the same project; I compile different projects, the instance handle is ALWAYS the same = 0x00400000. Spy++ shows it too. What's going on?
  14. sandup

    GDI problem: CreateSolidBrush

    Here is the code. After about 900 mousemoves the rectangle goes white and stays white. case WM_MOUSEMOVE: xMouse = LOWORD(lParam); yMouse = HIWORD(lParam); InvalidateRect(hwnd,NULL,FALSE); return 0; case WM_PAINT : hdc = BeginPaint (hwnd, &ps) ; SelectObject(hdc...
  15. sandup

    template in precompiled header?

    Say we have a template function that returns the maximum of two values. template <class T> T& max (T param1, T param2) {...} It's logical that it would compile into *two completely* separate functions if it's called once with integers, and once with, say, strings. Then, if this template is...
  16. sandup

    GDI problem: CreateSolidBrush

    Hi, I'm writing a program that updates the client area (fills it with a new color) at each WM_MOUSEMOVE. I use CreateSolidBrush, fill the area, then duly DeleteObject the brush, but still it doesn't work - after a few hundred mousemoves the brush turns white and stays white -- my guess GDI...
  17. sandup

    static member of class

    I did not know Mr Stroustrup took the time to answer (lame) questions like my own :)) lol Actually he's got a point there, bit where do you draw the line? If you keep going in the same direction, you'd end up declaring a variable every time you use it... :/ To Ion Filipski -- multumesc Ioane! ;)
  18. sandup

    static member of class

    Thanks! I knew I was forgetting something. Just as a remark - why does it need to be defined as int again?
  19. sandup

    static member of class

    Hi, I'm doing this according to Straustrup but VC gives the error: unresolved external symbol &quot;public: static int something::N&quot; What's going on? struct something { int x; static int N; }; void main() { something::N = 0; }
  20. sandup

    Beginner's q

    Hi, I'm trying to understand this code. This is the message loop in WinMain, it keeps asking for messages. .WHILE TRUE invoke GetMessage, ADDR msg,0,0,0 .BREAK .IF (!eax) ; break if no message invoke TranslateMessage, ADDR msg invoke DispatchMessage, ADDR msg .ENDW I have a few...

Part and Inventory Search

Back
Top