CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 12 of 12

Thread: Memory DC(Threading)

  1. #1
    Join Date
    Apr 2008
    Posts
    93

    Memory DC(Threading)

    my program has a total of 13 memory dc.
    6 static memory dc and 7 animation memory dc.
    7 of them each have their own thread, so has 7 threads.

    how many memory dc can a single Visual C++ Program handle ??

  2. #2
    Join Date
    May 2008
    Posts
    300

    Re: Memory DC(Threading)

    I think, and what is practical, it only depends on how much memory left.
    Nope

  3. #3
    Join Date
    Apr 2008
    Posts
    93

    Re: Memory DC(Threading)

    Quote Originally Posted by DreamShore
    I think, and what is practical, it only depends on how much memory left.
    how do i check how many memory i left?

  4. #4
    Join Date
    May 2008
    Posts
    300

    Re: Memory DC(Threading)

    I mean you don't have to worry about it @_@...
    Nope

  5. #5
    Join Date
    Apr 2008
    Posts
    93

    Re: Memory DC(Threading)

    Quote Originally Posted by DreamShore
    I mean you don't have to worry about it @_@...
    ok but is there any way to see how many memory left?

  6. #6
    Join Date
    May 2008
    Posts
    300

    Re: Memory DC(Threading)

    Quote Originally Posted by ashwarrior
    ok but is there any way to see how many memory left?
    GlobalMemoryStatusEx can do this, but not exactly what you need here.

    I find that I really don't know if there is a direct way to find out how much vitrual space is free.
    Nope

  7. #7
    Join Date
    Apr 2008
    Posts
    93

    Re: Memory DC(Threading)

    Quote Originally Posted by DreamShore
    GlobalMemoryStatusEx can do this, but not exactly what you need here.

    I find that I really don't know if there is a direct way to find out how much vitrual space is free.
    from what i build and run, my program only have first 2 animation memory dc running well others will keep on blinking and flashing.

  8. #8
    Join Date
    May 2008
    Posts
    300

    Re: Memory DC(Threading)

    1. I finger there are some other problems in your program
    2. Actually one memory dc for one display DC is enough.
    3. What's the detail of what are you doing?

    Oh yeah, 4. you don't always need to do multi-threading by really create threads, unless you have to make the threads sleep. More exactly "sleep asynchronously"
    Last edited by DreamShore; June 4th, 2008 at 12:39 AM.
    Nope

  9. #9
    Join Date
    Apr 2008
    Posts
    93

    Re: Memory DC(Threading)

    Quote Originally Posted by DreamShore
    1. I finger there are some other problems in your program
    2. Actually one memory dc for one display DC is enough.
    3. What's the detail of what are you doing?

    Oh yeah, 4. you don't always need to do multi-threading by really create threads, unless you have to make the threads sleep. More exactly "sleep asynchronously"
    if i show you my whole program you also cant use as you need a certain software with license to run it along.

    my lecturer told me that thread can run drawings at the same time and parallel too. so i need sleep() inside my thread to make the drawing stay?

  10. #10
    Join Date
    May 2008
    Posts
    300

    Re: Memory DC(Threading)

    if i show you my whole program you also cant use as you need a certain software with license to run it along.
    Don't get what you say :|

    You beleive in Starcraft every sprite has its own thread? Most threads I've created is because of IO.

    You can just draw a sprite after another. That doesn't need to be multi-threaded.
    Nope

  11. #11
    Join Date
    Feb 2002
    Posts
    4,640

    Re: Memory DC(Threading)

    Quote Originally Posted by DreamShore
    I think, and what is practical, it only depends on how much memory left.
    Not true. Device Contexts are system resources, and not dependent on how much memory is available in the system.

    Viggy

  12. #12
    Join Date
    May 2008
    Posts
    300

    Re: Memory DC(Threading)

    Just what's practical, even if they have something to do with something other than memory, memory will run out first.
    Nope

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)