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
B

Branislav

@Branislav
About
Posts
109
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Questions about creating a 3D array class
    B Branislav

    One solution can help you to make something new: class Array2D { public: Array2D(int w, int h):width(w), height(h), array(w*h) {} ... ... protected: int width, height; Array array; } template class Array3D :public Array2D { public: Array3D(int l, int w, int h) : Array2D( w, h), length(l) {} ... ... protected: int length; //Array< Array2D > array; }

    C / C++ / MFC c++ design data-structures tutorial question

  • problem exporting static template data members, but not methods
    B Branislav

    "Windows requires all public symbols to be explicitly exported from a DLL via the __declspec(dllexport) syntax (and correspondingly dllimported when referenced in some other DLL). I guess it works pretty well on C libraries. But it doesn't work so well on C++ libraries, particularly with template classes--the template itself, of course, doesn't have a link-time presence, so it doesn't make sense to dllexport a template. What you really mean to export is the template instantatiation. But template instantiations are implicit, according to the language, so where do you put the dllexport syntax? Microsoft came up with a place to put the dllexport syntax, which is to explicitly put a line like this in the DLL that exports a particular template instance: Code: template class __declspec(dllexport) my_template_class; And also put a line like this in a DLL that imports that template instance: Code: extern template class __declspec(dllimport) my_template_class; These lines must be the first instantiation of the template instance, which means they must be seen by the compiler before any other reference to my_template_class. Of course, this is a Microsoft extension to C++ syntax; the language itself does not require this sort of declaration (and non-Microsoft compilers won't understand it). The problem with this declaration is that it explicitly expands and exports all methods and components of the template class, whether they are actually used or not; and it requires that nested template classes be explicitly exported before their containing classes are exported. That's not too bad, but it turns out that the standard STL implementation of list, map, set, multiset, multimap--basically everything other than vector--use nested template classes that are mutually recursive. That is, the nested class includes references to the containing class, and vice-versa. This makes it impossible to export the nested classes first, since expanding them requires expanding the containing class--which has not been exported yet, violating the rule that the export syntax must appear before the first instance is encountered. Similarly, you can't export the containing class first, which would expand the nested class before its export syntax. This means that none of the STL classes except for vector can be exported from a DLL. But do you really need to export a template instance from a DLL? Isn't each instance of a template technically a completely new copy of the class? If you don't even try to e

    C / C++ / MFC help question csharp c++ visual-studio

  • external program
    B Branislav

    The linker is looking for the entry point for a console application, but the application is being compiled and linked as a windows application (i.e. not a console application). This error has been observed after changing the project settings from using MBCS to UNICODE characters. Under the project settings, under the ‘Link’ tab, category ‘output’, set the ‘Entry-point symbol’ to ‘wWinMainCRTStartup’.

    C / C++ / MFC question c++

  • problem exporting static template data members, but not methods
    B Branislav

    A data member of a class can be declared static; be it in the public or private part of the class definition. Such a data member is created and initialized only once, in contrast to non-static data members, which are created again and again, for each separate object of the class. A static data member is created once: when the program starts executing. Nonetheless, it is still part of the class. Static data members which are declared public are like `normal' global variables: they can be reached by all code of the program using their name, together with their class name and the scope resolution operator. This is illustrated in the following code fragment: #include template class C { public: static int n; }; The data member n is a private static variable. During the execution of the program, only one C::n exists, even though more than one object of the class C may exist. This data member could be inspected or altered by the constructor, destructor or by any other member function of the class C.

    C / C++ / MFC help question csharp c++ visual-studio

  • CHotKeyCtrl and "space"
    B Branislav

    Try with: UnregisterHotKey(...) m_hotkey1.GetHotKey(...) ... RegisterHotKey(...) m_hotkey1.SetHotKey(...) RegisterHotKey modifier flags defined in "CommCtrl.h" and "WinUser.h" are not same. The values for fsModifiers are defined in "WinUser.h".

    C / C++ / MFC c++ help tutorial question

  • Parallel port and MFC application integration
    B Branislav

    You can use inpout32.dll. Look on: http://logix4u.net/[^]

    C / C++ / MFC c++ hardware help question

  • DATETIMEPICKER Flat
    B Branislav

    http://www.codeproject.com/cs/miscctrl/FlatDateTimePicker.asp[^]

    C / C++ / MFC c++

  • Another Drag and Drop Question
    B Branislav

    http://www.catch22.net/tuts/dragdrop.asp[^]

    C / C++ / MFC help question career

  • How to Print the Text in Required Format.
    B Branislav

    http://www.experts-exchange.com/Programming/Programming_Languages/MFC/Q_20614433.html[^]

    C / C++ / MFC help tutorial

  • How to simulate DoEvents() in Visual C++?
    B Branislav

    http://blogs.msdn.com/oldnewthing/archive/2005/02/22/378018.aspx[^]

    C / C++ / MFC c++ help tutorial question

  • Rounding problem
    B Branislav

    Try with this: char sInteresse[30], sTotale[30]; sprintf(sInteresse, "%14.14f", Interesse); sprintf(sTotale, "%14.14f", Totale);

    C / C++ / MFC question help learning

  • How to delete values and header from ListCtrl
    B Branislav

    int nColumnCount = m_ListCtrl.GetHeaderCtrl()->GetItemCount(); // Delete all of the columns. m_ListCtrl.DeleteAllItems(); for (int i=0;i < nColumnCount;i++) { m_ListCtrl.DeleteColumn(0); // always delete first column } You delete all items with m_ListCtrl.DeleteAllItems() and only first column.

    C / C++ / MFC tutorial

  • button catch double click.
    B Branislav

    Try to use BN_DOUBLECLICKED and your button need to be Notify.

    C / C++ / MFC

  • BN_DOUBLECLICKED
    B Branislav

    Did you select Notify in Puch Button Properties - Styles dialog box?

    C / C++ / MFC help question

  • Serial Port communication
    B Branislav

    I think that you have null modem connection. DTR -> DSR are continual signal. When you set DTR signal on high that means you are redy to send data but when your DSR become high that mean you can receive data from device. When you start to configure port set DTR signal with DTR_CONTROL_DISABLE and fDsrSensitivity in DCB with TRUE to avoid flow, but watch all changing are valid after calling function SetCommState. Now you can control DTR with function EscapeCommFunction and monitoring DSR. My recommmendation is whenever use EscapeCommFunction(hFile, CLRDTR | CLRRTS ) or EscapeCommFunction(hFile, SETDTR | SETRTS).

    C / C++ / MFC com help tutorial question

  • Access 2000 Ole Integration
    B Branislav

    Maybe this article can help you: http://support.microsoft.com/?kbid=266387[^]

    C / C++ / MFC com question

  • BN_DOUBLECLICKED
    B Branislav

    http://www.codeproject.com/buttonctrl/doubleclick.asp[^]

    C / C++ / MFC help question

  • Serial Port communication
    B Branislav

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/devio/base/monitoring\_communications\_events.asp and http://www.codeproject.com/system/serial\_com.asp

    C / C++ / MFC com help tutorial question

  • Sir,can you help me
    B Branislav

    Before use any function to call driver you must start driver service if you did not have automatic start during instalation driver. For more details see http://www.l5sg.com/products/source_code.php source code for tipical install, start and stop a service or driver. You can use that code to open and start driver before call CreateFile, ... and after, before the end of your program, close service or driver. All you can check in Administrative Tools\Services. And most important thing is that you must be Administrator or privelege level like administrator.

    C / C++ / MFC c++ debugging help question

  • Accessing Error-Checking of local hard drives in XP (in c++ code)
    B Branislav

    You can use chkdsk (or chkntfs) http://www.microsoft.com/windowsxp/using/helpandsupport/learnmore/tips/kbtip.mspx http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/chkdsk.mspx http://www.sysinternals.com/SourceCode/fmifs.html

    C / C++ / MFC c++ tools help tutorial 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