Search:

Type: Posts; User: okinrus

Page 1 of 20 1 2 3 4

Search: Search took 0.03 seconds; generated 8 minute(s) ago.

  1. Thread: No!

    by okinrus
    Replies
    12
    Views
    2,782

    Microsoft's own versions of these functions,...

    Microsoft's own versions of these functions, CString, and std::string, are less likely to cause security problems. (I haven't had problems with strlen, but strcat and the other functions require...
  2. Replies
    8
    Views
    5,986

    The worker thread might be reading a register...

    The worker thread might be reading a register that is caching the value stored statically. Say, for instance, I wrote


    static int staticVar = 1;

    void f()
    {
    while(staticVar <= 100)
    ...
  3. Replies
    8
    Views
    5,986

    if the variable is cached in a register, then one...

    if the variable is cached in a register, then one thread could write to the register(but not the same variable in static memory), context switch, and then the other thread could read from the...
  4. Replies
    2
    Views
    1,584

    Try this. I made a few corrections, mainly...

    Try this. I made a few corrections, mainly writing ghInstance correctly and getting the bit masks to CreateWindow right.



    #include <windows.h>

    /* Declare Windows procedure */
    LRESULT...
  5. Thread: Java for Games

    by okinrus
    Replies
    18
    Views
    5,191

    If most of the game execution is spent inside the...

    If most of the game execution is spent inside the OpenGL system, a Java game might be comparable to a C++ one. But otherwise, you'll either end up writing a porition of game code using C++ or your...
  6. Replies
    3
    Views
    1,538

    The call to Invalidate doesn't quite call OnDraw....

    The call to Invalidate doesn't quite call OnDraw. The invalidate messages are put onto a queue for latter processing and your OnDraw will return before they are processed.


    To update the...
  7. Replies
    24
    Views
    3,491

    The wait is there to prevent the application...

    The wait is there to prevent the application thread exiting while the worker thread still exists. If the wait times out, maybe your worker thread never exits from its callback function. You need...
  8. Replies
    11
    Views
    2,028

    When a win32 console program is run, a console...

    When a win32 console program is run, a console window is created. You don't write the code to display the console window. But For win32 non-console programs, you must create your own windows. You...
  9. Replies
    3
    Views
    961

    In C++, objects are sometimes constructed in the...

    In C++, objects are sometimes constructed in the middle function. Their initialization occurs in the constructor. For example, you could have


    void f()
    {
    int c = 4 + 4;

    for...
  10. Replies
    24
    Views
    3,491

    I don't think sleep is needed. You need...

    I don't think sleep is needed.



    You need to set m_bAutoDelete to false and make sure the thread isn't running. I do


    CWinThread* thread = AfxBeginThread(run, 0,...
  11. Replies
    24
    Views
    3,491

    The view and the dialog must still be processing...

    The view and the dialog must still be processing some types of messages during DoModal. Overlapped areas won't get drawn othewise. I'll have to try and see what happens sometime.
  12. Replies
    10
    Views
    1,806

    Create some type of index file(and maybe postings...

    Create some type of index file(and maybe postings file) and do analysis on the index. You'll want to tailor the index according to the type of statistics your doing. For example, creating a list...
  13. Replies
    24
    Views
    3,491

    From what I understand, the modal dialog operates...

    From what I understand, the modal dialog operates on its own message loop. But by using a PostMessage to the modal dialog and the progress info may be propagated. Maybe you could clarify?...
  14. Replies
    26
    Views
    3,287

    Check recent memory accesses(both around the...

    Check recent memory accesses(both around the crash and by execution order) for fence post errors, delete[] when delete was needed, etc. Your constructor, if you have one, could also be causing the...
  15. Replies
    24
    Views
    3,491

    Threads will make things more complicated. I...

    Threads will make things more complicated. I thought maybe your interthread messages might be getting lost because of your modal message box.


    For MFC specific stuff, this page is pretty good. ...
  16. Replies
    24
    Views
    3,491

    How are you communicating the progress...

    How are you communicating the progress information to the progress dialog? Are you reading the file read through another thread?


    Windows XP will white out the window if you stay in the loop...
  17. Replies
    11
    Views
    1,611

    Either display the image by overriding the...

    Either display the image by overriding the OnDraw(CDC* pDC) of a CView subclass or, if the image doesn't change, you could place the image onto a form view or dialog. Lookup CView, CBitmap, CDC,...
  18. Replies
    11
    Views
    2,729

    It looks like inside your Tile Destructor the...

    It looks like inside your Tile Destructor the TileDC and TileBitbmap passed into the constructor aren't being deleted.
    (You're also leaking the GDI objects by either not selecting the old ones...
  19. Replies
    2
    Views
    1,870

    Design pattern books will go into some detail. ...

    Design pattern books will go into some detail. The smalltalk description of MVC is out on the Web, too. But briefly, though, you set up the structure of the classes so that the controller listens...
  20. Replies
    13
    Views
    1,515

    If you use a GUI library with C++ you can do...

    If you use a GUI library with C++ you can do these types of applications.



    The programs cashiers use(POS systems) are usually console based.
  21. Replies
    10
    Views
    3,090

    Changing the return type and making sure that...

    Changing the return type and making sure that afx_msg is used should at least change the error message Are you declaring everything exactly as it is in this site...
  22. Replies
    8
    Views
    1,307

    Use Microsoft Visual c++ to create an...

    Use Microsoft Visual c++ to create an installation program. In how to do it, each version is different, I think, but it ought to include the right dlls for your project. (Try to find a tutorial on...
  23. Thread: Career

    by okinrus
    Replies
    28
    Views
    8,699

    "I hate programming" is kind of general. You...

    "I hate programming" is kind of general. You shoould tell us why you hate programming; it might just be related to one single class or teacher.



    Political science majors don't have to go into...
  24. Replies
    10
    Views
    3,869

    I think this link covers what you need to know. ...

    I think this link covers what you need to know. Looks like you don't need to setup anything with dev C++ but Stroustrup's book covers this too I think....
  25. Database initializatiion could take relevatively...

    Database initializatiion could take relevatively a long time; it's interprocess. And when you run the process intensive loop part first, you might somehow increase or decrease the OS priority given...
Results 1 to 25 of 481
Page 1 of 20 1 2 3 4