|
You need to search for the identifier ABFFileHeader in the eeg include files and then #include it. Those errors do not relate to dlls in any way. Then once you have done that
just link to the corresponding .lib for the header file.
|
|
|
|
|
ummmm....
well, this, perhaps?
// HEADER: ABFHEADR.H.
// PURPOSE: Defines the ABFFileHeader structure, and provides prototypes for
// functions implemented in ABFHEADR.CPP for reading and writing
// ABFFileHeader's.
tried compiling with #include "ABFHEADR.H" and here's the error I get now...
Compiling...
abfDLL.cpp
c:\Documents and Settings\administrator\My Documents\Visual Studio Projects\abfDLL\ABFHEADR.H(961) : error C2501: 'STATIC_ASSERT' : missing storage-class or type specifiers
|
|
|
|
|
It might be due to some other include files, that are missing. I dont think there is any declaration like "STATIC_ASSERT" in mfc or win32, so it must be from some other 3rd party library.
|
|
|
|
|
How are you trying to compile this?
I just did it and it worked for me.
I think that STATIC_ASSERT thing is erroneous I greped the src for it and could not find it anywhere.
ANyway I put it axon* in c:\test then just open all the
C:\test\AxonDev\Comp\Ax* and compile them.
THe paths need to be adjusted like I had to prepend 'c:\test' to everything and change
the post link setup for the .lib but thats it.
Regards,
Axe
|
|
|
|
|
Hi
Iam using a structure called "QandA" in my application.I want to store the contents of that structure in a file in a specific format like...
Q1.
Ans1.xyz1
Ans2.xyz2
Q2.
Ans1.abc
Ans2.abc1
.....and so on
Q1,Ans1,Ans2,Q2...etc are the CString member variables.
How can i do this.Iam using a form based application.
|
|
|
|
|
The best way is to replace QandA structure with QandA class. After that, you should write serialization method for your class.
The another way (which I prefer) is using XML file for storing structured data. It is more complex but it is very powerful.
Sincerely Yours,
RadioShark
|
|
|
|
|
RadioShark wrote:
The best way is to replace QandA structure with QandA class
You can write functions for a struct just as well: A class differs from a struct only in the fact that all class members are private by default whereas all struct members are publich by default (but private: and public: work in both!).
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
I would urge you to write your own class serialisation, preferably into XML. In anything not entirly trivial, you need some way of versioning, and XML makes this easier.
You can override the MFC-calls if you like, but you will most probably need to write anything beneath it from scratch. You can use quite a lot of articles on CP about XML and serialisation
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
I have a dialog based application that has a tree control on it and when clicked on any item in the tree another dialog is opened that has two tab pages. I wanted to change the behavious of the application so that is any argument is passed to the application, instead of the dialog with tree opens, the second dialog with tap pages should open. But when i try to call the CTabbedDialog.DoModal() and exception occurs.
Any thoughts why this exception is occuring?
Tariq
|
|
|
|
|
Tariq878 wrote:
But when i try to call the CTabbedDialog.DoModal() and exception occurs
What is the exception? If you are running debug, then the debugger is more than likely going to take you to the code which is throwing the exception.
Michael
But you know when the truth is told,
That you can get what you want or you can just get old,
Your're going to kick off before you even get halfway through.
When will you realise... Vienna waits for you? - "The Stranger," Billy Joel
|
|
|
|
|
hi..
ia m building an application to pass data retrived from DB using MS SQL v.7 and VC++....
No error in the compilation...
but it still not working ..it sould return as response from the target page an error code that detrmine the status of my message (0 mean Message Accepted,otherwise error)...
i have to send it in the following format
http://111.111.111.111:2222/ABC.aspx?user=xxx&pass=ccc
this the code......
--------------------------------------------------------
{
UpdateData(true);
DWORD dwRet = 0;
CHttpConnection* pServer = NULL;
CHttpFile* pFile = NULL;
CString strFormData ;
CString error_no;
//CString strHeaders = _T("Accept: text/plain, text/html, text/*\r\n");
CString strHeaders = _T("Content-Type: application/x-www-form-urlencoded\r\n");
CDatabase db_mssql;
CString sqlS,sqlU,sqlI,m_txt;
CRecordset *m_rec = new CRecordset ( &db_mssql ) ;
CHttpConnection* pConnection;
BOOL F2=false;
CString infostr ;
SYSTEMTIME *ptime = new SYSTEMTIME ;
CInternetSession session("MyConn");
int nport=1427;
try
{
pConnection =session.GetHttpConnection(m_EIP+":2222");
//pConnection =session.GetHttpConnection(m_EIP,(INTERNET_PORT) nport);
}
catch(CInternetException* pEx)
{
MessageBox("Error in Connection");
pEx->ReportError();
pEx->Delete();
OnOK();
}
pFile = pConnection->OpenRequest(CHttpConnection::HTTP_VERB_GET,"/ABC.aspx");
MessageBox(pFile->GetFileURL());
pFile->AddRequestHeaders(strHeaders);
//........statemets to retrive the data from DB
m_txt.Format("%s %s",m_EUN,m_EUN);
strFormData = _T("user="+m_EUN+"&pass="+m_EPW");
F2=pFile->SendRequest(NULL,0,(LPVOID)(LPCTSTR)strFormData,strFormData.GetLength());
if (pFile->QueryInfo(HTTP_QUERY_FLAG_NUMBER, ptime) ==0 )
{
m_DATA.AddString(_T(pFile->GetFileURL())+"?"+strFormData);
m_DUN=_T(pFile->GetFileURL())+strFormData;
m_rec -> MoveNext( ) ;
}
else
{
m_DATA.AddString("!!!!!!!! ERORR !!!!!!!!!!!");
}
************************
Please any piece of information to help me I need it argent.....
|
|
|
|
|
Hello,
First off, let me say that I'm fairly new to ActiveX controls, so I'm probably missing something obvious, but here's the situation.
I'm trying to use the Microsoft Office Spreadsheet 11.0 control in a dialog application. I've gone through all of the steps to get the class added to my project. I found the control in the Registered ActiveX Controls folder and selected it, I left the default classes selected and it appeared to create all of the wrapper classes without any major hiccups.
The problem comes when I try to compile the program. I get many errors (around 35) which read:
error C2440: 'type cast' : cannot convert from 'struct IDispatch *' to 'class CSpreadsheet'
No constructor could take the source type, or constructor overload resolution was ambiguous
The errors occur in various classes, but invariably the function causing the error has this structure:
CSpreadsheet CXmlMaps::GetApplication()<br />
{<br />
LPDISPATCH pDispatch;<br />
InvokeHelper(0x60020004, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&pDispatch, NULL);<br />
return CSpreadsheet(pDispatch);<br />
}
The problem seems to be calling the CSpreadsheet (one of the wrapper classes created by the ActiveX wizard) constructor, but CSpreadsheet doesn't appear to have any constructors defined. It's derived from CWnd, so I don't think there are any suitable constructors there either. I've been able to successfully use some of the simpler ActiveX controls (such as the Calendar control), but it seems to hang up on this one for some reason. Any insight would be helpful. I hope I've explained it well enough.
Thanks!
JD
|
|
|
|
|
I'm using this code to draw on a dialog box and had a quick question.
CClientDC dc (this);
CRect rect;
GetClientRect (&rect);
dc.SetBkMode (TRANSPARENT);
CFont font;
font.CreatePointFont (100, _T ("Arial"));
CFont* pOldFont = dc.SelectObject (&font);
CString str (_T ("Hello World"));
dc.TextOut (rect.Width () - 100, rect.Height () - 200, str);
dc.SelectObject (pOldFont); I just want to know if this is the best way to write on a dialog without using a control of any type? I thought of another question that'd I'd like to ask. If I wanted to print text next to a control on the dialog (say an Edit control) how would I get it's coordinates? I've tried using GetClientRect and GetWindowRect (both with and without using ScreenToClient), but neither of them gets the right position of the window. Any help is appreciated. Thanks.
- Aaron
|
|
|
|
|
I am developing a dialog app in Vc++ that uses a Property sheet and adds 1 page to it . the page has 2 grid controls(specifically #grid) as its main item and also a Child Dialog that it creates .
Here is the heirarchy
MainDialog (Memory allocation and deallocation, calls to the COM server)
PropertySheet , ComServer
PropertyPage (grid controls , XML parsing using MSXML & memory allocation and deallocation)
ChildDialog (painting the window)
Also there is 500 bytes of memory allocation and the same is being deallocated . I need to do this 2 times .
I do this using calls to "new " and make sure that i delete the array when not needed .
Plus i have some interaction with a COM server in my code .
Finally in one of the child windows created by the page , i do some custom drawing by implenting code in the OnPaint method of that Dialog class .
out of curiosity i was monitoring my app's memory usage in the Windows task manager and found that
During startup the mem size was around
2500 k
After i invoke a CFileDialog in the code and open a file , (perform some XML parsing using MSXML) the mem usage was
8000 k
and then it keeps on increasing . till it gets stable around 12000 k .
I am wondering why my app's mem usage is so high and shouldnt it change when i delallocate memory ?
Is this a true measure of my apps performance ?
I need to have some pointers(no pun intended) whether there is some critical performance issue here !
|
|
|
|
|
i have 2 dialogs(2 classes) set up as 2 tabs on another dialog in an SDI application, each tab has edit box controls and such... how can i share data between these 2 tabs or share members data between these 2 classes?
what i am trying to do is get the filename from the first class (in a cedit control or a member variable) when i am on the second tab
thanks for helping this newbie
|
|
|
|
|
Cant u have this data as part of(member variable) the other dialog that holds these 2 dialogs ?
or declare it in CMainFrame and then declare it as extern , wherever u need to use it !
|
|
|
|
|
well, i can set a global var and solve my problem, but im wondering how to share data between 2 dialog classes or perhaps between a view and a dialog
thanks
|
|
|
|
|
Can't you make the datas members of your CDoc-derived class? Or, if that violates your application logic, have a data variable in the common parent of the two dialogs. Dialogs should IMHO never hold any data, just display and validate it. The data is to be stored in the document.
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
In this line of code :" WSAStartup(0x0101,&wsd) " can somebody tell me what the " 0x0101 " stands for ??
Regards,
Kapil
|
|
|
|
|
|
kpatry wrote:
...can somebody tell me what the " 0x0101 " stands for ??
In general, or in the context of the WSAStartup() function?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Give me both.. in general and in the context of WSAStartup()
cheers,
Kapil
|
|
|
|
|
In general, it is the base-16 representation of 257. In the context of WSAStartup() , it is highest version of Windows Sockets support that the caller can use, with the high-order byte specifying the minor version (revision) number, and the low-order byte specifying the major version number.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
|
LRESULT CT71View::OnGoodbye(WPARAM wParam, LPARAM lParam)
{
// message received in response to modeless dialog OK
// and Cancel buttons
TRACE("CT71View::OnGoodbye %x, %lx\n", wParam, lParam);
TRACE("Dialog edit1 contents = %s\n",
(const char*) m_pDlg->m_strEdit1);
//m_strEdit1 ismembervariable of the edit control in dialog control
m_pDlg->DestroyWindow();
return 0L;
}
onGoodbye the message function is written by the user herself.
i want to know :first,What is the meanin of "LRESULT",why to add it?when to use it?
second,why "return 0L",Why not "return 0" only?
thank you!
|
|
|
|