|
SetProcessWorkingSetSize. Available on NT/2K only.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
Thank you very much, the both of you for making time... You soulved a huge problem I was struggling with... Thankx
|
|
|
|
|
Is there a standard method for opening a file with it's default/associated file opener?
One has, for instance, the path to "C:\mytxt.doc" and wants to use the user-defined viewer (usually Word) to open this without having to check the configurated association tables
Thanx.
Per Pusling
|
|
|
|
|
Check ShellExecute and ShellExecuteEx.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
Yep, ShellExecute() does just this. Pass your document filename, and a verb of "open" and the API will launch the associated program.
--Mike--
http://home.inreach.com/mdunn/
#include "buffy_sig"
|
|
|
|
|
Hello everyone,
I'm trying to do a file search from my application, So I was wondering if there is a way to employ windows File Search (Start -> Find -> File or Folder) functionality through any kind of APIs
Thanks in advance for your help.
Fady
|
|
|
|
|
Do you need to use the CFileFind class
or the FindFirstFile function.
Look in the MSDN into Api reference\FileI/O\Functions.
Carlos Antollini.
|
|
|
|
|
Try to use the functions "FindFirstFile" and "FindNextFile"
|
|
|
|
|
Hi,
Yes, Windows use of FindFile and FindNextFile, but you must write algorithm ...
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Thanks For all of you who responded, all the answers were good. But what I'm looking for is how to invoke the already existing windows Find functionality.
Basically I want to get around writing my own Find algorithm by employing windows Find algorithm.
Thanks again for your help
Fady
|
|
|
|
|
I have a problem with an Oracle DLL I'm using... This DLL contains a memory leak... But because this DLL runs in the same address space as my executable, my program can't perform many actions because it's memory usage increases significantly... Does anyone know how to run a piece of code in a seperate address space, so that when this code is done, the memory is automaticly commited to the system... I'm quit desperate on this one
|
|
|
|
|
What Oracle product are you trying to use?
I use the Oracle Objects for OLE, version 8, for a whole lot of production code and have not ever experienced a memory leak with it. Lately I've also been researching the use OLE DB consumer templates with the Oracle provider and again haven't experienced any memory leaks.
That's not to say that I haven't come upon other bugs with the product, but that's a horse of a different colour
Chris
|
|
|
|
|
I'm using the Oracle Forms Open API's... They are a disease for batch processing, since they don't commit all memory pages after closing the forms file...
|
|
|
|
|
Sorry, but I have no experience using the Oracle Forms product, so I'd just be guessing.
No offense, but for me if I start having to 'struggle' with a third party product, it is usually because I'm trying to use the product to do something that the developer had either never intended or has to be done a very specific way. Try checking through the Oracle MetaLink site to see if anyone else might be able to help you.
Chris
|
|
|
|
|
hi,
okay, this is my question.
I have a bmp file and i like to get the pixel value,,,,,, this is what i do:
CClientDC dc(this);
int Value = dc.GetPixel(point);
the above code gives me a very large number, I like to know if i could use Gray Scale and get the pixel value, just to have a smaller number for simplicity.
Thanks
Ehsan Behboudi
|
|
|
|
|
GetPixel doesn't really give you a "very large number". it gives you a COLORREF which is actually four small numbers packed into a 4-byte DWORD.
here's a simple way to convert that RGB value to gray scale:
COLORREF clr = GetPixel(point);
BYTE grayValue = (BYTE)(int)((GetRValue(clr) + GetGValue(clr) + GetBValue(clr)) / 3);
this isn't perfect, but it's simple.
-c
------------------------------
Smaller Animals Software, Inc.
http://www.smalleranimals.com
|
|
|
|
|
BYTE grayValue = (BYTE)(int)((GetRValue(clr) + GetGValue(clr) + GetBValue(clr)) / 3);
This is not the best conversion, because the eye does not register R, G, and B equally. The following (adapted from Frederik Lundh's Python Imaging Library), implements the International Telecommunications Union's recommended luminance conversion.
BYTE Grayscale(BYTE red, BYTE green, BYTE blue)
{
return static_cast<BYTE> (( 299u * static_cast<DWORD>(red)
+ 587u * static_cast<DWORD>(green)
+ 114u * static_cast<DWORD>(blue) ) / 1000u);
}
He was allying himself to science, for what was science but the absence of prejudice backed by the presence of money? --- Henry James, The Golden Bowl
|
|
|
|
|
Hello all,
Ok heres a question that am not sure bout.
What is that difference:
class CMyClass{
...
...
void MemberFunc1() //this is a member non-static member function, right??
{
...
}
void MemberFunc2(); //this functon is static (defined outside class), right??
inline void MemberFunc3() // this is a inline non-static??? huh???
{
....
}
inline void MemberFunc4(); // this is a inline static function???
};
what is the differnece between these? I'm really not sure, but is an inline func the same
as a non-static func??
Thanks,
|
|
|
|
|
Inline and static are two different things. From VC++ help (which you should read before posting here):
Static:
"In C++, when modifying a data member in a class declaration, the static keyword specifies that one copy of the member is shared by all the instances of the class. When modifying a member function in a class declaration, the static keyword specifies that the function accesses only static members."
Inline:
"The inline specifier instructs the compiler to replace function calls with the code of the function body. This substitution is “inline expansion” (sometimes called “inlining”). Inline expansion alleviates the function-call overhead at the potential cost of larger code size."
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
Let me recommend an excellent C++ book for beginners. This book is NOT a Microsoft Visual C++ book but a book on pure C++ programming. It is the absolute best I've seen for someone learning the C++ language and should be a part of any beginner's set of references.
It is the Wait Group's "C++ Primer Plus". You can find it at
http://www1.fatbrain.com/asp/bookinfo/bookinfo.asp?theisbn=1571691626&vm=
WillCodeForMoney
|
|
|
|
|
no your missing a } to close the class. maybe that will answer the rest of your questions but I didn't read them because your error was so trivial that it pissed me off that you didn't catch it.
|
|
|
|
|
How can I make a dialog both Borderless and still have the ability to resize it.
Worst Case i am going to fill in the NC area with a graphic rim of the image in the dialog box but I was wondering if there was another way. Either that or I am going to make the dialog borderless and write my own resizing class. If there is an easy way to do this I would be oblidged.
Thanks
Ryan
|
|
|
|
|
n/m tossing graphics in the nc area is working so i guess im just going to do that.
|
|
|
|
|
Handle the WM_NCHITTEST message. If the mouse is within X pixels of the dialog's edge, you can return HTBOTTOM, HTBOTTOMLEFT, etc., to tell Windows to act like there's a sizing border.
--Mike--
http://home.inreach.com/mdunn/
#include "buffy_sig"
|
|
|
|
|
I have seen this but need a hint on where to look. I would like to change the open/save dialog but not just on my application but change it system wide so the OS and all applications, even the one I didn't write, use the customized dialog. How would I go about this?
Thanks
Ralph Krausse
www.consiliumsoft.com
Home of FastRun. If you run lot of application, development projects, word docs, etc, check it out!
|
|
|
|