Type: Posts; User: itsmeandnobodyelse
Search took 0.02 seconds.
January 20th, 2011, 04:37 AM
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...
January 19th, 2011, 01:44 PM
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...
January 19th, 2011, 01:10 PM
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...
January 19th, 2011, 12:41 PM
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...
January 19th, 2011, 11:06 AM
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...
January 19th, 2011, 10:30 AM
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...
January 19th, 2011, 10:24 AM
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...
January 19th, 2011, 10:11 AM
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...
January 19th, 2011, 10:07 AM
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...
January 19th, 2011, 09:08 AM
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...
January 19th, 2011, 08:55 AM
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...
January 19th, 2011, 08:33 AM
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...
January 19th, 2011, 06:09 AM
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...
January 19th, 2011, 04:18 AM
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...
January 19th, 2011, 04:01 AM
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...
January 19th, 2011, 03:25 AM
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...
January 18th, 2011, 02:40 PM
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'...
January 18th, 2011, 02:21 PM
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.
January 18th, 2011, 01:44 PM
Two possible solutions to that:
(1) Using an additional enum with offsets
January 18th, 2011, 01:21 PM
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];
January 18th, 2011, 01:06 PM
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...
January 18th, 2011, 12:46 PM
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...
January 18th, 2011, 12:34 PM
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...
January 18th, 2011, 12:16 PM
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...
January 18th, 2011, 10:41 AM
It could be that this header causes the error.
Normally you define such headers like
Click Here to Expand Forum to Full Width
This is a Codeguru.com survey!