|
No, I haven't created, it's MSChart component (MSCHRT20.ocx).
I've tried in debug mode and the crash is at winocc.cpp file, line 345 that is:
ASSERT(m_pCtrlSite != NULL); // not an OLE control (not yet, at least)
Do I have to do something else than "regsvr32 MSCHRT20.ocx" ???
Thanks,
Marc Soleda.
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
I've finally found that the crash is because I'm trying to modify some properties of the MSChart. The real problem is that the MSChart is not viewed in the computer without Visual Studio installed and then crashes when I modify properties because when I call the MSChart::Create method to create it dynamically at runtime it return FALSE but I can't find the reason.
So, what else do I need to do if I've registered it ("regsvr32 MSCHRT20.ocx") ???
Thanks,
Marc Soleda
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
have you registered the OCX on the target computer?
from cmd prompt type:
regsvr32 mschart.ocx
assuming that mschart.ocx is the filename
|
|
|
|
|
ahz wrote:
regsvr32 mschart.ocx
Yes, I did it and it's displayed in the problematic machine if I've added the component by dragging it to the dialog from components toolbox but if I create it dynamically (CMSChart::Create) it fails.
Thanks,
Marc Soleda
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
I know it has been a while since anyone has posted a comment here, but I just had to say something....
I have been working with MSChrt20.ocx for almost a year now and I have never been able to use CMSChart::Create. I think it has major problem that will not work at all.
I have noticed may problems with MSChrt20.ocx that I had to fix in my wrapper class. This is one that I have been unable to fix.
Chris
|
|
|
|
|
Thanks Chris!! I don't remember how I solved it (it has passed a year) ...
... she said you are the perfect stranger she said baby let's keep it like this... Dire Straits
|
|
|
|
|
There are many kind of visual c++. Got vc++ enterprise,.net,6.0,professional and so on. Is it the programming for all of the software is the same?
my degree project is about sound recognition of coin.i will use pc microphone to detect coin dropping sound and i will use vc++ to interface with the pc sound card.moreover, in the gui in vc++, i'll do fft and artificial method to differentiate each kind of coins. i'm a beginner of programming. can anyone give some opinion what kind of vc++ is suitable for my project?
thx a lot for ur help. may god bless u all.
|
|
|
|
|
C++ is C++.
now, the difference bitween all the IDE and the plateforms is the functions you call. some exist under windows and not under linux, and vice versa.
now, you can do absolutely what you want with Microsoft Visual C++ ; MFC allow you to, but win32 too.
see here[^] for an FFT implementation.
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
I should think any. Your biggest isssue is that this will probably need signal processing libraries so choose VC++6 or.NET depending on the libraries you can get.
At a rough guess FFT and power spectrum will be very useful.
Elaine
The tigress is here
|
|
|
|
|
meiyueh wrote:
There are many kind of visual c++. Got vc++ enterprise,.net,6.0,professional and so on. Is it the programming for all of the software is the same?
See here and here as a starting point.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
I want my file open dialog to remember detail view settings i.e sort orders for each column during the my app is running. I am able to save view types i.e list, thumbail etc currently. But now need to remember sort order for detail view as well. Can any one help?
Tejan
|
|
|
|
|
Hi all,
How can I know at the beginning of the application (InitInstance) if an OCX component is registered?
Thanks in advance,
Marc Soleda
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
Depends, easiest way is simple to try to create a instance of it, while if succeeded, then it's registered, if failed, it's not registered.
Or you can scan registry for the registration info (see e.g. HKCR\CLSID\{classId of your component} )
You have to have the com model already initialized (CoInitialize called).
|
|
|
|
|
I have an ISAPI filter to listen to particular URL patterns like http://lavanyadeepak/myblogs/lavanya/ http://lavanyadeepak/myblogs/deepak/ The filter needs to redirect to a particular webpage called http://lavanyadeepak/webpagerouter.aspx
The filter would actually set a header called X-BlogName (to deepak or lavanya or whatever). My WebForm would then read the data from database based on this Header value (Request.Headers collection) and display the appropriate weblog.
The problem is that ISAPI filter is able to set the Header but the header does not come in the Request.Headers collection in webpagerouter.aspx
Any idea where it is getting disturbed?
Vasudevan Deepak Kumar
Personal Web: http://www.lavanyadeepak.tk/
I Blog At: http://deepak.blogdrive.com/
|
|
|
|
|
How can i change the bk color of listview header in the report view? Can anybody tell me or suggest a solution, please?
|
|
|
|
|
Create a custom Listview by deriving your listview from CListView and then override its Paint functions. This way, you will be able to do whatever you want to do with the ListView. There are some articles here on this as well. Search Code Project for this.
[edit] Check here List Control[^][/edit]
Steve Mayfield: "Coding in VB is like riding a tricycle...once you figured out how to peddle, its really hard to fall off."
My Articles
|
|
|
|
|
Hello All,
I am developing a sample SDI application in VC++ 6.0 on Windows 2000 Professional. My view class is derived from "CFormView". I am using this List control taken from http://www.codeproject.com/listctrl/xlistctrl.asp on my Form.
Creation and initial display are proper and when i try to add an Item it gives access violation.
Here is the code used to update the List control.
BOOL CMyView::UpdateList (int l_iRow, CInfo *l_oInfo)<br />
{<br />
CString l_strTemp;<br />
int l_iRowCount = 0;<br />
<br />
l_strTemp.Format ("%d", l_oInfo->m_lID);<br />
<br />
<br />
if (l_iRow == -1) {
<br />
l_iRow = m_oTabList.GetItemCount ();<br />
m_oTabList.InsertItem(l_iRow, l_strTemp, RGB(255, 0, 0), RGB(255, 255, 255));<br />
} else {<br />
l_iRow--;<br />
m_oTabList.SetItemText (l_iRow, l_iRowCount, l_strTemp);<br />
}<br />
l_iRowCount++;<br />
....<br />
<br />
If I debug and see the above function is executing fine. but it fails while drawing the items in Line Number 842 of XListCtrl.cpp in Function "DrawText
<br />
m_HeaderCtrl.GetItem(nSubItem, &hditem);<br />
In the GetItem the m_hWnd is NULL so code in AFXCMN.INL gives Access Violation
<br />
_AFXCMN_INLINE BOOL CHeaderCtrl::GetItem(int nPos, HDITEM* pHeaderItem) const<br />
{ ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, HDM_GETITEM, nPos, (LPARAM)pHeaderItem); }<br />
Since ASSERT won't execute in Release mode it is working fine in Release mode.
The code used to insert column is below
<br />
m_oList.SetExtendedStyle(m_oList.GetStyle() | <br />
LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES);<br />
<br />
m_oList.InsertColumn (0, _T("ID"), LVCFMT_CENTER, 40);<br />
m_oList.InsertColumn (1, _T("No"), LVCFMT_CENTER, 80);<br />
m_oList.InsertColumn (2, _T("Time"), <br />
LVCFMT_CENTER, 120);<br />
<br />
After this code I am inserting new items.
Can any one suggest what may be the problem.
Thanks in Advance
Ravi
|
|
|
|
|
Ravi Sankar S wrote:
m_HeaderCtrl.GetItem(nSubItem, &hditem);
In the GetItem the m_hWnd is NULL so code in AFXCMN.INL gives Access Violation
Check how m_HeaderCtrl is initialized. The m_hWnd in GetItem is the one from m_HeaderCtrl, which does seem to be an initialized object in your case.
Ravi Sankar S wrote:
Since ASSERT won't execute in Release mode it is working fine in Release mode.
I would not rely on such a statement. If it fails in Debug, it does not work either in Release, it is only that the problem does not assert immediately (the effects of what goes wrong does not show immediately). But it can bring unexpected (and sometimes unrelated) errors later for the program user ... So better be sure to find what goes wrong.
~RaGE();
|
|
|
|
|
How can I verify that an item i write is not member of data list ?
I studie my self
|
|
|
|
|
CCOmboBox* pCB = (CComboBox*)GetDlgItem(IDC_MY_COMBOBOX);
CString strSomeText = <font color=gray>"Hello World !!!"</font>;
<font color=blue>if</font> (m_pCB->FindStringExact(-1, strSomeText) == CB_ERR) {
<font color=green>
m_pCB->AddString(strSomeText);
}
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Friends,
My process is running and it is loading DLLs, calling functions exposed by DLL, unloads DLL if it is loaded dynamically. Ofcourse my program also uses static DLLs and calls functions inside it.
I want to know during the course of the execution of my process that which DLL is loaded by it and which function inside the DLL the process is calling.
How can i do so ? Is it possible with VC++ debugger, or some tool ?
Of course it is easy to find that which DLL is loaded by my process. The problem is to find that which function inside that DLL the process is calling ?
Imtiaz
|
|
|
|
|
You can use DepencyWalker (a tool that is provided with visual Studio) to check which dll's your program needs. But you cannot see which functions will be used. And of course, this is not for dll's that are loaded explicitely (using the LoadLibrary and GetProcAdress functions).
In your question, what do you mean by 'real time' ??
|
|
|
|
|
No, not dependency walker.
Actually i want to know during the course of the execution of my program that which DLL is loading and which function inside the DLL is being called by my process.
Imtiaz
|
|
|
|
|
|
Do you mean 'real time' or 'run time'. I DO KNOW that people get the two terms confused.
If you indeed meant RUN TIME, then attach to your program with the debugger and single step through it. You can also write a hooking routine to catch LoadLibrary calls, which will alert you to another DLL being loaded. With a DLL loadded, it will consume a certain range of memory. Watch for the CPU instruction pointer to go into that range of memory - a clue that the DLL's code is being executed. Needless to say, DllMain will have to be called within the DLL, but you can probably filter that one out. You cna probably use DumpBin to get the offset addresses of the functions wihtin the DLL. If you could map those against its load address, then you would know which addresses more specifically relate to which functions within the DLL.
|
|
|
|