|
No, I load workspace using DSP project file.
When I compile it my "workspace" window freezes.
I cannot move aroudn the files , no scroll, and or when I click on any file I get something I assume is pointer failure and the IDE closes. I am not smart enough to troubleshoot the compiler problem like this one.
When I check where the original project DSP file was I got SLN and DSW and some other junk there. When I got rid of the SLN file it partially worked again.
I did get rid of all VS downloads and have no more of this problem. It sure looked like when you are using VS on VC programs and you get the "it was compiled with... do you want to convert to ..." , but it does the conversion half baked and automatically.
I did have some partial 2012 files which never completed the download.
It seem that some of the new stuff will work only in Win7 but it is not advertized as such.
I did not try to run the sln file. It would be interesting what would happen.
Vaclav
|
|
|
|
|
Vaclav_Sal wrote: No, I load workspace using DSP project file. With which version VC or VS2010?
Vaclav_Sal wrote: When I check where the original project DSP file was I got SLN and DSW and some other junk there. So you tried to update the project to a newer version of the IDE; again which one?
Vaclav_Sal wrote: it does the conversion half baked and automatically. That has never happened in my experience. Did you keep backups of your original files?
Vaclav_Sal wrote: I did not try to run the sln file. .SLN files are merely text files containing XML which describes the names and locations of the projects witihn a solution. It is used by Visual Studio to access the project files, and hence the source files and build rules.
Understanding the structiure of Solution and Project files is important when using any version of Visual C++ or Visual Studio. MSDN contains information about them, and Microsoft has a forum dedicated to the subject.
Use the best guess
|
|
|
|
|
Richard,
Fortunately I archive my project after each major task is completed. As far as I know only VS / VC6.0 has DSP project files, but I may be wrong. I guess my the main question remains - why does my VC IDE bombs out when I have ANY VS 20xx installed and I am not using them.
Thanks for all you comments.
Vaclav
|
|
|
|
|
Vaclav_Sal wrote: why does my VC IDE bombs out when I have ANY VS 20xx installed and I am not using them. Sorry, no idea. As I said above, I have done this myself without problems in the past. I can only assume that you tried opening one of the VC6 solutions in a later Visual Studio which converted or somehow corrupted one of the project files.
Use the best guess
|
|
|
|
|
The problem is obviously that you converted the old workspace into a new one (.dsw to .sln). After that you can't use it anymore with VS 6. Your best option is to revert to the files you had before conversion. If you don't have a backup you can either try to open the .dsw file (that contains the old workspace information for VS 6) or you may try to recreate all the projects, add the source files and hope that you get the project settings correctly.
I have installed VS 6 and some newer ones (up to VS 2010) in parallel on my machine. Usually this gives no problem. The key rule is: Always keep the projects separate, never open a project in anover VS version than it is intended for.
|
|
|
|
|
If the problem was so obvious I would not post it here.
Please read my OP and follow-up response.
Vaclav
|
|
|
|
|
In the C++ world, VS6 used different project and workspace files from subsequent VS versions. Here is a summary:
Project Workspace/Solution
File File
VS6 x.dsp x.dsw
VS.Net 2002 x.vcproj(?) x.sln
VS.Net 2003 x.vcproj x.sln
VS 2005 x.vcproj x.sln
VS2008 x.vcxproj(?) x.sln
VS2010 x.vcxproj x.sln
This is from memory - there may be errors.
VS6 also used x.sln files but they were for web projects (and maybe something else?). If you end up with a x.dsp and x.sln file with VS6 then something is confused. I am doubtful that it will work. You probably want to delete the x.sln file, go to VS6 and select "Start a new project" and add your existing x.dsp to it. This should create an x.dsw file for you. If it creates or tries to use the x.sln file then something is wrong...
--
Harvey
|
|
|
|
|
Thanks,
unfortunately I just deleted the sln and it did not help.
I have no VS greater that 6 on my box, so everything works in VS 6.I may try adding VS 2008 again to test the CMAke.
Many thanks for your input, appreciate it.
This also partialy explains why I can start a new project from dsw file but I cannot add DSW into existing project - IDE complains.
Vaclav
|
|
|
|
|
Hi
I need help with the following knowledge base article
http://support.microsoft.com/kb/147578[^]
In a method of my main window I have the following code
CMainframe::Process()
{
HWND main_handle = (HWND) this;
In my worker thread
CWnd* windowptr = new CWnd;
windowptr->attach(main_handle);
windowptr->SendMessage(...
My question is this coding correct as the article says
When working between threads not to pass object pointers
Rather handles and attach the handles to the MFC object
Thanks
As I am s getting exceptions on the SendMessage in my worker thread
|
|
|
|
|
ForNow wrote: As I am s getting exceptions on the SendMessage in my worker thread What exception is being thrown? Are you trying to send a UI-related message to the main thread from a worker thread?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
The worker thread is communicating with Hercules
dos C program when I get information
From Hercules I do a readfile (named pipes)
And send the buffer ptr as a wparam
The buffer is allocated on the heap via new
So any thread can access it
|
|
|
|
|
Hello everyone.
I was wondering what advice can you give on how to create a data/business model in C++. I mean, when working with C# I usually have no problems, simply follow .NET's guidelines, but it seems there aren't guidelines in C++ on this regard. Is there any example you'd like to share?
I'm thinking common scenarios like a sales system (product, warehouse, pricing, purchase order) or a search inverted index (term, documents, posting, posting lists, dictionaries).
What are your thoughts?
|
|
|
|
|
Hi,
I have a dialog box and an Edit box control on that. I want to make this edit box accept only digits ( 0 - 9 ), no character or special characters.
I have changed its property "Number" to true in resource dialog but when I run the application, the screen blinks every time I press any character.
Or is there any way that I can manually change it to accept only digits.?
Any help will be appreciated.
Regards,
Mbatra
|
|
|
|
|
You could overwrite the OnChange Handler (I think it was EN_CHANGED or something like that) and manually get the text, check for any non-digit and remove it. Then set the corrected Text with SetWindowText(), or ReplaceSel().
There are however several pitfalls you need to avoid. First, setting the text programmatically also calls the event handler, and you need some status variable to prevent "recursive" calls.
Second, You need to take the cursor position into account. When you call SetWindowText(), usually the whole edit control content is selected. You could set the cursor position to the end with SetSel() (IIRC you need two calls, one to mark everything and at the same time set the cursor to the end, a second one to mark nothing and leave the cursor where it is.) Since the user may have entered something in the middle you may want to get the cursor position before changing anything (with GetSel()) and set it back to that position later.
I usually avoided these issues by letting the user enter the wrong values and checking them when the control lost focus, unless where was a strong argument against this approach.
|
|
|
|
|
Thanx for the reply Freak30.
I got the solution.
Regards,
Mbatra
|
|
|
|
|
How about sharing your solution here?
|
|
|
|
|
Hi,
Here is the solution:
I handled OnUpdate() function.
This will not allow user to enter characters or special characters.
void Position::OnUpdateEditRotate()
{
CString str;
(static_cast<cedit*>(GetDlgItem(IDC_EDIT_ROTATE)))->GetWindowTextW(str);
LPTSTR pBuff = str.GetBuffer( 10 );
bool bProblem = false;
for ( int indx = 0; indx < str.GetLength(); indx++ )
{
char nChar = pBuff[indx];
if ( ( ( nChar >= 'A' ) && ( nChar <= 'Z' ) ) ||
( ( nChar >= 'a' ) && ( nChar <= 'z' ) ) ||
( ( nChar >= 33 ) && ( nChar <= 47 ) ) ||
( ( nChar >= 58 ) && ( nChar <= 64 ) )||
( ( nChar >= 91 ) && ( nChar <= 96 ) )||
( ( nChar >= 123 ) && ( nChar <= 126 ) ))
{
MessageBox();
}
else
{
bProblem = true;
break;
}
}
str.ReleaseBuffer();
}
|
|
|
|
|
Thanks for sharing. It would probably work same if you check just for < numbers > range.
Vaclav
|
|
|
|
|
Yes Indeed, but in that case it will block some keys also (e:g: Del, space, etc ...).
I want to block only characters and special characters.
Regards,
Mbatra
|
|
|
|
|
If using DoDataExchange and DDX_Text , then you also have access to DDV_MinMaxInt (And other DDV friends[^])
|
|
|
|
|
hi every one, i'm trying to write a simple code in clips but I'm getting this error which i can't find what the problem is.
I would be grateful if any one could help.
Defining deffunction: user-Question
Defining defrule: Rule0
[PRNTUTIL2] Syntax Error: Check appropriate syntax for defrule.
ERROR:
(defrule MAIN::Rule0
(not (tank-is-full ?)
=>
this is part of my code:
<blockquote class="FQ"><div class="FQA">Quote:</div>;;;************
;;;* Functions*
;;;************
(deffunction user-Question(?question ?answer $?values)
(printout t ?question)
(bind ?answer(read))
(stringp ?answer)
=>
(bind ?answer(lowcase ?answer))
(while (not (member$ ?answer ?values)) do
(printout t ?question)
(bind ?answer(read))
(stringp ?answer)
=>
(bind ?answer(lowcase ?answer))
)
?answer
)
;;;**********************
;;;* ENGINE STATE RULES *
;;;**********************
(defrule Rule0
(not (tank-is-full ?)
=>
(bind ?tank-is-full user-Question("Is there any petrol in the tank(Yes|No)?"yes YES Yes NO no No)
(assert(tank-is-full ?tank-is-full)
)
;;;****************************
</blockquote>
|
|
|
|
|
I am certainly not an expert but I am quite sure that the code that you posted is not C, C++ or MFC. At least it is no variant of C, C++ or MFC that I recognize. You sure you are in the right forum?
|
|
|
|
|
I'm not sure where should I post this but it's part of the code in Clips (C Language Integrated Production System ) environment which is software tool for building expert systems.
please let me know where should I post it?
|
|
|
|
|
I already gave you a link to the Clips page. You need to try there, as that is where you will find other people who understand that system.
Use the best guess
|
|
|
|
|
thanks,I have used that link but I think may be I could find my answer here.
thanks i'll try once more
|
|
|
|