|
I FOUND MY ANSWER ...
I'M SO HAPPY.
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Why - when I delete record in database (dbf-file) it was not deleting.
When i opnening the dbf-file by standart program (FOR VIEW DBF-FILES) then I can see that
record which was delete by my program (CRecordset::Delte) is absent- it's normal.
But when i run my program again I can see that that record present there ...
I was opened file in file_menager - (F4 - for editing) and seen that record which was delete
is inside file...(and size of file did't changing)
What must I do that delete record once and for all?
|
|
|
|
|
This is not a solution, but I think the problem is that records in dbf files are not physically removed until you pack the table. In most dBase type langs, delete only marks a record for deletion, then you call pack to permanently delete the record.
What you might look for is some sort of Oracle style call level interface type command that you can SQLExec against the database to pack it, but I don't know if such a thing exists for your driver/db engine.
|
|
|
|
|
Hello, the codegurus around the world;)
Actually, I don't understand that you want to delete the table or record in the table?
CRecordset::Delete() only deletes the record in the table, not the table itself.
If you want to delete the table, you can use SQL statement "DROP TABLE table_name".
Or, I misunderstand your question?
Have a nice day!
-Masaaki Onishi-
|
|
|
|
|
Hi Onishi.
I have question of you.
Can we delete table from database ? (if we can, please write code.)
Or only we can delete record from table ?
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Hello, the codegurus around the world.
In fact, I don't have my time to write the code for you.
As long as you show your code to ask something, the people
helps you.
We can delete the table, but if the table has the foreign key, we can't delete
this table unless we take off this foreign key or delete the table with the origin
of the foreign key.
For this, we use SQL statement or member function of some class.
But, I often use SQL statement in ADO.
Client application of the database like SQL Server, Oracle, and so on has the capablility
of deleting the table. This means that we can delete the table at our application.
|
|
|
|
|
Why - when I delete record in database (dbf-file) it was not deleting.
When i opnening the dbf-file by standart program (FOR VIEW DBF-FILES) then I can see that
record which was delete by my program (CRecordset::Delte) is absent- it's normal.
But when i run my program again I can see that that record present there ...
I was opened file in file_menager - (F4 - for editing) and seen that record which was delete
is inside file...(and size of file did't changing)
What must I do that delete record once and for all?
|
|
|
|
|
Why - when I delete record in database (dbf-file) it was not deleting.
When i opnening the dbf-file by standart program (FOR VIEW DBF-FILES) then I can see that
record which was delete by my program (CRecordset::Delte) is absent- it's normal.
But when i run my program again I can see that that record present there ...
I was opened file in file_menager - (F4 - for editing) and seen that record which was delete
is inside file...(and size of file did't changing)
What must I do that delete record once and for all.
|
|
|
|
|
Hi .
What can I do to use return value.
Thanks a lot.
|
|
|
|
|
SHBrowseForFolder returns a pointer to an ITEMIDLIST. You can use the SHGetPathFromIDList() to retrieve the path of the folder selected. Use an IMalloc interface to free the memory pointed to by the ITEMIDLIST pointer.
TCHAR thePath[_MAX_PATH];
ITEMIDLIST* idl;
idl = SHBrowseForFolder(A_Previously_Initialized_BROWSEINFO);
if (idl)
{
if (SHGetPathFromIDList(idl, thePath))
Do_Something_With(thePath);
LPMALLOC lpMalloc;
if (SHGetMalloc(&lpMalloc) == NOERROR)
lpMalloc->Free(idl);
}
---
Multitasking: Screwing up several things at once.
|
|
|
|
|
How can I create an edit box in Win32?
I've tried msdn example but the control doesn't shown!
Have a look on this:
define EDITID 1
// Specify the edit control window style.
DWORD dwStyle = WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL |
WS_BORDER | ES_LEFT | ES_MULTILINE | ES_NOHIDESEL |
ES_AUTOHSCROLL | ES_AUTOVSCROLL;
// Create the edit control window.
g_hwndEdit = CreateWindow (
TEXT("edit"), // Class name
NULL, // Window text
dwStyle, // Window style
0, // x coordinate of the upper-left corner
0, // y coordinate of the upper-left corner
CW_USEDEFAULT, // Width of the edit control window
CW_USEDEFAULT, // Height of the edit control window
hwnd, // Window handle to parent window
(HMENU) EDITID, // Control identifier
g_hInst, // Instance handle
NULL); // Specify NULL for this parameter when
// creating a control
Why cant I see it??
CocaCola
|
|
|
|
|
From the CreateWindow() docs:
CW_USEDEFAULT is valid only for overlapped windows; if CW_USEDEFAULT is specified for a pop-up or child window, nWidth and nHeight are set to zero. So you must give a width and height.
--Mike--
http://home.inreach.com/mdunn/
The Signature, back by popular demand: Buffy. Pajamas.
|
|
|
|
|
How will I get 3D look?
CocaCola
|
|
|
|
|
Use CreateWindowEx() and give it the WS_EX_CLIENTEDGE extended style.
--Mike--
http://home.inreach.com/mdunn/
The Signature, back by popular demand: Buffy. Pajamas.
|
|
|
|
|
Hi, firstly sorry for my English.
Please, I need know how I can work with images (bmp mainly) in visual c++. I have to work with fingerprints to get its main features, so I have to do: image enhancement (binarize, segmentation, ecualization, …), minutiae extraction and fingerprint matching. My question is about how I can do the pixel operations (binarize, segmentation, ecualization, …), i.e., image processing, and how I can save, load and operate with the images in visual c++.
Thanks a lot, Jose
|
|
|
|
|
personnaly i would use a 3rd party library but if you feel so inclined (or have to) do it yourself there is a groovy book called "Digital Image Processing" by (christian please supply the author's name here) that should get you started
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
VC doesn't have any built in support for image processing. You're going to either have to find a 3rd party library to use (http://www.smalleranimals.com/isource.htm) or learn to read/write BMP files.
Good luck.
-c
------------------------------
Smaller Animals Software, Inc.
http://www.smalleranimals.com
|
|
|
|
|
I use LeadTools (www.leadtools.com) which is a very thorough imaging library as well as being fast. The one drawback is that it is not the easiest library around.
|
|
|
|
|
Firstly, thank you for your answers.
Secondly I want to ask a thing more. Do you know where I can get the code o the algorithms (for vc++) of operations like binarize, equalization, segmentation, ... because I'm a little (well, a lot) lost.
Thank you again.
Jose Luis
|
|
|
|
|
errrr ... that was the point of the answers i think ... i dont know where anyone is giving away such source code for free
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
Hi, firstly sorry for my English but it isn`t my own language.
I have to insert a bmp image in a database field, but I can´t. I have done the database with DAO and dynamic style (using the Get/SetFieldValue functions), and with VARIANT data type. I want to insert the bmp through a field (of CLongBinary or CByteArray style) of a dialog box but I don`t know why I can`t do it.
Thanks, José
Jose
|
|
|
|
|
Hello, the codegurus around the world.;)
I remebered to read some article for this in MSDN help,
so I try to find this.
Unfortunately, I didn't find the same one, but found some tips.
I don't know how to convert bitmap file to BYTE format,
but I expect that this will help you?
HOWTO: Accessing Binary Data Using dbDao
--------------------------------------------------------------------------------
The information in this article applies to:
Microsoft Visual C++, 32-bit Editions, versions 4.0, 4.1, 4.2, 4.2b, 5.0, 6.0
--------------------------------------------------------------------------------
SUMMARY
When using the DAO SDK C++ classes to access binary data (such as a bitmap) you will find
that the data is returned in a COleVariant. COleVariant is an MFC class that wraps the
OLE VARIANT data type. Within the VARIANT, the data is stored as an OLE SAFEARRAY.
Extracting the binary data from the COleVariant requires some knowledge of VARIANTs and
SAFEARRAYs. The sample code below illustrates how to work with these data types by providing
a function for extracting binary data from a COleVariant and a function for storing binary data in a COleVariant.
MORE INFORMATION
Sample Code
BOOL GetBinaryFromVariant(COleVariant & ovData, BYTE ** ppBuf,
unsigned long * pcBufLen)
{
BOOL fRetVal = FALSE;
if(ovData.vt == (VT_ARRAY|VT_UI1))
{
*pcBufLen = ovData.parray->rgsabound[0].cElements;
*ppBuf = new BYTE[*pcBufLen];
if(*ppBuf != NULL)
{
void * pArrayData;
SafeArrayAccessData(ovData.parray,&pArrayData);
memcpy(*ppBuf, pArrayData, *pcBufLen);
SafeArrayUnaccessData(ovData.parray);
fRetVal = TRUE;
}
}
return fRetVal;
}
BOOL PutBinaryIntoVariant(COleVariant * ovData, BYTE * pBuf,
unsigned long cBufLen)
{
BOOL fRetVal = FALSE;
VARIANT var;
VariantInit(&var);
var.vt = VT_ARRAY | VT_UI1;
SAFEARRAYBOUND rgsabound[1];
rgsabound[0].cElements = cBufLen;
rgsabound[0].lLbound = 0;
var.parray = SafeArrayCreate(VT_UI1,1,rgsabound);
if(var.parray != NULL)
{
void * pArrayData = NULL;
SafeArrayAccessData(var.parray,&pArrayData);
memcpy(pArrayData, pBuf, cBufLen);
SafeArrayUnaccessData(var.parray);
*ovData = var;
VariantClear(&var);
fRetVal = TRUE;
}
return fRetVal;
}
CdbRecordset rs;
COleVariant ovData = rs.GetField(_T("MyBinaryField"));
BYTE * pBuf = NULL;
unsigned long cBufLen;
if(GetBinaryFromVariant(ovData,&pBuf,&cBufLen))
{
COleVariant ovData2;
if(PutBinaryIntoVariant(&ovData2,pBuf,cBufLen))
{
rs.AddNew();
rs.SetField(_T("MyBinaryField"), ovData2);
to the table
rs.Update();
}
if(pBuf)
delete pBuf;
}
Additional query words: kbgrpMFCOLE
Keywords : kbcode kbole kbprg kbDAO kbMFC kbVC400 kbVC500 kbVC600
Version : winnt:4.0,4.1,4.2,4.2b,5.0,6.0
Platform : winnt
Issue type : kbhowto
Technology : kbvc
Last Reviewed: March 13, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.
--------------------------------------------------------------------------------
Send feedback to MSDN.Look here for MSDN Online resources.
Have a nice day!
-Masaaki Onishi-
|
|
|
|
|
<<< In the name of GOD >>>
Hi all.
My program is in SDI mode.
I created dialog in my program, CDi (dialog class).
I want to add member variable to CDi:
First i add #include "MyProgramView.h" to Di.h
Then i write CMyProgramView *pView; in Di.h
But compiler indicate to me 3 errors:
error C2143: syntax error : missing ';' before '*'
error C2501: 'CMyProgramDoc' : missing storage-class or type specifiers
error C2501: 'GetDocument' : missing storage-class or type specifiers
Please help me !!!
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
The view class is attached to the document class it uses - include MyProgramDoc.h as well and all will be fine.
I'd suggest using AfxGetMainWnd/GetActiveView instead of carrying a pointer though.
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
Ok,
Thank you for reply and for your notice about get pointer from view.
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|