|
He had an EXE and put member variables in the CWinApp-derived object. He wanted to keep that same system when he moved the code into a DLL.
--Mike--
http://home.inreach.com/mdunn/
This posting is provided "as was" with no warranties, guarantees, lotteries, or any of those little bags of peanuts you get on planes. You assume all risk for crossing the street without holding mommy's hand. © 2001 Mike's Classy Software. Member FDIC. If rash develops, discontinue use.
your with and
|
|
|
|
|
Ah, I see. I just read that he wanted to move the view and doc classes to a DLL. I kinnda figured that since the frame wasn't moved into the DLL then the data should stay in the EXE CWinApp. But I missed the "to be used in other projects" part. This would imply that the data in CWinApp belong to the view/doc classes and not to the CWinApp. So shouldn't it be put in either DLL static data storage or in document members?
Cheers
Steen.
"To claim that computer games influence children is rediculous. If Pacman had influenced children born in the 80'ies we would see a lot of youngsters running around in dark rooms eating pills while listening to monotonous music"
|
|
|
|
|
It looks like the compiler's erroring at the "CArray" part. Have you #included "afxtempl.h" ?
--Mike--
http://home.inreach.com/mdunn/
This posting is provided "as was" with no warranties, guarantees, lotteries, or any of those little bags of peanuts you get on planes. You assume all risk for crossing the street without holding mommy's hand. © 2001 Mike's Classy Software. Member FDIC. If rash develops, discontinue use.
your with and
|
|
|
|
|
I just realised, you probably typed the < and >, but it got removed because it was parsed as a HTML tag. In that case, check out Michaels suggestion, but you're still not using STL.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
|
|
|
|
|
I have created 2 toolbars below the menu bar at the top of the window as usual.
They are dockable.
However, they appear in 2 separate rows and are too short. I want them to be in a row.
How to arrange them into the same row such that the 2nd one is on the right of the 1st one?
thanks
|
|
|
|
|
The CGSToolbar class on this site has this method
void CGSToolbar::DockBarNextTo(CControlBar* pDockedBar, UINT nDockBarID)
{
ASSERT_VALID(pDockedBar);
CFrameWnd* pFrame = pDockedBar->GetDockingFrame();
pFrame->RecalcLayout();
CRect rect;
pDockedBar->GetWindowRect(&rect);
rect.OffsetRect(1,1);
pFrame->DockControlBar(this,nDockBarID,&rect);
}
I originally had it as an external function, so it works that way, too.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
|
|
|
|
|
Sirs,
until now I have not used any databases, I just did what any underdeveloped programmer in the stoneage must also have done, namely storing data in house made text files, and reading them from my app.
Now that the future has begun I decided to go with it, and I am spiritually prepared to learn.
But there are so many of abbreviations like ADO, DAO, ODBC, SQL etc. that I am pretty confused which way to go so that I can learn something useful and on the other hand not to have to deal with the whole universe at once.
My data mainly comes from charts, and different engineering databases which rarely have thousands of elements rather less. On the user side I also wanna avoid special requirements, at most MS Office.
Could you please share your ideas as to where to start?
Thank you.
Bunburry
Experience is of no ethical value. It is merely the name men give to their mistakes.(O.Wilde)
|
|
|
|
|
I find ADO to best the best option nowadays. It's very simple to get started with and there are plenty of examples in MSDN and the Platform SDK. ADO is a wrapper for ODBC/OLEDB and is probably the best place to start with databases. It can connect to pretty much any database from Access to SQL to Oracle providing you have the latest version MDAC installed.
The thing I like about ADO is that I can pretty much take the same code from C++ to ASP to Visual Basic without too many headaches.
Michael
|
|
|
|
|
Micheal, i'm developing an MFC app that will use a database for primary storage. What special requirments would ADO have? I need to be able to set the app up relitavely easily on other machines once finished. Also, is it easier to grasp than DAO?
ARGH! My head hurts... too many TLA's.... :
---
"Transmit in all known frequencies and in all known langauges, including Welsh."
|
|
|
|
|
ADO requires MDAC to be installed. This comes with Office but is a simple download from Microsoft. I find ADO easier to use than DAO but I haven't used DAO in 4 years.
I use ADO in MFC apps, using one of the ADO wrapper classes found on CodeProject. Download some of the ADO classes here on CodeProject and compare them to your DAO code.
Michael
|
|
|
|
|
Guys I Used DAO for years, but when I Knew ADO I said GUAU. Is for that I made the ADO Classes equal to DAO Classes, for made easy to use ADO for the programmers that want to learn ADO....
Best Regards....
Chau!!!
Carlos Antollini.
|
|
|
|
|
I too have come from the text file storage area, but i'm working on a project which is going to require large amounts of data (including archived data), so holding everything in arrays is a bit stupid...
I'm currently learning DAO, which is a framework for interfacing with the MS Access engine (called the ket database engine). SQL (Structured Query Language) is the langauge you'll use to query data (try the SQL view in MS access once you've constructed a simple query to view the code). I don't think DAO would suit you much since you siad you want to avoid special requirements - DAO involves setting up a database using MS Access beforehand. ODBC is perhaps the way forward for you.
I'm sure you'll have some helpful replies, i'm not really that experienced with databases as of yet.
---
"Transmit in all known frequencies and in all known langauges, including Welsh."
|
|
|
|
|
The best one to learn is ADO because it allows you to specify the database location at runtime without playing with ODBC. Also, ADOX allows you to create your own databases from scratch.
ADO does tend to bite you in the bum a lot, for example, I found out the hard way that calling MoveFirst() on a recordset with no records crashes pretty damn hard. You might like to search this forum for ADO, I know Hazi and myself have both asked a lot of questions here to get over the initial learning hump and you'll probably save yourself some hassle. Other than that, obviously keep asking questions as you learn.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
|
|
|
|
|
Hi,
Well, I recommend you to use ADO, it´s more or less "modern", quite easy to use, and quite powerful, but that´s only to work wit the data, to visualize it you have to use some ActiveX controls ( for example a free on it´s DbGrid that it´s shipped with VStudio).
Here in Codeproject you can find a lot of help on that.
An easier to use thing could be ODBC, but is more or less the same job...
HTH
Braulio
|
|
|
|
|
Hello there,
I have an application called UDPApp (I am trying to write a UDP server) in MFC. Now in the menu I have an option "File>Listen Port" to decide which port the server will listen to for requests.
What I want is that when the user clicks on the menu option Listen Port, he gets a dialog box called ListenBox. (ListenBox is a member variable of the view class UDPAppView).
So I have the following message handler in the UDPAppView.cpp file
void CUDPAppView::OnFileListenport()
{
if (ListenBox.DoModal() == IDOK) {
//Code....
}
}
According to my expectation, whenever the user clicks the menu option "File>Listen Port", the message handling code in UDPAppView.cpp should get executed and I should see the dialog box.
But the problem is that nothing happens when I click File>Listen Port!!!
Help me someone PLEASE!!
Thanks,
Mike
|
|
|
|
|
Is the code at the top of the .cpp and in the .h file to link this function to this message intact ?
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
|
|
|
|
|
Hi there ! I am trying to get a start with the WTL .
I am using it in a DLL if that is important I got all compilation issues resolved I also added an
extern CAppModule _Module;
and the local declaration for it in an implementation file
CAppModule _Module
This way I got all unresolved externals resolved, except one, and I just don't know what I need to link to get it away.. this is the error:
error LNK2001: unresolved external symbol __imp___CrtDbgReport
Anybody knows whats going on here ?
|
|
|
|
|
How can I in code to change the picture that appear in my picture control - load another bitmap(IDB_BMP1) from my resources.
|
|
|
|
|
With ::LoadBitmap() or LoadImage() functions
If you are using the CStatic class After that you can use CStatic::SetBitmap(HBITMAP) where HBITMAP is the Handle that you got in one of the first functions...
Best Regards....
Chau!!!
Carlos Antollini.
|
|
|
|
|
|
Don't mention it...
We are for help us!!!!
Best Regards!!!
Chau!!!
Carlos Antollini.
|
|
|
|
|
Carlos, me parece que lo quisistes decir es, "Estamos aqui para ayudarnos", verdad? Si es asi, entonces se dice: "We're here to help each other".
Chao,
Alvaro
|
|
|
|
|
What was it? Spanish? Brazillian? or Cuban?
Sounds interesting though.
// Fazlul
Get RadVC today! Play RAD in VC++
http://www.capitolsoft.com
|
|
|
|
|
Dear Fazul...
It was Spanish, Alvaro was correcting me because my English is not good.
Alvaro: gracias por corregirme, tengo que ponerme al día con mis clases de Ingles.....
Buen Fin de semana.
Good Weekend....
Carlos Antollini.
|
|
|
|
|
Yeah, I could smell that:
corregirme (correction?)
Ingles (English?)
Have a nice weekend.
// Fazlul
Get RadVC today! Play RAD in VC++
http://www.capitolsoft.com
|
|
|
|