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
N

nde_plume

@nde_plume
About
Posts
51
Topics
18
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • What does MS used to generate how to articles
    N nde_plume

    I know that Microsoft uses sandcastle to generate all their API docs from code, however, does anyone know what tool they use to generate all the other how to articles in MSDN?

    The Lounge json tutorial question

  • CMS System to Support a Web App
    N nde_plume

    Not familiar with the acronym SOR, however we do agile here, so all design decisions are not made up front. Thanks for the recommendation.

    The Lounge csharp asp-net help tutorial question

  • CMS System to Support a Web App
    N nde_plume

    All, I am just about complete with a web app I want to deploy. However, as with all web apps it needs a bunch of supporting text such as introductions, instruction videos, help files, blog, forums etc. It is an ASP.NET web app, and ideally I'd like something that meshes together (so your membership in the web app corresponds with your membership in the forums, for example.) What do people commonly use for a CMS in this situation? Do you have any experience with one, or more? Any recommendations? I'm thinking about a static tool like CityDesk, because the editing capabilities of web type apps is so lame, but could easily be convinced otherwise. Thanks.

    The Lounge csharp asp-net help tutorial question

  • Location Based Services and E911
    N nde_plume

    Does anyone know of any API available to use location based services and E911 for Symbian or CE based phones? I have been tasked to work on this, and I really don't know where to start. Any help would be greatly appreciated.

    Mobile json help question

  • Default Fonts and Chinese
    N nde_plume

    I am having a hard time understanding how default system fonts are obtained in .NET. Specifically, I need to internationalize an app, and I need to be able to specify the font for various controls. What I want is something like the the old GDI call GetStockObject to return GUI font, system font, fixed width font etc. Can someone point me in the right direction?

    .NET (Core and Framework) csharp graphics question

  • using STL Vector [modified]
    N nde_plume

    The answer is basically no it is not safe, except in certain very resrictive circumstances. In particular if you add elements to the vector, your pointer could very readily be invalidated. A better way to do it is to use itertors. However, if your concern is simple block of memory, I'd suggest what you need is a change in perspective. A vector is a block of memory, albeit with a type structure imposed on it. Why pretend it is a BYTE*, why not just use a vector?

    C / C++ / MFC c++ graphics question

  • Compiler Switches /MD and MT
    N nde_plume

    What is the difference in terms of code generation with these two switches? I understand one if for DLL code and one for Multithread code, but it seems that this means I need to generate four static library versions with each library (six if I include single threaded), since I need a release and debug version. Are people really generating six versions of each static library or am I just missing something important?

    C / C++ / MFC question announcement ai-coding debugging

  • Confused about Mutex?
    N nde_plume

    Yes, I get it, I tried in a separate thread and it works as expected. Thanks for your help.

    C / C++ / MFC testing beta-testing tutorial question

  • Confused about Mutex?
    N nde_plume

    I am confused how to get mutex locks to work correctly. As part of my testing I wrote the following code: HANDLE hMutex = CreateMutex(NULL, FALSE, "ABC"); int result = WaitForSingleObject(hMutex, INFINITE); int result2 = WaitForSingleObject(hMutex, INFINITE); The first line creates a mutex, then the next line "locks" the mutex, then the next line waits for and tries to relock the mutex. It seems to me that the second Wait should never return (since the Mutex is already locked.) However, both Waits return immediately with the return code 0 (== WAIT_OBJECT_0). What am I missing?

    C / C++ / MFC testing beta-testing tutorial question

  • How to delay about 1/20 milisecond ?
    N nde_plume

    You probably can't reliably without going to extrodinary means. This is because Windows is not a Real time operating system, and at any stage your process could be preempted. However, the closest you can get is by calling ::Sleep(20) In reality this will sleep more than twenty milliseconds quite often, because it relinquishes your timeslice in the process scheduler, but it is the best you can do without doing something really hard. Despite what my mis-spelling co-poster tells you, going to assembly language will not offer you any benefit over the above, because it is no less subject to pre-emption than anything else. He/she might argue that you do not relinquish your timeslice as above, however the same can be accomplished in C++ too. For example: class Timer { public: Timer(); void wait(DWORD ms); private: static int cyclesPerMs; // Number of loop iterations per millisecond }; int Timer::cyclesPerMs = -1; Timer::Timer() { const CALIBRATION_TICKS = 100000; if(cyclesPerMs == -1) { // Calibrate timer clock_t start = clock(); for(int i=0; i

    C / C++ / MFC tutorial question

  • Converting double to BYTE array
    N nde_plume

    Actually you are incorrect. sizeof(double) is a compile time constant, and so it will compile. (Just to double check, I tried and it did.)

    C / C++ / MFC database mysql data-structures help

  • Converting double to BYTE array
    N nde_plume

    Obviously the best wat to do this is to not do it, viz: union MyConvert { double d; BYTE bytes[sizeof(double)]; }; Thus for some function storeBytes(BYTE*p, size_t size) to get a double called myVal stored do this: MyConvert mc; mc.d = myVal; storeBytes(mc.bytes, sizeof(myVal); or if you want to go nuts and save the copy: storeBytes(((MyConvert*)(&myVal))->bytes, sizeof(myVal)); Though that might not work if the alignment requirements are different between double and unions.

    C / C++ / MFC database mysql data-structures help

  • Setting the Title in an SDI Application
    N nde_plume

    I want to set the title in the Main frame window in an SDI app, but I can't seem to find the right function. I have tried setting the title in the document class, but instead of getting "Title" I get "Title -- Application Name" I have also tried CFrameWnd.SetTitle, and CFrameWnd.SetWindowText, but none of them seem to work. Any help would be much appreciated.

    C / C++ / MFC help

  • C++ question
    N nde_plume

    However, Microsoft's secret plan to replace C++ with C# is that they make these containers very hard to use within the debugger You really think it isn't possible to present containers in an easier way in the debugger? Heck, if you are using a vector you can hack the debugger to display the contents by typing this in the watch window: my_vector._Myfirst,10 shows the first ten items in the vector in a fairly nice way. There is no reason at all why the debugger can't do that itself. It is much harder with tree structures like maps and sets to view by hand in the debugger (though you can walk throught it, so the data is certainly renderable) it is just that MS didn't think it was very important.

    C / C++ / MFC question c++ algorithms data-structures help

  • C++ question
    N nde_plume

    Or alternatively in C++ vector myChars; ... myChars.push_back(myKeyboardChar); I can see how much more complex the C++ solution is over C# here. :-) It is a fact that there are almost not circumstances when it is necessary to use new and delete in C++ anymore, it is almost always better to use a Standard library container, which handles all that stuff for you. However, Microsoft's secret plan to replace C++ with C# is that they make these containers very hard to use within the debugger. Debugging support of the STL really blows in VS 2003. Has anybody tried it out in VS 2005?

    C / C++ / MFC question c++ algorithms data-structures help

  • Putting a Large Icon in an MFC dialog box
    N nde_plume

    I tried using the Picture Box control, but it resized my icon down to 16x16, and I want to show a 64x64. Any help would be much appreciated. Thanks.

    C / C++ / MFC c++ help

  • Writing Files Directly to a CD-RW
    N nde_plume

    I need to be able to write files directly to a CD-RW disk, however, the way things work in XP is to keep a cache on the local disk, and then actually write them on user command. I need to bypass this mechanism and write directly to CD, or at the very least find some mechanism to start the "copy from cache to the CD" system. Does anyone have any suggestions for me? Thanks, in advance.

    C / C++ / MFC question

  • Convert an int to char array rep
    N nde_plume

    There are couple of issues you should be concerned with here. First of all, you need to send the integer in a representation that all readers will accept. As you probably know, different processor achitectures represent integers in different ways, consequently, most likely the best representation would be a simple ASCII stringL void convertMe(int i) { char s[MAX_CHAR]; itoa(i, s, 10); sendBytes(s); } where sendBytes is your sending function. If you don't care about endian-ness, you could also send the bytes directly like this: sendBytes(reinterpret_cast(&i), sizeof(i)); However this assumes that sendBytes is not designed to send a string, but a block of memory (hence the second parameter which is the length of the block to send.) If it is designed to send strings it will fail quite often since any zero byte within the integer will terminiate the string.

    C / C++ / MFC data-structures

  • Convert an int to char array rep
    N nde_plume

    Alternatively (to Ian's suggestion) if you mean to treat an integer as a four byte character array you can do so by casting: int i = getValue(); char* p = reinterpret_cast(i); However, that is a pretty scary thing to do, since obviously the string will not be guaranteed to be null terminated (unless i&0xFF is 0 on a big endian machine, or i&0xFF000000 is zero on a little endian machine, and also assuming that sizeof(int) == 4) Not recommended. Perhaps you could tell us what you are actually trying to do.

    C / C++ / MFC data-structures

  • Tricky Question
    N nde_plume

    You are using undefined behavior, that is why it doesn't work. Calling a member function through a null pointer is invalid, so the fact that two different invalid behaviors are different is a minor matter of compiler specific details. To put it another way, both pieces of code are not valid C++, and consequently the discussion of different behaviors is irrelevant, Visual Studio 8.0 could give you completely different results (in fact a good C++ lint program would detect this error and report it to you.) If it is your goal to call a class defined function without a specific instance of the object you need to use a static member function, viz: class c { public: static void a(); }; main() { c::a(); }

    C / C++ / MFC 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