|
jay_p_patel wrote: ...but it fails .
Which is all but totally meaningless without any contextual information.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
what could be done to get rid of link error 1181 cannot open input file d:\project.obj
|
|
|
|
|
to get your post clarified, you have to narrate the foreground and background of your problem and error.
you should also specify the platform in which you are getting this error.
|
|
|
|
|
You've instructed the linker to process the d:\project.obj file, which apparently does not exist. I suspect the d:\ path is invalid as most .obj files reside in a project's Debug or Release folder.
LNK1181
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hello to all,
i am a new one in MFC, right now in my project i am having a default ".rc" file lets say "a1.rc" which is created while generating the project.Now i want to create and add one more ".rc" file lets say "b1.rc" in my project along with "a1.rc",how to do it? i want to add one dialog box and some other resources in "b1.rc",how it can be done? also i want to generate new "resource.h" file for new "b1.rc" file so that "b1.rc" will not overwrite existing "resource.h" file for "a1.rc", how it can be done? how to give reference of this "b1.rc" file in my project? can any body help me please.
Thanks and Regards,
Anay Kulkarni
|
|
|
|
|
Hi anil,
There is only one resource file in a project and what u want, u can do it in existing resource file also. Go to Insert Menu -> resource (resource dialog box appear)than u may insert what u want and resource.h is automatically updated.
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
what i under stood from his post is he might be looking to import one dialog box from another projects' rc file into his new project.
so he can open that rc file by importing it into his current workspace and copy paste the controls from the required dialog to the new dialog.
|
|
|
|
|
No Chandu,
he create one more .rc file in his worksapce. pls read his blog.He create one MFC workspace where .rc file is already created. now he want to generate one more rc file and according to my knowledge it is not possible.
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
yah shilpi, what you said is correct.
it is not possible to have two RC files in one project,
but now atleast iam unable to understand, why at all he requires two RC files in one project?
|
|
|
|
|
Hans tells you how to do it in this article[^]
Peter
"Until the invention of the computer, the machine gun was the device that enabled humans to make the most mistakes in the smallest amount of time."
|
|
|
|
|
Unless something has changed over the years, you can just go in and include it manually in the existing ‘.rc’ file using ‘#include”, I think, just like a C or C++ header.
If you need to be sure how it is done, then just add an external file like a bitmap to your ‘.rc’ through the IDE and then open the ‘.rc’ (in text mode) to see what statement it added. Heck, come to think about it; that is all you should need to do to add an additional ‘.rc’ file within the existing file.
I once need to create the same version of an application with different logos and about information (sister companies) and it X was defined (for project) then X companies information would compile and show, otherwise company A’s information would show.
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
|
Anybody know how to get CPU temperature from the system.
what the function can support this issue.
Thanks
|
|
|
|
|
not all machines can support reading of the cpu temperature, it's a function of your BIOS software. Sometimes the bios manufacturer will supply dll's that you can reference to call the required function and return the details.
|
|
|
|
|
See Win32_TemperatureProbe .
|
|
|
|
|
I am using a dynamic array that I often need to resize. I've tried a few way to resize it and so far this is what works. But their MUST be a better way.
Ideas?
int *n = NULL; // Pointer to int, initialize to nothing.
n = new int[2]; // allocate needed room
/////////////////////////////////////
/// Time to make more room!!
int *temp = NULL; //Create a temp
temp = new temp[4]; //allocate
for(register int i=0; i<4; i++){ //transfer data to temp
temp[i] = n[i];
}
delete n; //delete old
n = new int[4]; //make new one
for(register int i=0; i<4; i++){ //transfer the data back
n[i] = temp[i];
}
delete temp; //delete temp
|
|
|
|
|
why don't you use vector<int> in this case you need not to worry about resizing it grows automatically
int the above question when you delete temp
write delete[] temp as it is an array the above code leads to memory leakage
Regards,
Pankaj Sachdeva
"There is no future lies in any job"
"but"
"future lies in the person who holds the job"
|
|
|
|
|
I can barely begin to tell you what is wrong with that.
1) Use ‘vector’ and all your problems will go away.
2) If you must provided your own (do not double copy the data):
2.1) Allocate the new amount of space required.
2.2) Copy the old data to the new data space.
2.3) Free the old space.
2.4) Assign the pointer to the new space.
In C you would have another option (realloc) that if it failed, you would have to resort to (2) above, but I do not know a way to do that in C++.
P.S. delete[] n;
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
I think I will use vector. But just to check, here is my own way revised.
number *n - NULL; //create
n = new number[2]; //allocate
////We need more room
number *temp = NULL; //create temp
temp = new number[4]; //allocate
for(register int i=0; i<4; i++){ //transfer old into temp
temp[i] = n[i];
}
delete[] n; //delete old
n = temp; // point to new data
|
|
|
|
|
Yes, that is the idea; short and simple. The only thing I would change in the example is the assignment to NULL, because you immediately assign a value to it after the declaration.
number* n = new number[2];
number* temp = new number[4];
Those are shorter and make more since to me.
P.S. The register keyword is unneeded, because most modern compilers are better at picking register variables than we are and it is free to ignore the suggestion, which is all that keyword is.
Good Luck!
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
How do you get the width of a scrollbar assocaiated to a given control?
|
|
|
|
|
It depends on the type of scrollbar.
If it's a standard scrollbar, you can use GetSystemMetrics().
If it's a scrollbar control, you can use GetWindowRect().
For scrollbars implemented by custom controls, you're on your own
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
in MFC afx.h Ln366,I see this:
#define ENSURE_THROW(cond, exception) \
do { int __afx_condVal=!!(cond); ASSERT(__afx_condVal); if(!(__afx_condVal)){exception;} } while (false)
why do{...}while(false)?
is that equal to this:
#define ENSURE_THROW(cond, exception) \
int __afx_condVal=!!(cond); ASSERT(__afx_condVal); if(!(__afx_condVal)){exception;}
and why use "int __afx_condVal=!!(cond);",is this ensure the value of __afx_condVal is either 1 or 0?
Stay Hungry. Stay Foolish
Thanks Alot!
-- modified at 14:06 Friday 5th October, 2007
|
|
|
|
|
Howdy guys, just a quick question about a small problem I am having in a little chat application I made for the sake of learning.
Currently I want my app to minimize to my tray displaying its icon. I want the window to be hidden completly, I dont want it to appear minimized in the taskbar. If the user wants to open the app he can double click the icon in the tray. I got the animation working, my icon loads in the try, however I cannot hide the window. It minimizes to the task bar below making it appear "miniized". It should be hidden no?
Currently I am using this command I assumed it would hide everything. Any obvious thoughts come to mind on what I might be doing wrong?
ShowWindow(m_hWnd, SW_HIDE);
If you want I can display more code just let me know!
Thanks Alot!
Cliff
|
|
|
|
|
See http://www.codeproject.com/dialog/hidetaskbar.asp
IMNOOPR
|
|
|
|