CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: itsmeandnobodyelse

Page 1 of 24 1 2 3 4

Search: Search took 0.04 seconds.

  1. Re: CFileDialog cannot be subclassed in Windows 7?

    In MFC all member controls of a dialog or formview need to get subclassed in order to get the message map mechanism working. That was done technically by subclassing the window associated to the...
  2. Re: Which is better CStringArray or CString concatenate with delimiter

    If you would make an owner-drawn listbox you could add empty strings in the first place and provide the real strings from an array only for the visible items. That way you also could spare a...
  3. Replies
    13
    Views
    15,434

    Re: list all files in a directory c++

    You could make a 'system("dir .");' to list the current directory. As long as your program wouldn't do a change of the working directory programmatically, the folder listed is the one where the...
  4. Replies
    10
    Views
    852

    Re: Member function not found?

    The VC compiler (at least including VS2005) used to search header files in the last (include) folder accessed thus ignoring any order of the include folders or making a difference between project...
  5. Replies
    6
    Views
    892

    Re: Using Bitmasks

    It means that we have an integer 1 (i. e. only the least significant bit is 1 and all other bits 0) that was casted to type TStruct. With a cast the type of the result in the parantheses was looked...
  6. Replies
    10
    Views
    1,409

    Re: std::vector class with functions?

    Instead of deriving from std::vector you could have the std::vector a member of your class. Then you easily can offer a specialized interface to your container and nevertheless use all members and...
  7. Re: Accessing iterator past the end of a list

    Not only to some degree, but they simply were typedefs of a pointer type, e. g. std::vector<T>::iterator of Visual C++ 6.

    But here we seem to have a std::map and that could not be done by a simple...
  8. Re: C++ and MySQL connection, just a few questions

    Note, there were also API's and class libraries which do it similar to PHP. Often those tools can generate C/C++ code directly from the table definition of the data source. Then you only would need...
  9. Re: C++ and MySQL connection, just a few questions

    In C/C++ you would do



    - connect to database
    - build a select statement as a string e. g. "select from users where username = 'toffo'"
    + you normally would do normal string concatenation...
  10. Replies
    10
    Views
    852

    Re: Member function not found?

    There are two common reasons why it compiles when you include the contents of a headerfile versus using an include statement. The one is that the file it includes is a different file (a second...
  11. Replies
    5
    Views
    867

    Re: C++ iterator

    An iterator object is associated to a container so that it points to one element of that container or to an invalid pseudo element which signals the end of the iteration. The iterator provides a...
  12. Re: CFileDialog cannot be subclassed in Windows 7?

    Normally 'subclassing' means that you have a class derived from a control and you want to redirect messages sent to the baseclass of the control to your derived classed.

    How did you make a...
  13. Replies
    20
    Views
    4,966

    Re: Can we use CHeaderCtrl directly?

    The OP's question is to 'use a header control directly' what in my opinion means not to use the embedded header control of the list control but a second one. That is also the alternative MS describes...
  14. Replies
    20
    Views
    4,966

    Re: Can we use CHeaderCtrl directly?

    It is not true that CHeaderCtrl is always a child of CListCtrl, not of dialog and formview.

    If you meant with this that CListCtrl always has an embedded CHeaderCtrl as child window, it is not how...
  15. Replies
    3
    Views
    5,184

    Re: How to use GetKeyState()

    The return value of GetKeyState is a short what normally is a 16-bit integer. Hence, the short which has a bit combination where only the highest bit is set is '1000000000000000' binary or 0x8000...
  16. Replies
    20
    Views
    4,966

    Re: Can we use CHeaderCtrl directly?

    Sorry, that is not true for a seperate CHeaderCtrl as requested by the OP. The CListCtrl has an embedded CHeaderCtrl which you can see in Spy. But when you intend to have a separete header for that...
  17. Re: How to generate random numbers without using rand() function?

    Random numbers and repeatable isn't a contradiction. As Lindley said the rand() function also is repeatable, i. e. it always give the same numbers, when using the same seed number. The 'random'...
  18. Replies
    6
    Views
    1,017

    Re: Linked Lists....Trouble.

    Pointer to pointer is a C-style coding for passing 'changeable' pointers to a function. In C++ you got an additional reference type which turns the argument type to an input/output argument.


    ...
  19. Replies
    3
    Views
    974

    Re: Distributed enums

    Two possible solutions to that:

    (1) Using an additional enum with offsets



    // eoff.h
    enum
    {
    E1_OFF,
  20. Replies
    6
    Views
    1,052

    Re: Problem with fstream/sstream

    In order to add the null termination you need to allocate one additional char and copy a zero char to that additional byte:



    char * b = new char[a.size()+1];
    strcpy(b, a.c_str());
    .......
  21. Re: I tried to use my program on another computer...

    Thanks for the information but installing the runtime environment is free and there are enough free setup programs available.

    I wonder whether the express version allows static compilation at...
  22. Re: Converting tchar array to string array

    The szBuffer contains a series of null-terminated strings and finally has a double-null termination.

    So in the loop the pch always points to a 'normal' zero-terminated TCHAR string which you...
  23. Re: I tried to use my program on another computer...

    Alternatively you could install VS2010 runtime environment at the target computer (which would install the missing dlls). You can download the setup for that from MS support. I even heard from people...
  24. Replies
    5
    Views
    1,041

    Re: isolate a static method

    You pass 'this' instead of one of the NULL arguments of StartServer (look at the prototype to find out which argument it is) and the StartServer will pass that pointer to the server which will return...
  25. Replies
    4
    Views
    7,862

    Re: error template with C linkage

    It could be that this header causes the error.

    Normally you define such headers like



    #ifdef __cplusplus
    extern "C"
    {
    #endif
Results 1 to 25 of 578
Page 1 of 24 1 2 3 4





Click Here to Expand Forum to Full Width

Featured