|
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!
|
|
|
|
|
I have experience in with MFC and recently done ATL too. But new to
OLEDB/ADO.
I need to use OLEDB in a db-project, which need to access server-database
for database-metadata, table-metadata and table-data.
Right now I have used OLEDB-interfaces with SQL Server , starting from
IDBInitialize and so on, I got valid reference to IRowset-interface.
Can sbd. tell me how to retreive from the IRowset-interface ???
It's urgent. Any help will be helpful.
Thanx in advance.
Rohit Arora
DSR Solutions, Hyderabad
Rohit Arora
DSR Solutions
Hyderabad
|
|
|
|
|
Are you using 'raw' OLEDB or ATL Consumer Templates?
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
Hi,
How can load *.gif or *.jpeg files on a dialog or a button, if i can please tell how it is .
Thank U very much.
|
|
|
|
|
you cannot use GIF without a license (in the US, Germany, UK, Japan, etc.).
if you want to load JPG, there are articles on this site (see the Bitmap and Palettes section). or you could try a 3-rd party toolkit, like ImgSource.
-c
------------------------------
Smaller Animals Software, Inc.
http://www.smalleranimals.com
|
|
|
|
|
Try use function OleLoadPicturePath
According to documentation:
The stream must be in BMP (bitmap), JPEG, WMF (metafile), ICO (icon) or GIF format
|
|
|
|
|
Here you go.
You have to declare some CBitmapButton objects for each button in your main class header file that you are using this buttons.
Then add the usually message handlers.
Load your bitmap picture in your resource bitmap and use a string name "Name" to label your bitmap that you want over your button.
Then that should be the same name as the caption on your button. Make sure you have owner draw button checked.
Add a OnInitDlg member function and call your CBitmapButton objects with autoload.
Compile and run and you should have your bitmap buttons.
|
|
|
|
|
Hello,
when i import msado15.dll i do not get _RecordsetPtr. I can use _Recordset but i do not know how to get item data. i found in the samples the code but it always uses _RecordsetPtr.
how can i get _RecordsetPtr ? or what is eqivalent usage of _Recordset to the _RecordsetPtr's call:
_RecordsetPtr Rs1;
variant = Rs1->Fields->GetItem
(_variant_t ("name"))->Value;
thank you
|
|
|
|