|
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
|
|
|
|
|
The auto conversion does not help.. And i have many errors.
Help...
limitless
|
|
|
|
|
I recommend that you post a resonable cross section of those errors or any replies you do get will just be speculation and speculation on your capabilities is probably just as likely as speculation on your problem.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
Pick one error that happens a lot, check MSDN or google to see if it's a new "feature" of VS2008.
if it's a new "feature", you can probably define something to override it.
other than that, pick one error and fix it, go to next error and repeat.
|
|
|
|
|
limitless wrote: And i have many errors.
For instance...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
|
I need help on just re-writing this function I created to something else that also functions the same for a friend of mine to use. Here is the function code:
*These are just input parameters
NoErrors is a Bool: passed by reference
amp is an int: passed by reference
string g[]: an array
string key: just a string
void Check(string g[], int& i, bool& NoErrors, string key)
{
while(g[i].length()!=4) //Checks to see if it is 4 letters
{
g[i]="";
cout << "Please enter 4 colors!" << endl << endl;
cin >> g[i];
}
NoErrors = IsStringLike(g[i], "RGBCMYrgbcmy"); //Checks for right input
// The IsStringLike is a function I also have but that does not need to be changed
// If checks to see if the string is like the characters in "RGBCMYrgbcmy"
while(NoErrors == false && g[i]!="Fred")
{
g[i]="";
cout << "Please enter appropriate colors!" << endl << endl;
cin >> g[i];
NoErrors = IsStringLike(g[i], "RGBCMYrgbcmy");
}
//Fred Cheat - allows user to display the code before the game is over
if (g[i] == "Fred")
{
cout << key << endl << endl;
g[i]="";
cin >> g[i];
while(g[i].length()!=4) //Checks to see if it is 4 letters
{
cout << "Please enter 4 colors!" << endl << endl;
cin >> g[i];
}
NoErrors = IsStringLike(g[i], "RGBCMYrgbcmy"); //Checks for right input
while(NoErrors == false && g[i]!="Fred")
{
cout << "Please enter appropriate colors!" << endl << endl;
cin >> g[i];
NoErrors = IsStringLike(g[i], "RGBCMYrgbcmy");
}
}
} // End of function
This function is an error checking function and it checks for valid input in a game I'm creating. I hope that the comments in the code are suffice for you to understand what that particular part does. I just need to somehow alter this code and make sure it still does its basic function but written different. It's a little hard to alter something and make it work the same as the initial function. Please email me if you have any questions. Thanks for your time! I hope you can help.
|
|
|
|