You will need to use 'custom draw', a feature of the common controls including the list control. You can find information in the MSDN using "custom draw" as the search string. I would post a direct link for you, but the MSDN site seems to be acting up at the moment .
Custom draw lets you perform some or all of the drawing required for the control. It's easier than the 'owner draw' feature the traditional controls implemented, where you have to draw the whole thing. With 'custom draw' you can have the control do the standard drawing, and then add your piece where appropriate.
Although WSAAsyncSelect can be called with interest in multiple events, the application window will receive a single message for each network event.
As in the case of the select function, WSAAsyncSelect will frequently be used to determine when a data transfer operation ( send or recv) can be issued with the expectation of immediate success. Nevertheless, a robust application must be prepared for the possibility that it can receive a message and issue a Windows Sockets 2 call that returns WSAEWOULDBLOCK immediately. For example, the following sequence of events is possible:
1.Data arrives on socket s; Windows Sockets 2 posts WSAAsyncSelect message
2.Application processes some other message
3.While processing, application issues an ioctlsocket(s, FIONREAD...) and notices that there is data ready to be read
4.Application issues a recv(s,...) to read the data
5.Application loops to process next message, eventually reaching the WSAAsyncSelect message indicating that data is ready to read
6.Application issues recv(s,...), which fails with the error WSAEWOULDBLOCK.
It has been such a very long time since I've coded the Win23API and now my memory escapes me. I want to iterate open windows (enumwindow) get their hWnd and then present them in a form with a checkbox next to each window. When the user puts a check in the box it will "Remove From Taskbar" when the remove the check it will "Show In Taskbar". I know how to do this inside the application but I cannot seem to find any documentation for how to do it to an application you don't own. It's been since 1999 that I did this stuff and I just don't remember now...
I know the difference between std::string and std::wstring etc, but I was wondering if there was a standard header file like tchar.h for defining a code neutral way of coding that would automatically select the proper string type to use depending on the UNICODE preprocessor define. I can easily roll my own, but is there a standard one?
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Also, I just remembered a couple of problems I ran into using the header file.
The filename argument for file streams are always narrow, and support for multi-byte character strings is limited. However, I wrote the header file for vc++ version 6. I haven't used it with the new versions since I have been using MC++ or C++/CLI almost exclusively.
__declspec(selectany) eliminates the need for a .cpp file, as it instructs the compiler to allocate space for the reference in one and only one compilation unit. Nice if you want to eliminate the need for lib files.
I have used the basic_string<TCHAR> typefef myself in the past, but nowadays I _always_ compile for Unicode, and use std::wstring everywhere. I then link with the UnicoWS library so my apps work on Win9x. It hasn't given me any problems.
I am Using CArray as Two Dimensional Array Containing float type vlaues.Say for Example the inital size of the Array is  now i want to increase the size to ..And i want insert Row in between 2nd and 3rd rwos. Can CArray insert new row between 2nd and 3rd rows and will it adjust rest the data in the array to new size..?
// Person structure<br />struct Person<br />
char FullName;<br />
int Age;<br />
I open a binary file with ios::out | ios::binary | ios::app, so it appends to the file, so there can be many of these structs in a file... The write function is fine, because it outputs alright if I use a single-reading function... Here's how I read it with the multiple-reading function:
// Get number of people in file<br />int entries = getNumOfEntries(&dat_file);<br />
// Person object array<br />
Person persons[entries];<br />
for (int x = 0; x < entries; x++)<br />
// Read file and put it in object<br />
dat_file.read((char*) &(persons[x]), sizeof(Person));<br />
It outputs some weird stuff... Anyone realize what I'm doing wrong? Thanks!