|
Thanks my pal.
You help a lot.
Best regards.
Maer
|
|
|
|
|
I'd like to know how to do an alphabetical sort of the items in a CListCtrl
I use LVS_SORTASCENDING as the window style but the problem I have is when the list has more than one column, the InsertItem function doesn't work for items placed in any column other than the first one.
The code I have is:
CListCtrl* pList = (CListCtrl*) GetDlgItem (IDC_LIST1);
pList->InsertColumn(0, "Column1", LVCFMT_CENTER, 100);
pList->InsertColumn(1, "Column2", LVCFMT_CENTER, 100);
pList->SetRedraw(FALSE);
pList->InsertItem(0, "Item0 Column0", 0);
pList->SetItemText(0, 1, "Item0 Column1", 0);
// Insert more items like the one above
pList->SetRedraw(TRUE);
If I use LVS_SORTASCENDING, the first column shows right (well sorted) but the second column doesn't display any item.
Thanks in advance,
|
|
|
|
|
If you're using LVS_SORTASCENDING style, the list control has to insert new item at appropriate location. You can't use the 0 as 1st parameter passed to SetItemText. Instead, pass the value returned by InsertItem - this is the real item index in the list.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
I to all,
does anyone know how to create and subclass a run-time created object?
I must do this without creating a dialog template.
Thanks in advance.
|
|
|
|
|
If you want to create a dialog window "on the fly" use one of the following dialog functions:
DialogBoxIndirect (modal)
DialogBoxIndirectParam (modal)
CreateDialogIndirect (modeless)
CreateDialogIndirectParam (modeless)
See MSDN : Platform SDK \ Windows User Interface "Creating a Template in Memory"
V.B.
|
|
|
|
|
Thank you, but my question is how to create a run-time object (maybe a CStatic object) and subclass them for a more convenient use.
Thanks in advance.
|
|
|
|
|
I think u can do it by SetWindowLong function with GWL_WNDPROC option and setting a new callback fucntion. I suppose this will work for run-time ocreated object.
Ganesh.M.Ramaswamy
|
|
|
|
|
ok i have a dialog as the main window with a combo box on it defined as IDC_COMBO (NOT USING MFC). now i want to see when the user is typing text in the combobox when he presses the enter key somethin has to happen, i'm surprised i dont know how to do it cause i've done it before, lol but anyways, something like this huh:
...
case IDC_COMBO:
switch(HIWORD(wParam))
{
case WM_KEYDOWN:
break;
}
break;
...
it has to see when the ENTER key is pressed, so u'll need the keycode or something right...?
but this doesn't work i was just pointing out what i'm doing erm..ok, an answer would be nice, thank you in advance
Kuniva
|
|
|
|
|
Is this not working with any keydown or only with enter-key, may be enter-key is closing the dialog box and handled as OK.
Ganesh.M.Ramaswamy
|
|
|
|
|
Hi..
I created a simple database application and created a small setup for this application in windows NT. Here I am storing my installtion path under HEY_LOCAL_MACHINE. So this application is running only when i entered as an administrator rights user, otherwise it is NOT able open the HKEY_LOCAL_MACHINE registry entries. Even if I try to use HKEY_CURRENT_USER it will get vary to different users.
How I can solve so that I should use this registry entry for all types of user..
Thanks in advance..
Raja
Raja Rethinam
Chennai.
India.
|
|
|
|
|
|
thanks a lot..
Raja Rethinam
|
|
|
|
|
Hi,
I wounder if anyone know how too get a pushbutton too act like a checkbox?
What I mean is if you push the button it should stay down and then if you push it again
it should raise.
|
|
|
|
|
You can set on the styles on a checkbox to appear like a push button. Can't remember the exact name but you should be able to see it in the resource editor properties.
I think this should suit your purposes.
Michael
|
|
|
|
|
What is term "_thiscall" mean?
Thanks.
Maer
|
|
|
|
|
As far as I know __thiscall is the calling convention for C++ class functions for which implicit this will be passed.
Ganesh.M.Ramaswamy
|
|
|
|
|
Thanks my pal.
You help a lot.
Best regards.
Maer
|
|
|
|
|
What function in mfc are able for use to get the message sender object, ie:
OnPaint(){
//object b = GetTheObjectWhoSendMeThisMessage();
}
if I execute,
Robert->PostMessage(WM_ON_PAINT);
b will reference to Robert.
thanks
|
|
|
|
|
I don't think that this is easly possible.
Maybe if you supply your own PostMessage function and do some storing of object pointers in a global array for retrieval in the GetTheObjectWhoSendMeThisMessage function, it maybe works.
--
See me: www.magerquark.de
Want a job? www.zeta-software.de/jobs
|
|
|
|
|
I am wandering how to store my table data into excel and auto make pie !!!!
thanks in advance!
Please pardon my weak English!
|
|
|
|
|
I am wandering how to store my table data into excel and auto make pie !!!!
thanks in advance!
The best way to make pie is by hand. No machine will knead the dough just right for that crispy crust we all love so well.
I believe WDJ ran an article on this about a year ago, if you go to www.wdj.com you can download the file archives and while I'm not sure what month it was, there is certainly an article in that timeframe that does exactly what you want.
Unless someone else actually knows how to do it, I'd suggest it's a good bet to go have a look.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
Hi Jeasonzhao (or whazz your name?),
I'v got the same problem: My Project reads MeasurementData from Serial, formats it and should put it into Excel-Diagramms, but I cannot figure out how to convert CArrays int .xls !
I already searched wdj.com, but I didn't find the article!
Can you email it to me if you've got it, would be very nice!
Please include some Info about your Project, maybe we can share knowledge about programming!
mfg HintiFlo
|
|
|
|
|
Thanks for ruining my life for the next few months. I went through all my mags and have a pile of things to read up on as a result
It was CUJ, not WDJ ( to my surprise ), and it's April 2000. The articles are stored in the zip by surname as I recall, this one is by Lacoude and Ketema.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
Consider the website www.yellowpages.com. Does there exist software anywhere which can crawl through this site and grab and retain emails?
Or, is it possible to develop software which crawls through a site and retains email addresses?
Please, any ideas/any response any one can give me will be greatly appreciated.
|
|
|
|
|
There sure is, why do you think you get so many emails offering you prescription free viagra, get rich by sending people money plans and russian wives ?
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|