|
desmondling78 wrote:
Oh and one more question. When Visual C++.Net 2005 is released, will Microsoft still sell Visual C++.Net 2003? I am deciding on which to buy, but I wish to wait for the release of Visual C++.Net 2005. (I heard from some Microsoft Spokes person that it is slated for July~Aug released.) I'm just afraid by then, will they stop selling .Net 2003 (as is threatened by my suppliers).
As Christian said, it's due out in November. However, if you want to use VC++ 2003 and not have to pay again, or pay the upgrade price, then it might be worthwhile to get an MSDN Subscription. That will automatically entitle you to VC++ 2005 (VS 2005) when it comes out. Check the options and pricing on the MS site. I think MS are currently selling a package called "VS 2003 with MSDN Subscription."
Kevin
|
|
|
|
|
Christian Graus wrote:
I don't know if VB.NET gets any of that, yet.
It gets generics. I don't think it gets the other two.
Kevin
|
|
|
|
|
You can still develop "classic" (non-.NET) apps in VC8
I am currently converting a largish VC6 Project to VC7.1 & VC8beta2 (VC7.1 so we can release even if VC8 is delayed again)
The 5 major hassles in the conversion:
- Standard-compliant compiler (VC6 -> d, I am a bit sloppy with templates, but there are also many other "fine points" of the standard that make stuff wrong)
- safe string functions (VC7->VC8, strsafe.h, CRT, Windows String helpers)
- header pogo (spent over two days to get the PROPVARIANT's work with #import again, and it involves nasty tricks. Note to self: document them)
- the for loop variable scope (VC8)
- whatever you have now, you need a new monitor
(a top end PC is implied)
Still it's absolutely worthwhile to upgrade. The the straw that broke my camels back were all the template stuff the VC6 compiler dosn't get right. (some template instantiations were not linked even though they were not called. In another case, which took me a week to find and isolate, the wrong template specialization was used. It's so bad we currently release patches in unoptimized builds, and I am stalling all major releases)
My problem is that I have to keep the code compatible between the three (dev goes on on VC6, I need VC7.1 to be "ready for release", and I want to go to VC8 if I go through all the hassle), and I am refraining from the "compatibility switches" (sooner or later I have to give them up)
It is a pain that MS isn't offering "compatibility headers" that make code using the safe string functions and the new ANSI <--> Unicode conversion compile under earleir compilers.
Pandoras Gift #44: Hope. The one that keeps you on suffering. aber.. "Wie gesagt, der Scheiss is' Therapie" boost your code || Fold With Us! || sighist | doxygen
|
|
|
|
|
peterchen wrote:
the for loop variable scope (VC8)
Thought this was fixed in VC7?
Kevin
|
|
|
|
|
I'm not quite sure, maybe if you import a project into VC7, it sets the compatibility option by default.
(With default imported settings, VC7.1 doesn't complain, but VC8 does)
Pandoras Gift #44: Hope. The one that keeps you on suffering. aber.. "Wie gesagt, der Scheiss is' Therapie" boost your code || Fold With Us! || sighist | doxygen
|
|
|
|
|
Not tried that. I think I just started a new project and tried out a loop. I've not really used C++ in anger under VC++ 7.1. Since .NET came out all the C++ work I've done has been under VC++ 6, or else I've been doing C#.
Kevin
|
|
|
|
|
I have a registry in the HKLM\Software\MyReg.
MyReg could have several sub keys
Example
HKLM\Software\MyReg\Prod1
HKLM\Software\MyReg\Wes1
HKLM\Software\MyReg\etc
How can I read all of the subkeys that currently exist under MyREg
using C++6 (non-MFC)
Any help will be greatly appreciated
|
|
|
|
|
RegEnumKeyEx[^] is probably what you want.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Tires to follow the sample code in MSDN, too complicated. Any simplier code available?
|
|
|
|
|
If you want it simpler, you'll need a wrapper class. there are s everal here on CP.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi
I'm working on a project both on my home computer and work computer. I transfer the source and header files using a flash drive. I have two seperate project (.dsw) files, one at home and one at work. I just link the source files in the flash drive to the home or work project and then continue working. However, now that I'm starting to work with the GUI interface, I need to how to transfer the form Graphic back and forth between computers. I can move the source and header file, but not the graphic that you actually lay buttons and menus on. Does anyone know how to move this graphic back and forth?
htuba
|
|
|
|
|
You need to move the resource file, I forget what their file extension is.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
|
I have an ActiveX control that I wrote that is a Simple Frame Control with an Embedded Property Sheet. The sheet has 2 pages with each page having a few controls on it. Here is its basic structure:
- Control Class
---- Property Sheet Class
-------- Page 1 Class
-------- Page 2 Class
This control works fine in the ActiveX Test Container as well as when I put it on a dialog by itself. However, if I put an OK button on the dialog with the control, I end up getting into an infinite message loop with the WM_GETDLGCODE message being sent/handled constantly. I have tried playing around with the DS_CONTROL, WS_EX_CONTROLPARENT, WS_TABSTOP, and WS_GROUP flags for the controls, pages, and the sheet itself as well as the test dialog, but it still ends up in this loop anytime the ActiveX control loses focus and then regains it (e.g. if the OK button gains focus, but is not clicked or if another program is made active and then I return to my test container).
My test container is very simple:
- Dialog class
---- CWnd wrapper for ActiveX control
Has anyone had this problem or know of a possible solution to it?
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
I found a solution. As it turns out, Windows/MFC (not sure which) sets the default flags (regardless of what you turn on or off in the dialog template). To get around this, I had to use ModifyStyle and ModifyExStyle to remove the DS_CONTROL, WS_TABSTOP, and WS_EX_CONTROLPARENT flags from the property pages.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
Zac Howland wrote:
8 hours a day, 5 days a week
Lucky you; you've only got it for 40 hours a week.
Software Zen: delete this;
|
|
|
|
|
Hi there.
I am using
Operating System: Windows XP
Project: Visual Studio 2003 C++ MFC Dialog Based Application
I subclassed an edit box control because I want to capture the WM_KEYDOWN messages when a user enters characters in the edit box. I need this because I want to measure the time interval between keystrokes for the phrase (a password in this case) that the user enters in the edit box.
But I want the user to enter the password twice, once in one edit box and again in another. So I created two edit boxes and then to each edit box added a control variable of type the custom edit box subclass I created.
Now the problem is that when a enter a character in either of the edit boxes, the OnKeyDown function of the subclass is called.
How do I know in which edit box did the user type in the key?
Should I rather create two subclasses for the edit boxes, and create a control variable for the one editbox that is of type: the one subclass, and to the other editbox I add a control variable that is of type: the other subclass?
|
|
|
|
|
Use CWnd::GetDlgCtrlID() .
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
I have a program that hopefully will update itself. I call
this program Setup.
I execute from Setup.exe the file Update.exe which downloads
Setup.txt. I want to close Setup.exe, delete it, rename Setup.txt
as Setup.exe and then reexecute Setup.exe. The only thing I cant
figure out is how to close Setup.exe from Update.exe.
Please, any response any one can give me will be greatly appreciated.
Sincerely,
Danielle Brina (an overworked graduate student)
|
|
|
|
|
DanYELL wrote:
The only thing I cant
figure out is how to close Setup.exe from Update.exe.
Use TerminateProcess() . If the process has a window, you could also post a WM_CLOSE message to that window.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Any chance you have a segment of code that shows how to
terminate a process if you only know the name of the executable
to terminate and where it is located?
So I want to close notepad.exe located in:
c:/temp/notepad.exe
Any ideas?
Please, any response you can give me will be greatly appreciated.
Sincerely,
Danielle Brina (an overworked graduate student)
|
|
|
|
|
Another way to do this is by having Setup.exe pass Update.exe its main window handle (hex representation as a command line arg). When Update.exe wants to shutdown Setup.exe , it should post a private command (eg: IDC_PLEASE_SHUTDOWN ) to Setup.exe 's window, which will cause it to exit gracefully. Setup.exe should wait until the window handle is no longer valid before renaming Setup.txt to Setup.exe and executing it.
I admit this method is a bit cheesy, but it works and is safe.
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib@ravib.com
|
|
|
|
|
Can you show me how to do this? Any sample code?
Please, please any response will be greatly appreciated.
Sincerely,
Danielle Brina (an overworked graduate student)
|
|
|
|
|
to update applications, use an existing updater...
There are a lot here, but this one is mine. It includes code to close another application (see CInstall::CloseApplication() in Install.cpp). Just copy the code if it does what you need.
Geert
Want to spread the newest version of your software automatically for free? Use Updater!
Visit my website: www.gvhsoftware.org
|
|
|
|
|
DanYELL wrote:
The only thing I cant
figure out is how to close Setup.exe from Update.exe.
So don't bother. Pass the process id of Setup.exe to Update.exe as a parameter, then
a) once Setup.exe has started Update.exe, get Setup.exe to shut itself down
b) the first thing Update.exe does is wait until the process with the passed in process ID is not running (EnumProcesses will help here), then it can do all it needs to.
|
|
|
|