|
hi can somebody tell me how can i put Item checked in a Clistrl into a table
using CStringArray i think.
thanks for your reply.
Somoene who really needs help.
|
|
|
|
|
Please write, what is You goal.
I don't quite understand, why are You trying to use CStringArray with CListCtrl to achieve checkboxes???
Try to look at CCheckBoxList - if You want to have check list box.
For check list control, You have to write Your own or search on the web (there is one in Stingray package). AFAIK there is no such control in MFC.
|
|
|
|
|
I'm sorry if i wasn't clear!!
I had just ask that when i click in a checkbox inside a list control how can i retrieve the item text checked in a table.
I ve heard that u must use CStringArray!!!!!
I hope that i ve exposed my goal clrealy, but I m not sure.
Reply me if u still not understand
bye
|
|
|
|
|
hi can somebody tell me how can i put Item checked in a Clistrl into a table
using CStringArray i think.
thanks for your reply.
Somoene who really needs help.
|
|
|
|
|
HI,
I have a file pointer, How to get file name?
Actually in costructor i am giving file name, and opening a file there. i am storing file pointer as amember variable, I am not interested storing file name as member variable. I am doing all file operations. but in some other fucntion i need file name, here i have only file pointer. How will i get file name from file pointer? Is there any fcuntion?
Thanks in advance,
- Koteswara
theearth1947@yahoo.com
Perumalla Koteswara Rao,
Hyderabad, India
Thanks in advance,
Koteswara Rao, Perumalla
theearth1947@yahoo.com
|
|
|
|
|
Please clarify - that is the "file pointer" ? CFile* pFile ? ifstream * pfstream ? handle of file ... or what ?
Best regards,
-----------
Igor Soukhov (Brainbench/Tekmetrics ID:50759)
igor_soukhov@yahoo.com | ICQ:57404554 | http://siv.da.ru
|
|
|
|
|
It's FILE* pointer.
Thanks in advance,
Koteswara Rao, Perumalla
theearth1947@yahoo.com
|
|
|
|
|
Please clarify - that the "file pointer" is ? CFile* pFile ? ifstream * pfstream ? handle of file ... or what ?
Best regards,
-----------
Igor Soukhov (Brainbench/Tekmetrics ID:50759)
igor_soukhov@yahoo.com | ICQ:57404554 | http://siv.da.ru
|
|
|
|
|
How?can anybody help mi?
LIFE MUST GO ON
|
|
|
|
|
look at: http://www.libtiff.org/
|
|
|
|
|
Check this out.
http://www.paintlib.de/paintlib/
|
|
|
|
|
When i use class wizard to create a class delivered from CCmdTarget and support automation, the wizard defines constructor/destructor as protected.
(I think this has something to do with dynamic construction or something)
This doesn't allow me to create any instance of that class.
So, i just makes the constructor/destructor public and everything
works allright!
Is this a known bug of the wizard,
or i must create those classes in a special way?
What kind of problems can my aproach cause, if any?
- - - - - - - - - - - - - - - - - -
Memory leaks is the price we pay \0
01234567890123456789012345678901234
|
|
|
|
|
The guys at Redmond just assumed you'd only want to create a class their way I guess. I use (non-automation) CCmdTarget classes all the time and make exactly the same modification you have done.
Andy Metcalfe - Sonardyne International Ltd (andy.metcalfe@lineone.net) http://www.resorg.co.uk
"I used to be a medieval re-enactor, but I'm (nearly) alright now..."
|
|
|
|
|
I made a tempalte class,like
template <class t="">
class A
{
A();
~A();
}
template<class t=""> A<t>:: A(){};
tempalte<class t=""> ~A<>:: ~A(){};
double click on the function in ClassView Window,I can not goto the definition of the function,
Why?
|
|
|
|
|
does anyone know how to store hexadecimal numbers? cwhich data types can store hex numbers in the form 0xffff1234 and let the compiler readily read it as a hex number and not as a string. is dword such a data type?
|
|
|
|
|
There's no difference between hexadecimal and decimal numbers at all (for a compiler). Store it as a DWORD or a unsigned int and uses formatting functions or streams with hex manipulator when you need a textual representations of the number.
Best regards,
-----------
Igor Soukhov (Brainbench/Tekmetrics ID:50759)
igor_soukhov@yahoo.com | ICQ:57404554 | http://siv.da.ru
|
|
|
|
|
I have a modal dialog box with a button with the function CMyDialog::OnMyButton() hooked to it.
Is it possible to show the dialog box (DoModal) and immediately start the function OnMyButton without wait for the user that press the button ?
|
|
|
|
|
Yes, and its easy too!
Just override OnInitDialog() in you class and call it from there. You'll have to call the base class implementation first to make sure everything's initialised:
BOOL CSomeDlg::OnInitDialog(void)
{
CDialog::OnInitDialog();
OnMyButton();
return TRUE; // Always return TRUE unless you set the focus to a control
}
Andy Metcalfe - Sonardyne International Ltd (andy.metcalfe@lineone.net) http://www.resorg.co.uk
"I used to be a medieval re-enactor, but I'm (nearly) alright now..."
|
|
|
|
|
Yes it's ok, but in this way the function OnMyButton goes in execution before the visualisation of the dialog box.
I want that the function goes in execution just after the visualisation of the dialog box, because inside it there are some partial result to show in the dialog box.
I tried with OnShowWindow but even this goes in execution before before the visualisation.
Thanks in advance Paolo
|
|
|
|
|
Ok, I didn't realise that. There's probably an override you could hook to do what you want here, but I can't think what it could be.
You could try posting a command message to the dialog from OnInitDialog():
CMyDlg::OnInitDialog(void)
{
CDialog::OnInitDialog();
PostMessage(WM_COMMAND, IDC_MYBUTTON, 0);
return TRUE;
}
If you do this, your OnMyButton() handler will be called as if you'd pressed the button yourself. The message will be queued and so will not be processed until the messages before it have been handled - which should include showing and painting the window.
Good Luck.
Andy Metcalfe - Sonardyne International Ltd (andy.metcalfe@lineone.net) http://www.resorg.co.uk
"I used to be a medieval re-enactor, but I'm (nearly) alright now..."
|
|
|
|
|
Great.
It works like I want.
Thanks a lot.
Paolo
|
|
|
|
|
Hi,
You could also use timer.
In the OnInitDialog()
SetTimer(1, 250, NULL);
In the OnTimer()
KillTimer(1);
//Your code
This have worked for me.
|
|
|
|
|
1. How could I move data from a "CString" variable to a "C++ standard string class" variable?
2. How could I move data from a "C++ standard string class" variable to a "CString" variable?
Thanks in advance.
|
|
|
|
|
look into the strcpy function
eg:
char* dest[1024];
CString sSource = "testline";
strcpy(dest, sSource);
|
|
|
|
|
I think this should help (I didn't check)
CString strMfc;
string strStl;
strMfc = "Aaaa";
strStl = strMfc; //1st assignment -> simple
strStl = "Bbbbb";
strMfc = strStl.c_str(); //2nd assignment -> use c_str() for char * conversion
Miroslav Rajcic
http://www.spacetide.com
|
|
|
|