|
<<< In the name of GOD >>>
Hi all.
I want to run my program(Editor.exe) in other computer.
But the computer indicate error about MFC42D.DLL to me.
I know that i must create setup disk, but i don't know using of InstallShield.
So please write to me using of InstallShield (step by step).
Thanks for reply.
Hadi Rezaie
|
|
|
|
|
You dont need to use InstallShield. Use winzip and add this dll to the zip file.
Or link the MFC statically to your program!
Mustafa Demirhan
|
|
|
|
|
And one more think...
Dont use your program's debug version in you distributions. Use release versions instead.
Mustafa Demirhan
|
|
|
|
|
Occasionally, I find it easier to build an MFC Project by cloning an existing Project.
The way I do this is to copy everything to a new directory, rename the Workspace/Project files etc., then Edit the Workspace/Project/etc., files replacing all occurrences of the old names with the new ones.
It works, but it seems a bit "messy".
Is there a better way to do this?
Bryan.
|
|
|
|
|
I've written a file renaming program and a multiple-file
text replace program. I use them to do the same thing
and it only takes a few steps. I can send you the exe or
the source if you wish.
Daniel
"das leid schlaft in der maschine" -Einstürzende Neubauten
|
|
|
|
|
How about putting on a website? - I'm sure lots of people would like something like that.
Christian Skovdal Andersen
|
|
|
|
|
Hi,
This is what makes me nervous:
This is my first major software project. I've been moving along at a great pace, adding feature after feature, which management are pleased with. However, I know there are bugs in the software, bugs that cause lockups, blue screen of death and unhandled exceptions. I have tried to keep a simple and clean design, and use exception handling wherever possible. But what If I get to the end of the project, every feature we need is in, but it crashes every 10 minutes? And what if I cannot find what is causing it?
Now you XP'ers out there would probably tell me, that I shouldn't even get to that point, because I should "test first!" The fact is I haven't been able to do that all the time, especially due to the graphically intensive nature of the software.
So what do I do? Do I try and fix them now, however long it takes? Or is it okay to allocate 3-4 weeks soley devoted to getting rid of them? Should I buy a program like Numega BoundsChecker? Should I look at hiring some 'gurus' as consultants to tell me where I'm going wrong?
Regards
Brendan
|
|
|
|
|
I hate to say this, but you've dug a hole for youself here. It sounds like you haven't been fixing bugs as they come up, but instead you plan on doing all your bug-fixing at the end. This has several problems: 1) The product has a lot of features working, so to outsiders it looks like it's closer to completion than it is. 2) There's more code there, so there's more code to search through looking for the causes of bugs. 3) You have a greater chance of a bug fix breaking something else.
Suggestions -
Resist the urge to throw more people at the project. If they don't know the code, they will need a lot of time to come up to speed, and might not understand side-effects of their bug fixes, which may cause other bugs.
Fix your bugs now. Your alternatives are to cram like mad up until your ship date, or release the thing and hope no one notices the crashes. Do either of those really sound like something you want to do?
Be honest with management and say you've got a lot of serious bugs, and you'll need x extra weeks of time. If they say no, stand up to them - you know the state of the product, they don't. Also mention that releasing emergency patches later will cost money and make the product look bad.
--Mike--
http://home.inreach.com/mdunn/
All your base are belong to ME~!
|
|
|
|
|
You should be nervous Brendan. For every bug that you KNOW exists there are 10 more that you haven't seen. Not to mention the ones you will introduce by 'fixing' the original problems.
-- Get a copy of 'Code Complete' by Steve C. McConnell. Read it three times. Then read it again.
-- Accomplish the mission. Save the frills for later. Most software projects fail because no-one understood what the precise requirements of the project were. If you haven't created that document then you should stop everything and write down the minimum set of 'features' necessary to sell the program.
-- If you are going to send this product out to a customer then it MUST be rock solid. I have several very large projects and can testify about how much it costs to fix a bug. If you catch it during coding it costs about 1 unit ( just a rewrite of that line ) if the defect leaks into integration then it costs at least twice as much. By the time the customer has the product you don't even want to think about the cost. I have data showing defect costs as high as 11 times what I would have spent to correct it during coding. Are you willing to spend a week to fix EACH of those nagging issues? oops I'm preaching sorry.
-- BoundsChecker is great. I recently completed a Six Sigma project demonstrating that this tool would save my company tens of thousands in development cost just on my project. But... Be prepared to be humbled.
-- Hiring a 'guru' is sometimes cost effective, but not as effective as BECOMING a guru. Just think about the poor stiffs who haven't found the sites like Code Project... makes my head hurt to think about it.
Best of luck!
|
|
|
|
|
You guys are great. I mean, here I am sweating it out with this nagging problem. So I think, "I give up, this is one for those CodeProject maestros...". And now I have a plethora of potential solutions to my problem... more than I could come up with sitting here by myself.
|
|
|
|
|
How can i "transfer" a "*.bmp" or other graphic to a ICON file......so that i don't have to draw by myself.
|
|
|
|
|
Hi,
Curiously, in Windows, if the bitmap is of the right size then you can actually just change the extension to .ico. Of course, it will automatically generate the different sized icons (32x32, 16x16) so they won't be the best thing ever but hey! You could also use a tool like Photoshop to resize the bitmap and then copy/paste it into devstudio.
Hope that helps,
Andrew.
|
|
|
|
|
I have used the IconPro sample program that comes on the MSDN CD
\Samples\VC98\SDK\WINUI\RESOURCE\ICONPRO
---
Multitasking: Screwing up several things at once.
|
|
|
|
|
Well, for the first time (kinda funny really considering the number of MFC projects I've worked on) I have to support help in my application. The application is dialog based. Being new to actually supporting help, when I set up the project I turned on the "Context Sensitive Help" flag when setting up the initial project in Visual C++ 6.0. That gives me the Help button and adds a Help files folder to my Workspace window. When I build it builds a generic (empty) help file for me. Well, I have a technical writer available for this project (who likes Robohelp) so I figured all she'd have to do is give me a help file that I would copy over the default one DevStudio builds for me. I figured all I'd need was the .hlp and .cnt files.
Well, that doesn't work. When I click help all I get is "That topic does not exist. Contact your application vendor.....". If I double-click on the help file outside of the project it comes up just fine. Could someone guide me on the correct steps for merging in this RoboHelp help file into my project?
Thanks,
Matt Philmon
|
|
|
|
|
Hi,
This post is a little lengthy, but I'm hoping that someone out there
will take pity on a former VC++ developer who has been forced into VB
development for the past two years and who would like to move back to
VC++.
I have a project that is in need of a re-write. Now would be the
perfect time to switch from VB COM development to VC++ COM
development. I have a team of people who are in favor of the switch,
but their experience with C++ is not extensive.
In an attempt to make the switch I have sought out these past two
weeks all information I could find on developing ATL components for
COM+. My application is a web site, so the components will be
accessed from ASP pages and the COM components will access a SQL
Server 2000 database.
I have encountered many hurdles. The first of which is that most
tutorials assume that the reader wants to know EVERYTHING about ATL
development. I can't afford for my people to get lost in the myriad
of details. My components do not do much. They receive requests from
ASP pages, access the database, massage data going in or going out and
then pass back results to the ASP pages. Not rocket science. So, I
do not need (initially anyway) to approach issues like aggregation or
containment (except as they apply to object pooling). Second, it is
very hard to locate information on directly needs to be done to ATL
components to allow them to take best advantage of COM+. I know that
there ARE such issues because I stumbled across an MSDN article that
mentioned several issues such as how I must remove the
NON_AGGREGATABLE #define from an object created from the MTS Object
wizard option. Finally, I approached data access this weekend and was
startled to understand that OLEDB is the preferred access method over
ADO. That's all well and good, and I see hoe the wizards made using
OLEDB a snap. However, I have yet to see an example that shows me how
to use OLEDB to execute a stored procedure (I wrap my database in
stored procedures and require that all access go through them). Also,
in VB I had a COM object that represented each table in the database,
but each of these COM objects accessed a single 'accessor' object for
its database access. The OLEDB model (at least the ATL wizard anyway)
sets up a model in which each of my 'table' COM objects would access
the database directly. Is this a standard with OLEDB/ATL? Even if I
use OLEDB and create OLEDB consumers, I currently pass ADO recordsets
around and eventually I pass them to the ASP pages. How is this done
with OLEDB? Do you use a mixture of ADO and OLEDB?
I very much want to make the switch to VC++, but I can't chance a
severe delay in our project schedule. As the most experienced VC++
developer on our team, I have set my understanding of what we need to
do as the baseline for this decision. If I can't figure it out in
short order, then we'll have to stick with VB.
The purpose for this post is to humbly ask for assistance. I'm not
looking for the answers (although I'll take them if you have them),
but rather I am looking for some pointers to resources that you think
might be best for my situation. I have a very short time in which to
make this decision (I would say at most, two more weeks). I do NOT
have to understand everything in the next two weeks, but I need to
feel that I have a handle on everything and that the project is doable
within my time line.
I have a number of books I have consulted:
Beginning ATL 3 COM Programming
Professional ATL 3 COM Programming
Beginning ASP Components
Professional ASP 3.0
Don Box's COM book (I have it, but it's not a great resource at this
stage of my understanding)
I have on order:
Creating Lightweight components with ATL
The Standard Template Library from Scratch (I understand that I will
be using STL a lot in my ATL development - I'm a former MFC coder, so
no familiarity with STL)
Designing Solutions for COM+
My biggest questions of all center on the database access and OLEDB.
I thank you for your time and I thank you in advance for any
assistance you can provide.
Neil Kiser
neil@interaccess.com
|
|
|
|
|
<<< In the name of GOD >>>
Hi all.
My program is Dialog based mode.
I want set font and color for printer.
I use SelectObject but ...
Please example about it.
Thanks.
Hadi Rezaie
|
|
|
|
|
CDC dcPrinter;
CFont* m_pFntCaption = new CFont;
ASSERT(m_pFntCaption);
m_pFntCaption->CreateFont(-80, 0, 0, 0, FW_NORMAL, TRUE, FALSE, 0, ANSI_CHARSET, OUT_TT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_MODERN, "Courier New" );
CFont* pFont = dcPrinter.SelectObject(m_pFntCaption);
ASSERT(pFont);
-80 is the font size -> (4 * -20)--> therefore this is font size 4 (but not same as those MS WORD ..... it's just a number for reference). You can find more info in Help....and search for CreateFont.....
Hope can help
|
|
|
|
|
Please look my program:
CFont *pFont; // It's member variable
.
.
.
In initdialog event:
pFont->CreateFont(...);
Now, in print dialog:
CDC dc;
CPrintDialog Prn(FALSE);
.
.
.
dc.Attach(PrnDlg.GetPrinterDC());
dc.SelectObject(pFont); // BUT WON'T WORK
.
.
.
So, what is my mistake.
ATTENTION: I NEED TO YOUR ANSWER VERY FAST ...
Hadi Rezaie
|
|
|
|
|
I don't know.....maybe you have to get the printer first, then do the font....or.....
but I do everything in one procedure and just call this procedure and print....:
/*
** get the default printer
*/
CPrintDialog dlg(FALSE);
dlg.GetDefaults();
// Get a handle to the printer device context (DC).
HDC hdcPrinter = dlg.GetPrinterDC();
/*
** create a CDC and attach it to the default printer
*/
CDC dcPrinter;
dcPrinter.Attach(hdcPrinter);
//print as landscape
LPDEVMODE pDevMode;
pDevMode = dlg.GetDevMode();
pDevMode->dmOrientation = DMORIENT_LANDSCAPE;
dcPrinter.ResetDC(pDevMode);
// call StartDoc() to begin printing <=======================did you do this part?
DOCINFO docinfo;
memset(&docinfo, 0, sizeof(docinfo));
docinfo.cbSize = sizeof(docinfo);
docinfo.lpszDocName = _T("CDC::StartDoc() Code Fragment");
// if it fails, complain and exit gracefully
if (dcPrinter.StartDoc(&docinfo) < 0)
{
AfxMessageBox("Printer wouldn't initalize");
}
else
{
//start a page
if (dcPrinter.StartPage() < 0)
{
AfxMessageBox("Could not start page");
dcPrinter.AbortDoc();
}
else
{
// Print everything on the screen
CGdiObject* pOldFont = dcPrinter.SelectStockObject(SYSTEM_FONT);
/*
** print caption
*/
//set the font first - Courier New
CFont* m_pFntCaption = new CFont;
ASSERT(m_pFntCaption);
m_pFntCaption->CreateFont(...);
CFont* pFont = dcPrinter.SelectObject(m_pFntCaption);
ASSERT(pFont);
// Print some text...just liked OnDraw
dcPrinter.TextOut(0, 0, CaptionString);
//finished <=======================did you do this part?
dcPrinter.EndPage();
dcPrinter.EndDoc();
dcPrinter.SelectObject(pOldFont);
delete m_pFntCaption; //delete the font
I think you might miss out the StartPage and EndPage...etc....It is exactly what i did in printing...everything in a procedure only...that's it...
|
|
|
|
|
Sorry, may be i made it unclear - i'm not trying to print. I'm trying to
monitor the printer.
|
|
|
|
|
Hi,
Does anyone know how to do the following things when launching the MFC program?
First, start with a Dialog with no title bar, no menu, no button....nothing.....just a picture on it.
Second, hold this dialog for awhile.....let say 5 seconds.
Third, close automatically.
Finally, start the MFC program.
I know how to pop the dialog (DoModal()) and how to wait for 5 seconds...but i don't know how to close the dialog, and how to do it before the program start.
It just likes Internet Explorer...when we launch IE, then it pop a little box...."Internet Explorer 5.0...." then start IE...right?
Thanks.
|
|
|
|
|
EndDialog(IDOK)www.marbus.net
But then again, I could be wrong.
|
|
|
|
|
EndDialog(IDOK)www.marbus.net
But then again, I could be wrong.
|
|
|
|
|
Still don't know how to do...because when i use DoModal() to pop up the dialog, it waits for the user to click "OK or...." but now i won't use button in here and want to use code to make it close.......now my code is:
CxxxDlg xxdlg;
xxdlg.DoModal();
xxxx //make 10 seconds wait...
xxdlg.EndDialog(IDOK);
seems doesn't work....how to fix it?
|
|
|
|
|
Just put up a timer
SetTimer(1, 7000, NULL);
and when WM_TIMER (after 7sec) is called by the framework, just set your
void MyDialog::OnTimer(UINT nIDEvent)<br> {<br> if(nIDEvent == 1)<br> {<br> KillTimer(1);<br> MyDlg.EndDialog(IDOK);<br> }<br> }
I guess, that's what you wanted to know...
Manfred
---
Programming is knowing...
|
|
|
|
|