|
Look on the bright side, thats one less homeless person to worry about.
-David Delaune
|
|
|
|
|
Randor wrote: Look on the bright side, thats one less homeless person to worry about.
RIght you say! 5 point!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|
|
Buddy, i also igree with you. My 5! for his all reply in this topic.
|
|
|
|
|
|
I have included your tip in my site...!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|
|
I'm using a "for" loop which repeats many times and has the potential to be time consuming. I want to be able to break out of the loop when the user hits some key to cancel the operation. The only way I have found to do this is to call GetAsyncKeyState from within the loop, and break out of the loop when it indicates a key has been pressed since the last check was made.
Is this a good way to do this check, or is there some other, better way?
Thanks in advance.
|
|
|
|
|
Californian2 wrote: Is this a good way to do this check, or is there some other, better way?
A better way is to give a cancel button, and pump the messages manually within the loop.
[ADD] See here[^] [/ADD]
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
What do you mean by "pump the messages manually within the loop"?
|
|
|
|
|
I've modified my previous reply to you to add a reference. Please have a look at it.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Are threads not allowed here?
OK,. what country just started work for the day ? The ASP.NET forum is flooded with retarded questions. -Christian Graus
Best wishes to Rexx[^]
|
|
|
|
|
VuNic wrote: Are threads not allowed here?
I don't see what you're smoking, but threads are allowed here. Mostly, the threads will all be related to Visual C++ / MFC.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
lol PostQuitMessage("Goodnight!");
OK,. what country just started work for the day ? The ASP.NET forum is flooded with retarded questions. -Christian Graus
Best wishes to Rexx[^]
|
|
|
|
|
This operation is actually within a dll, and I won't be controlling various threads.
|
|
|
|
|
no! no multithreading is allowed here
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|
|
I'm going to start getting back "into" some coding again after a hiatus (actually it's a fairly long one, though I did briefly do some stuff for work here). I've always used Visual Studio 6 and C++/MFC. I have a new vista laptop and even after the patches, found that my shiny new VS 2005 that work bought for me doesn't always work properly when writing simple dialog apps with controls. On the whole, that's the kind of thing I would like to do a lot of, though I will try out "proper" MDI applications at some point.
My point is this - I see a lot written now about .NET and C#, am I better off looking at that and learning those from scratch, or should I just refresh and improve my knowledge with C++/MFC in particular. These won't likely be "hardcore" industrial apps, but I would like to write things that are a bit more robust at some point.
I think at work they might well get an old VS installed at some point, maybe even v6, but at home, it seems a shame that I'm a bit suspicious of VS2005 which is newer of course.
Basically, any advice would be welcome, this isn't spam or trying to get controversy or arguments, nor do I really need any cryptic replies like "use what you feel most comfortable with". I'm at a point where I really can think about where to invest a bit of time and self learning and start playing around. If someone can tell me about other IDE's or perhaps quell my fears about VS2005 in Vista (I even read that you need Vista Business - not sure which I have, but I don't have the most expensive version, nor the cheapest) then perhaps I'm Ok just carrying on with simple dialog apps in MFC for now, but am I missing the boat here, is C# and .NET taking over?
|
|
|
|
|
ldsdbomber wrote: or trying to get controversy or arguments, nor do I really need any cryptic replies like "use what you feel most comfortable with"
Unfortunately, all you're going to get are opinions.
Research the options and decide what's best for you!
I personally would not use VC6 anymore if you have VS 2005.
With VS 2005 and beyond you'll have many more options in one package,
include improved MFC, improved C++ compiler, C++/CLI, C#, ...
But that's just my opinion.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
opinions are fine and thanks for yours. I'm sure I did install some kind of 'patch' for Vista but remember that it didn't seem to fix all my issues relating to adding control variables to controls and things like that. I've seen there is a 430 MB VS 2005 SP1 Team Update(what????) and a Vista SP1 Update at 29MB, not sure if they are both part of the same process, I'll see if I can find what it was I installed when i first got the laptop, probably summertime 2007.
cheers!
|
|
|
|
|
Oops I forgot about you mentioning VS2005 not working well on Vista...
It should work fine, so something (obviously) is wrong...
I would recommend installing the VS2005 SP1 for sure. Yes, it is huge - pretty much replaces most of VS haha.
Also, if running your apps from the VS debugger, try running VS as an administrator
if not doing so already (this is no longer required in VS 2008).
Cheers,
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
|
Yeah I saw that before and rolled my eyes
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
ldsdbomber wrote: is C# and .NET taking over?
taking over what?
ldsdbomber wrote: nor do I really need any cryptic replies like "use what you feel most comfortable with"
Yeah that would be wrong anyway. Languages and IDEs are tools. Not every problem is a nail therefore not every solution is a hammer. Hopefully that doesn't sound cryptic to you. While the field of software you work in may not narrow things down to a single answer it might tend to point towards a smaller list. You have not provided us with that information.
led mike
|
|
|
|
|
Well I thought I had provided you with that information. I'm not writing full scale projects, mainly dialog based apps for my own amusement, but with a view at some point to also writing similar tools and utilities for work. As I've not really been "in" the field for a while, now was a good time to get an update as to whether that kind of thing is better done now in the new technology or not
|
|
|
|
|
ldsdbomber wrote: Well I thought I had provided you with that information.
ldsdbomber wrote: at some point to also writing similar tools and utilities for work.
Well I'm not sure how to respond to that. There is a significant difference in the type of software you need to develop if your "work" is in a company that makes robotics or missile guidance systems as opposed to a company the sells books from a web site. These are types of things that might make a significant difference in language and tool choices.
"Once you've heard the truth everything else is just cheap whiskey"
Sheriff Buck Olmstead - the movie Switchback
|
|
|
|
|
I understand that, but probably if it was that serious I'd mention it The fact that it is "simple dialog apps" is a bit of a clue though, it's generally data analysis type things base on the MFC dialog app wizard - so, no, nothing fancy, though on occasion it's data that will be used in a clinical situation so accuracy is sometimes very important in terms of calculations and data flow.
|
|
|
|
|
Based on the information provided I see nothing there that indicates that using .NET and C# would be detrimental. The combination of the language and IDE make it probably the most Rapid RAD combination today. So since you don't appear to have any special considerations that might cause any barriers I would likely choose C# if I were in your shoes.
Also keep in mind that even if you find you have some calculation performance issues, which is unlikely, you can develop a C++/CLI assembly in mixed mode so you can do large calculations in native C++ or even assembler and provide a .NET class as the interface so it can easily be consumed by your C# project.
led mike
|
|
|
|