|
Make your own grid...
Do not sound nice, but you can't get rid of the year in a date/time field in access...
- Anders
|
|
|
|
|
anyone out there use this compiler? i find myself opening it 10times more than vc++. the win32 library is amazing. the irc tech support is the best. there is ALWAYS a bloodshed guy there to help people. really the only reason i ever open vc++ is for my interfaces and bmaps
Bill Gates is Linus Torvalds' bitch
Windows bows down to Linux by 2010
|
|
|
|
|
I'm writing program under WinNT environment recently and wants to make it workable in Win95/98. This program has to talk to the Touchscreen driver. This driver has different interface file for 85/98 and NT, but they do share some *.h files (share the main .h file.......for example, i have to access function ABC(). Both W95/98 and NT's interface file have this function (same name) and share the same .h file (ABC.h). So, I just only have to include ABC.h in my program and use this function. If i want to work in 95/98, i just have to put the w95/98 file in my project....same as WinNT.
However, can i put everything in the project and let the program to decide whether using w95/98 or NT. I don't want to have two separate programs in W95/98 and NT.......
Thanks
|
|
|
|
|
its called conditional compilation
or you could detect the os at runtime and switch between diff code blocks but then your code is bigger
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
I'm writing program under WinNT environment recently and wants to make it workable in Win95/98. This program has to talk to the Touchscreen driver. This driver has different interface file for 85/98 and NT, but they do share some *.h files (share the main .h file.......for example, i have to access function ABC(). Both W95/98 and NT's interface file have this function (same name) and share the same .h file (ABC.h). So, I just only have to include ABC.h in my program and use this function. If i want to work in 95/98, i just have to put the w95/98 file in my project....same as WinNT.
However, can i put everything in the project and let the program to decide whether using w95/98 or NT. I don't want to have two separate programs in W95/98 and NT.......
Thanks
|
|
|
|
|
Are there any books about ADO with VC?
I've only been able to find VB ones...
|
|
|
|
|
Hi,
My question is about WH_SHELL hook. When I hook WH_SHELL, the tray does not work correctly when my program is active. For example, when I open a program (when my program is active) its icon does not appear in the tray.
Note that in the hook function, I do nothing. I just call next hook. Moreover, the problem arises only on Win9x/Me. Not on W2k.
Is there anybody who knows the reason for this stupid behavior?
Mustafa Demirhan
|
|
|
|
|
Hi
I've tried to use STL in an MFC project. The subject describes the problem rather well.
The strange about this is that THIS_FILE doesn't exists in the lines where the compiler complains.
I checked what THIS_FILE is, and became even more confused. Why would STL use an identifier used by
the MFC macros ASSERT and VERIFY? Anyone who has solved this?
the compiler output:
c:\program\microsoft visual studio\vc98\include\new(35) : error C2061: syntax error : identifier 'THIS_FILE'
c:\program\microsoft visual studio\vc98\include\new(35) : error C2091: function returns function
c:\program\microsoft visual studio\vc98\include\new(35) : error C2809: 'operator new' has no formal parameters
c:\program\microsoft visual studio\vc98\include\new(36) : error C2061: syntax error : identifier 'THIS_FILE'
c:\program\microsoft visual studio\vc98\include\new(37) : error C2091: function returns function
c:\program\microsoft visual studio\vc98\include\new(37) : error C2556: 'void *(__cdecl *__cdecl operator new(void))(unsigned int,const struct std::nothrow_t &)' : overloaded function differs only by return type from 'void *(__cdecl *__cdecl operator
new(void))(unsigned int)'
c:\program\microsoft visual studio\vc98\include\new(35) : see declaration of 'new'
c:\program\microsoft visual studio\vc98\include\memory(16) : error C2061: syntax error : identifier 'THIS_FILE'
c:\program\microsoft visual studio\vc98\include\memory(17) : error C2091: function returns function
c:\program\microsoft visual studio\vc98\include\memory(17) : error C2784: 'void *(__cdecl *__cdecl operator new(void))(unsigned int,class std::allocator<`template-parameter257'> &)' : could not deduce template argument for 'void *(__cdecl *)(unsigne
d int,class std::allocator<_Ty> &)' from 'void *(__cdecl *)(unsigned int)'
c:\program\microsoft visual studio\vc98\include\memory(17) : error C2785: 'void *(__cdecl *__cdecl operator new(void))(unsigned int,class std::allocator<`template-parameter257'> &)' and 'void *(__cdecl *__cdecl operator new(void))(unsigned int)' hav
e different return types
c:\program\microsoft visual studio\vc98\include\memory(16) : see declaration of 'new'
c:\program\microsoft visual studio\vc98\include\memory(17) : error C2809: 'operator new' has no formal parameters
c:\program\microsoft visual studio\vc98\include\memory(20) : error C2954: template definitions cannot nest
|
|
|
|
|
<<< 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
|
|
|
|
|