|
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
|
|
|
|
|
Hi All,
Is there any parser which will convert rtf text to html text.
with regards
A.Santosh
|
|
|
|
|
I'm using Chris Maunder's grid control in an MDI app (*non* Doc/View). I added a grid pointer in my ChildFrm.h and create / initialise it in CChildView::Create(). No problems here.
Assuming I have a file that can be read into the grid, how do I access the grid from within the open call in CMainApp::OnFileOpen() or CMainFrame::OnFileOpen() to put that data into it?
I have no problems with the new call because I don't need to modify the grid before I show it to the user. With open I do need to modify it first (load it with data). How do I do this?
|
|
|
|
|
With an MDI app you need to make OnFileOpen in the App class query for a filename and then call the doc class, similar to this:
if (dlg.DoModal() == IDOK)
{
AfxGetApp()->OpenDocumentFile(dlg.GetPathName());
}
Then in the Doc class you can override OnFileOpen to call this function ( as once you have opened one file, the Doc version gets called instead ) like this:
CMyApp * pApp = (CMyApp*)AfxGetApp();
pApp->OnFileOpen();
Finally, override OnOpenDocument to open the file, read the data and set some sort of flag to be used in your views OnInitialUpdate function to display the data.
Christian
#include "std_disclaimer.h"
People who love sausage and respect the law should never watch either one being made.
|
|
|
|
|
But I'm *not* using doc / view. This is just plain App Wizard generated with the doc / view support unchecked. Given that the grid control stores all data internally I see no reason to include that support when the CDocument is never going to be used.
I was thinking more along the lines of the code below. The only problem I see with this is that is doesn't work It compiles fine, but the view returned is NULL. Where am I going wrong here???
void CMainApp::OnFileOpen()
{
CMainFrame* pFrame = STATIC_DOWNCAST(CMainFrame, m_pMainWnd);
CMDIChildWnd* wnd = pFrame->CreateNewChild(
RUNTIME_CLASS(CChildFrame), IDR_MAINTYPE, m_hMDIMenu, m_hMDIAccel);
CChildView* view = (CChildView*)wnd->GetActiveView();
view->c_pGrid->DoSomethingCool(); // Compiles but view is 0x0
}
|
|
|
|
|
Hi All,
I have aon interesting Query .I have an ATL Service and I want to display a Message say "Hi" in the Build window when I run the service.
Which Macro I have to use?
Thanx in advance for the help.
Regards,
Y.Yamini Devi.
|
|
|
|