|
From original Post:
"When I built this application on another machine with VS 2005, the project properties page under Configuration Properties\Debugging had an entry called "Evironment" whereby I could enter the relative path to the YadaYada\bin directory; (Set PATH="..\YadaYada\bin")."
I neglected to mentioned that when this was done, everything worked as designed.
"But I was not able to find any equivalent entry on the property pages in Visual Studio .Net (2002). I manually added the path to the dll to the machine's "PATH" environment variable but it made no difference. When I copied the dll to the project's folder however everything worked as designed."
That was the full path to the specified folder.
I tried your #2 and it works. That is what everyone is doing now and I would like to get away from that.
I tried your #3 (see above) and it did not work.
I tried #1 several weeks ago. I don't remember whether it worked or not. As I recall it required the entry of the path to the dll in the code. However I am trying to avoid that because that would necessitate each developer putting the dll project on their machine in the same location for the code to work. In this non-optimum development environment, each developer uses source safe to get latest version and installs the projects in whatever location they so desire. They then use the VC++ Directories property page to set the linkages to the other header and library files that are needed. They have been copying the dlls into the project directory. Since I am only a contractor for this one project I do not want to tell them to revise their way of doing business. So I was trying to find means by which they could access dlls without copying them into the project directory. Of course this is the .Net solution. (Where the dll's for each name space that is referenced in your project is copied to your bin directory.) I never liked that resolution for dll hell because it requires that any new version of a dll (stuff like bug fixes and service packs), now need to be copied to every application that uses it. For very general reusable code,that is used in many places, (like this is going to be,) that means quite a lot of copying and checking.
What about the possibility of using the command line additional options under Configuration\C/C++ folder s of the project property pages?
E.R. Joell MCSD MCDBA
|
|
|
|
|
joeller wrote: ...this is the .Net solution. (Where the dll's for each name space that is referenced in your project is copied to your bin directory.)
Really? I haven't seen that behavior. Where is this documented?
|
|
|
|
|
That was two years ago, I no longer remember were we read it. We were creating an ASP.Net application and we noted that after each build there was a copy of all the dll's we were using in the project's bin directory. We checked in out, and found that this behavior was as designed. Supposedly it was to allieviate the issues of DLL Hell to which the first replier referred to, as the application would always have the the version dll with which that it was compiled to work. The other advantage was that it facilitated the use of XCopy to deploy your application without worrying whether the dll that was needed was registered on the machine to which you were deploying. (The customer liked it because he did not have to register third party dll's on his server.) I found it irritating because I had come from a VB 6.0 background where you only had to set binary compatibility then you could replace the dll without having to re-register it.
I ran a google check before answering this entry. But I was not able to locate the place I read it. Could have been a book. Could have been 4GuysFromRolla. Found an entry in MSDN about referencing assemblies. Found a forum entry from a guy that found out the same thing we did. (He asked the question then posted the answer himself when no one answered him.) I am sorry I can't give you a better answer.
E.R. Joell MCSD MCDBA
|
|
|
|
|
Cool thanks.
A proper entry in the PATH environment variable should work. It's really strange that it doesn't
work for you.
Mark
|
|
|
|
|
|
The environment setting in the project options only affects the app when you run it from the IDE, and even then all it's doing is modifying the PATH variable. This won't have any effect when the app is run on other machines.
|
|
|
|
|
Hey all.
I need to set the position of my items (in icon view) on a CListCtrl to a specified coordinate. I downloaded a demo called Thumbnail (http://www.codeproject.com/listctrl/thumbnailview.asp) and it works great. It uses the function SetItemPosition right after the app inserts an item like so:
m_ListThumbnail.GetItemPosition(i, &pt);
pt.x = nGap + i*(THUMBNAIL_WIDTH + nGap);
m_ListThumbnail.SetItemPosition(i, pt);
i++;
Now, on my application, I have a CListCtrl, and whenever i use this function, it doesn't set the position! I even tried to set the position to {1, 1} but the listctrl insists on positioning my items on default position.
My CListCtrl has these properties:
AutoArrange = false
Alignment = Top
Tabstop = true
View = Icon
This properties, I checked with the Thumbnail demo, work. Why doesn't it work on my dialog? Is there some sort of project setting or dialog configuration i should use so I can use this function?
I've also tried using the following functions, without any result.
<code>
SendMessageA( (HWND) m_listPix.m_hWnd, (UINT) LVM_SETITEMPOSITION32, (WPARAM) i, (LPARAM)&pt);
<code>
ListView_SetItemPosition32(m_listPix.m_hWnd, i, pt.x, pt.y);
|
|
|
|
|
hello,
please don't say "use GDI, use GDI blah blah..." i didn't found nothing about how to do it directly(without saving bmp first)
is it possible to use Image::Save method? how to convert captured screen to IStream?
thank you very much for help
|
|
|
|
|
edvintas wrote: is it possible to use Image::Save method?
The Image class is GDI+ right? Unless you are using the .NET framework.
Since you don't want to "use GDI blah blah..." then I'd have to answer "No".
|
|
|
|
|
yes, that image class is GDI+, but you missunderstood me, i want use GDI+ i just didn't found useful example how to do it...
i just said taht because i found some posts about bmp >> jpg but the answer was: "Use GDI+"
and nothing more, so i didn't want such answer as i already tried to use it and not successful so i need a bit help
|
|
|
|
|
Something like this maybe...
#include <gdiplus.hᡊe9ac73-238b-46be-991d-0f050c37248d ...
HDC hScreenDC = GetDC(NULL);
int ScreenSizeX = GetDeviceCaps(hScreenDC, HORZRES);
int ScreenSizeY = GetDeviceCaps(hScreenDC, VERTRES);
Bitmap bitmap(ScreenSizeX, ScreenSizeY, PixelFormat24bppRGB);
Graphics graphics(&bitmap);
HDC hGraphicsDC = graphics.GetHDC();
BitBlt(hGraphicsDC, 0, 0, ScreenSizeX, ScreenSizeY, hScreenDC, 0, 0, SRCCOPY);
graphics.ReleaseHDC(hGraphicsDC);
CLSID JPGClsid;
GetEncoderClsid(L"image/jpeg", &JPGClsid);
bitmap.Save(L"MyScreenSnapshot.jpg", &JPGClsid, NULL);
|
|
|
|
|
Is CImage::Save helpfuls?
|
|
|
|
|
Does anybody know how to quickly invert a region using the CombineRegion() or similar api? I have so many regions to add, subtract and manipulate I cannot determine If any of my attempts are working.
|
|
|
|
|
HI All,
I have a string. In this string I want to validate that if and only if the previous character is something then the next character should also follow a definite pattern.
For ex:
A_____B______C_____D_____E
3_____1______2_____0_____3
_____________4_____0_____1
___________________1_____2
______2______1_____1_____0
______4______2_____3_____2
so as explained in the table above the valid entries should be 31203,31412,32110,34232.
I have tried solving the issue with a lots of if's, else if's etc. but I somewhere feel that this may not be the right way to validate the input. Can somebody put some light on this issue or point me to some article link that may help me to the resolution of the problem.....
Thanks in advance
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
something like this ??
(3 [1 [(2 0 3) | (4 [(0 1) | (1 2)])] | (2 1 1 0) | (4 2 3 2)])
|
|
|
|
|
Could you possibly employ the use of a FSM?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
DavidCrow wrote: Could you possibly employ the use of a FSM
there is only one FSM. and he works for nobody.
|
|
|
|
|
_AnShUmAn_ wrote: A_____B______C_____D_____E
3_____1______2_____0_____3
_____________4_____0_____1
___________________1_____2
______2______1_____1_____0
______4______2_____3_____2
so as explained in the table above the valid entries should be 31203,31412,32110,34232.
I'm missing one value. I guess the correct entries should be 31203,31401, 31412,32110,34232. Am I right?
Further:
1.
The underscore characters, are they present in the string?
2.
_AnShUmAn_ wrote: A_____B______C_____D_____E
Does this line have any significance, or did you just put it there for clarification?
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
kakan wrote: I'm missing one value
I just gave a few examples about how the values could be entered by the user. Yes what you is correct.
kakan wrote: The underscore characters, are they present in the string?
NO the underscore signs are not present in the string. I just entered them to show the alignment to the codeproject member's.
kakan wrote: A_____B______C_____D_____E
I just put this line for clarification.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
OK, one more question:
The "shorter" lines, are they left justified, or are they padded with blanks?
<code>
Like this (padded with blanks):
"31203"
" 401"
" 12"
" 2110"
" 4232"
Or like this (left justified):
"31203"
"401"
"12"
"2110"
"4232"
</code>
I'm working on a solution.
-- modified at 1:43 Tuesday 7th November, 2006
-- modified at 1:44 Tuesday 7th November, 2006
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
Hello again. I didn't receive an answer to my last question, but I made a solution that covers both cases.
You will have to adjust the code for Unicode if you want it.
And possibly adjust the code to ATL/STL if you want it.
Here goes:
The func:
<code>
void get(CString csIn, CString &csOut)
{
static CString csLast = "";
int lastLen = csLast.GetLength();
// Ignore and remove leading blanks in csIn.
while(csIn.GetAt(0) == ' ') csIn.Delete(0);
int inLen = csIn.GetLength();
if(inLen >= lastLen) {
// New, bigger value, save it.
csLast = csIn;
lastLen = csLast.GetLength();
}
int copyChars = lastLen - inLen;
if(copyChars > 0) {
csOut = csLast.Left(copyChars);
}
else csOut = "";
csOut += csIn;
csLast = csOut; // Save the last value for next time.
}
</code>
The main:
<code>
CString csRet;
get("31203", csRet); // csRet becomes "31203"
get(" 401", csRet); // csRet becomes "31401"
get(" 12", csRet); // csRet becomes "31412"
get(" 2110", csRet); // csRet becomes "32110"
get(" 4232", csRet); // csRet becomes "34232"
</code>
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
Thanks for your time and effort both in helping me to find out the solution. I will give it a try and let you know if there is still some problem that needs to be dealt with.
Thanks once again.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Your'e welcome, I'm glad if I can be of assistance to you.
And I can't resist a challenge...
Probably, there are things that must be fixed, this is a quick hack.
But I think the main idea works.
Good luck.
Kakan
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
kakan wrote: // Ignore and remove leading blanks in csIn.
while(csIn.GetAt(0) == ' ') csIn.Delete(0);
What's wrong with CString::TrimLeft() ?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
There is nothing wrong with TrimLeft (i hope).
I agree, it's a better choice. But I didn't have the time to tidy up the code. I'm at work, and wanted to help out...
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|