|
Where is this m_OUTPUT declared ? Post the code about that also. Is it a pointer ?
|
|
|
|
|
CStatusDlg::m_OUTPUT.AddString(e->filename);
c:\Answer\AnswerView.cpp(322): error C2228: left of '.AddString' must have class/struct/union type
type is ''unknown-type''
use this
CStatusDlg m_OUTPUT;
m_OUTPUT.AddString(e->filename);
|
|
|
|
|
i did what u said but still i am getting the error
error C2039: 'AddString' : is not a member of 'CStatusDlg'
m_OUTPUT is declared as list box in CStatusDlg:: class
and e->filename is declared in Index :: class ,
both of them are presernt in 2 differnet class
-----------------------------------------------------
void CStatusDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CStatusDlg)
DDX_Control(pDX, IDC_OUTPUT, m_OUTPUT);
//}}AFX_DATA_MAP
}
------------------------------------------------------
|
|
|
|
|
if you get this error i think CStatusDlg isnt ClisBox
'AddString' : is not a member of 'CStatusDlg' so maybe CStatusDlg isnt from CListBox
|
|
|
|
|
|
maybe you used one variable that isnt from ClistBox
its ture
CListBox m_List;
List.AddString("");//
|
|
|
|
|
Hello!
Is there anybody who has experience in excel automation in BCB4? I am trying to automate ms excel 2000, but I always received errors in run time about invalid class string. I was just trying out these three lines like what a book said:
Variant V;
V = CreateOleObject("Excel App");
V.OlePropertySet("Visible", true);
I hope somebody could help me. Many thanks in advance, folks!
|
|
|
|
|
I have to do graphics in vc++
can you please give any web site or book which can help me in this regard.
I have to add features like zoom in zoom out
Pavan P
-- modified at 3:34 Monday 8th May, 2006
|
|
|
|
|
|
|
This is very vague. Which kind of graphics ? Could you elaborate ?
|
|
|
|
|
HI
Samples are availble in MSDN CD under \SDK\Graphics
KK
|
|
|
|
|
Hi Geniuses,
I saving the toolbar status of my MDI application using SaveBarState (_T("TBStatus")). It works fine. It stores the status in the registry here:
HKEY_CURRENT_USER\Software\Local AppWizard-Generated Applications\MyApp\TBStatus
I want the status to be stored in some other place, specifically here:
HKEY_LOCAL_MACHINE\SOFTWARE\MyApplication\TBStatus
Where "HKEY_LOCAL_MACHINE\SOFTWARE\MyApplication" is the installation entry.
My aim is to remove the toolbar status entry from the registry while uninstalling the application.
If anybody could suggest me a solution, I would be grateful.
Thanks in advance,
Sarvan AL
|
|
|
|
|
|
Hi Nibu,
The SetRegistryKey always stores under "HKEY_CURRENT_USER\Software". But I want to store in "HKEY_LOCAL_MACHINE\SOFTWARE\MyApp". I am using Win2000. But it needs to be done in Win98 and WinXP too.
Is there anyother alternative?
Thanks for your interest.
Sarvan AL
|
|
|
|
|
|
Sarvan AL wrote: Is there anyother alternative?
From the Docs:
If you assign a value to m_pszRegistryKey , it must be dynamically allocated on the heap. The CWinApp destructor calls free( ) with this pointer. You many want to use the _tcsdup( ) run-time library function to do the allocating. Also, free the memory associated with the current pointer before assigning a new value. For example:
free((void*)m_pszRegistryKey);
m_pszRegistryKey=_tcsdup(_T("HKEY_CURRENT_USER\\Software\\mycompany\\myapp\\thissection\\thisvalue"));
Nibu thomas
Software Developer
Faqs by Michael dunn
|
|
|
|
|
Hi Nibu,
Changing "m_pszRegistryKey" value, remains under the hierarchy "HKEY_CURRENT_USER\Software\". If I set this member variable with "HKEY_CURRENT_USER\\Software\\mycompany", the toolbar status is here:
HKEY_CURRENT_USER\\Software\\HKEY_CURRENT_USER\\Software\\mycompany
It not at all changing the root. It has same functionality of SetRegistryKey(..).
Kindly suggest me a path to go ahead.
Sarvan AL
|
|
|
|
|
The root is hard coded. So it will be fixed. One option is to override the GetAppRegistryKey function of CWinApp . The root key is hard coded here. So overriding it and returning a valid key (i.e. your key) will help.
Note: From here on this will be the default key for the application.
The function signature is as follows:
HKEY GetAppRegistryKey();
This is the function that returns the valid key to the application. Only problem being that it's not a virtual function. So if you start using it from a derived class casted to a base class it won't work.
So calls like AfxGetApp()->WriteProfileString(...) won't work as it will call CWinApp implementation. Cast it to appropriate class and use it.
Nibu thomas
Software Developer
Faqs by Michael dunn
|
|
|
|
|
Hi Nibu,
Since I am a newbie to Windows Registry Handling, I am not able to grasp the things exactly. If you could explain me in detail, I'd be grateful. I'd like to know, what is happening behind HKCU and HKLM. Is it very hard to make the UI settings common to all the users?
Thanks for spending your precious time for me.
Sarvan AL
|
|
|
|
|
Sarvan AL wrote: Since I am a newbie to Windows Registry Handling
Then it's trouble. You'll have to learn first. Coz registry is very sensitive to changes. Any wrong action is catastrophic. It could take the entire OS down.
Sarvan AL wrote: I am not able to grasp the things exactly
Only in the beginning.
Sarvan AL wrote: I'd like to know, what is happening behind HKCU and HKLM.
Nothing special is going on.
Sarvan AL wrote: Is it very hard to make the UI settings common to all the users?
Not at all. But first learn how to work with the registry.
Microsoft has provided this set of functions(WriteProfileString is one of them) so that users don't have to break their head writing and reading values from the registry. There are some easy functions for manipulation of registry. Look at what Ganesh said.
All the best.
Nibu thomas
Software Developer
Faqs by Michael dunn
|
|
|
|
|
Hi Nibu,
I really agree with you. As you said, Windows Registry is very sensitive. That's why I didn't want to do anything trial and error. Let me learn the basics first.
Thanks for your suggestion.
Sarvan AL
|
|
|
|
|
Sarvan AL wrote: Let me learn the basics first.
Great! It's very easy. I would recommend open up the registry and see what is inside and understand why it is there.
Sarvan AL wrote: As you said, Windows Registry is very sensitive.
Yes it is! But it's a safe approach to use WriteProfileString ,... and others in that group.
Sarvan AL wrote: That's why I didn't want to do anything trial and error.
Never! First Back Up
Nibu thomas
Software Developer
Faqs by Michael dunn
|
|
|
|
|
Use RegCreateKey to creaet the key under any root. Just you have to specify
HKLM_LOCAL_MACHINE and other parameters
You can set values by RegSetValue or RegSetValueEx
Cab get value by : RegQueryValue or RegQueryValueEx.
you can ermove entry by RegDeleteKey and RegDeleteValue.
Cheers
"Peace of mind through Technology"
|
|
|
|
|
would you please tell me how to set the meflexgrid cell wordwrap?
CMSFlexGrid m_flexgrid;
though I add "m_flexgrid.SetWordWrap(true);" in the code add set the msflexgrid wordwrap true in property tabel, It still can't work.
why?
|
|
|
|