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
F

followait

@followait
About
Posts
766
Topics
372
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How to create a windowless control after implementing all the necessary interfaces?
    F followait

    for example, if all the necessary interfaces for a windowless control is implemented as below, how to create the control on a dialog, and let it working properly?

    class my_ctl : public IOleInPlaceObjectWindowless, public IOleInPlaceSiteWindowless, public IViewObjectEx
    {
    ...
    }

    Thanks in advance. BTW, I want it be as simple as possible, just let it work.

    C / C++ / MFC tutorial question

  • it's much slower when using boost::pool_allocator and boost::object_pool
    F followait

    Thanks, agree with you.

    C / C++ / MFC c++ graphics performance

  • it's much slower when using boost::pool_allocator and boost::object_pool
    F followait

    If using a memory pool, it should be faster, doesn't it?

    C / C++ / MFC c++ graphics performance

  • it's much slower when using boost::pool_allocator and boost::object_pool
    F followait

    the test result on my computer:

    //case 1
    2153 // not using pool
    16 // using pool
    //case 2
    15 // not using pool
    32 // using pool
    // case 3
    2668 // not using pool
    14976 // using pool
    Press any key to continue . . .

    main.cpp

    #include #include "test.h"

    int wmain()
    {
    test0(10000);
    test1(10000);
    test2(10000);
    test3(10000);
    test4(10000);
    test5(10000);
    system("pause");
    return 0;
    }

    test.h

    #pragma once

    void test0(int loops);
    void test1(int loops);
    void test2(int loops);
    void test3(int loops);
    void test4(int loops);
    void test5(int loops);

    test.cpp

    #include
    #include
    #include
    #include
    #include
    #include
    #include "test.h"

    using namespace std;

    class AAA
    {
    public:
    AAA()
    {
    // cout << "con" << endl;
    }
    ~AAA()
    {
    // cout << "descon" << endl;
    }
    public:
    int a;
    char b;
    short int c;
    vector d;
    };

    void test0(int loops)
    {
    char ** p = new char*[loops];

    DWORD tick = GetTickCount();	
    
    for (int i=0; i memory\_pool(32);	
    
    for (int i=0; i v;
    for (int i=0; i > v;
    for (int i=0; i obj\_pool;	
    
    for (int i=0; i
    
    C / C++ / MFC c++ graphics performance

  • windowless shockwaveflash control doesn't work properly individually
    F followait

    tried, but still not work if popup the context menu, it plays

    C / C++ / MFC question announcement

  • windowless shockwaveflash control doesn't work properly individually
    F followait

    In CMyApp::InitInstance

    // not work
    SwfWnd * w = new SwfWnd;
    SwfWnd->Create(...);
    MSG msg;
    While(GetMessage(&msg, SwfWnd->GetHWnd, 0, 0))
    {
    TranlateMessage(&msg);
    Dispatch(&msg);
    }
    // work
    SwfWnd * w = new SwfWnd;
    SwfWnd->Create(...);

    COtherDlg dlg;
    dlg.DoModal();

    Any way to make the 1st version work?

    C / C++ / MFC question announcement

  • Why is index in document gone? [modified]
    F followait

    about its programming environment :|

    modified on Saturday, January 1, 2011 9:57 PM

    C / C++ / MFC csharp database mysql visual-studio com

  • Why is index in document gone? [modified]
    F followait

    Index is removed from msdn by default in visual studio 2010. Although there are some plugin, but not as good as in VS2008. BTW, when opening and running two or more instances of VS2008, the UI will be out of order. For example, running a server and a client in two instances of VS2008, when one aborted, one of the UI became out of order, I don't remember which. What's like, the index in mysql document is also removed. ============ If search works, it is also possible to build an index only once instead? I think M$ is collecting in the search procedure for analysis, for its bing.com.

    modified on Sunday, January 2, 2011 9:47 PM

    C / C++ / MFC csharp database mysql visual-studio com

  • lack of index in mysql document
    F followait

    With out index, it become not that efficient when finding help. The TOC (or bookmarks in pdf) is not so efficient. What worse is html, I have to return to TOC to relocate. BTW, index is removed by default in visual studio 2010. Why index is gone?

    Database csharp html database mysql visual-studio

  • throw exception after allocating some memory [modified]
    F followait

    A class is ok in the case. But in another case, the life scope of the object of the class may larger than the try..catch... block, this can bring problems, just because the scopes are not inconsistent. However, there seems no proper way which is also efficient. BTW, is there any language that can provide some thing like constructor and distructor for a function?

    C / C++ / MFC performance help tutorial question

  • Image Flicker
    F followait

    You can try: 1. use memory dc 2. draw what is necessary

    C / C++ / MFC question help

  • throw exception after allocating some memory [modified]
    F followait

    But when I manapulate a dababase instead of memory, for example, a prepared statement, I need to close it before leave. Hope it can be common.

    C / C++ / MFC performance help tutorial question

  • throw exception after allocating some memory [modified]
    F followait

    Yes, it is fine. But when I manapulate a dababase instead of memory, for example, a prepared statement, I need to close it before leave. Hope it can be common.

    C / C++ / MFC performance help tutorial question

  • throw exception after allocating some memory [modified]
    F followait

    I think exception is rarely happened, I want to catch it in the more outside fucntion, like main.

    C / C++ / MFC performance help tutorial question

  • throw exception after allocating some memory [modified]
    F followait

    How to let the code be more elegant? Just too much delete. BTW, while not to deal the exception in side the function, try catch finally can't be used.

    void f()
    {
    char * buf = new char[128];
    ...
    if (...)
    {
    delete []buf;
    throw runtime_error("...");
    }
    ...
    if (...)
    {
    delete []buf;
    throw runtime_error("...");
    }
    }

    ===================== I think what I need is something like constructor and destructor, but for a function. By overriding operator() of a class may solve some problem, but the function it hard to be re-entrantable, and other misc problems. Most of the cases the function should be short, so this couldn't be a problem, but in some rare case, it has to deal a lot of data, and the function looks very long.

    modified on Friday, December 24, 2010 3:38 AM

    C / C++ / MFC performance help tutorial question

  • Find an open source powerful math library
    F followait

    like mathematica ;P

    C / C++ / MFC

  • project wizard in vs2010 not work properly, and the project can't be created.
    F followait

    1. new project 2. Visual C++/Win32/Win32 Console Application 3. Enter the name of the project (TestNamespace), click ok Then it pops up a windows, show some code in html, with jscript. I tried to copy it here, but it isn't support to be copied. BTW, I have tried to repair it using the dvd, but it didn't solve the problem.

    C / C++ / MFC help tutorial question

  • project wizard in vs2010 not work properly, and the project can't be created.
    F followait

    when I finished the wizard, a popup window showed the following text:

        Win32 Application Wizard
    

    ...

    BTW, not only in vs2010, another application (mobicreator) showed the familiar text. How to fix it? Thanks.

    C / C++ / MFC help tutorial question

  • need a waitable queue class, thread safe
    F followait

    like Windows' GetMessage

    C / C++ / MFC data-structures

  • What is the effect of FILE_SYNCHRONOUS_IO_ALERT in ZwCreateFile?
    F followait

    Is it like this? when reading/writing a file, if there are APC's, the reading/writing returns immediately and prematurely, and the APC's are executed.

    Hardware & Devices question
  • Login

  • Don't have an account? Register

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