|
Hi friends,
How can I insert time information to the access database.I am working in MFC. Pl. help me how to insert time to access database.
Is there any format for insertion????
Quick reply is appreciated....
Thanks a heap...
|
|
|
|
|
How are you interfacing to the database? What's the data type of the relevant column in the database table?
Using (for example) OLE DB with an Access table containing a Date/Time typed field, you interface via a rowset that will have a member variable of type DATE, rather than a string.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
how to make the dialog transparent but the control is not transparent?
|
|
|
|
|
Could you explain a bit more what you mean?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
Do none of the transparent[^] dialog[^] articles[^] on CodeProject help? Or couldn't you see them (they are transparent, after all).
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Use setlayeredwindow() api
|
|
|
|
|
I have got three 2D images about the height of one object int three different angle of view. Now, I want to transform the three images with Rotation matrix into one global reference frame. But I don't
know how to do with the datas in the overlap area of three different angle of view's images with C/C++.
|
|
|
|
|
It sounds to me like you need to extrude each of the images in the plane of the image, then perform intersection operations[^] to shape the object?
Can you use a package like Blender or somehting to do that rather than writing your own? Alternatively, there are several libraries that will help you do that[^].
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
I do some optical measurement in 3D recently. I really don't know how to rotate and splice the datas
in 3D space with the C.
|
|
|
|
|
How to find others tray icon from task bar?
I want to track my application tray icon from another application.
Consider outlook express tray icon it will be display only the time of new message arrival.
Like that My application will display tray icon for some time. At that time i have to do some operation from
another application. For that how can I track that whether tray icon is displayed or not?
So please help me
|
|
|
|
|
I don't think you can track whether a tray icon is visible or not.
Even if you could, there are so many better ways to send messages between processes.
Look at Interprocess Communications[^] and Interprocess Synchronization[^]
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
See if this article is of help to you:
Shell Tray Info[^]
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Why am I not able to handle WM_KEYDOWN on a dialog? Pretranslate is the only way? Also what's the reason the event is not getting dispatched to the dialog?
|
|
|
|
|
Probably because the control with focus is getting the messages, not the dialog.
Add your WM_KEYDOWN handler and add this PreTranslateMessage override and you should be good, so long as your dialog is modal:
BOOL CMyDlg::PreTranslateMessage(MSG* pMsg)
{
if (pMsg->message == WM_KEYDOWN)
pMsg->hwnd = this->m_hWnd;
return CDialog::PreTranslateMessage(pMsg);
}
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Thanks for your reply Stuart.
Stuart Dootson wrote:
Add your WM_KEYDOWN handler and add this PreTranslateMessage override and you should be good, so long as your dialog is modal:
I could rather manipulate that the key in pretranslate() itself right?
Stuart Dootson wrote: Probably because the control with focus is getting the messages, not the dialog.
That was my guess, Just to test that I tried deleting all the controls on the dialog. Just a plain dialog but still it's not getting the event. What could be the reason here?
|
|
|
|
|
grassrootkit wrote: I could rather manipulate that the key in pretranslate() itself right?
Should be fine
grassrootkit wrote: What could be the reason here?
I don't know - but Spy++ could tell you if the dialog's getting the WM_KEYDOWN messages?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Okay I'll check them up. Thanks for your responses.
|
|
|
|
|
Hi,
How to install the vs 2008 trial edition after download from mircosoft?
|
|
|
|
|
Looks like your OS lost a handler for "Space" KeyDown? Your subject looks like a train.
samuellhu wrote: How to install the vs 2008 trial edition after download from mircosoft?
You need to stay online. It downloads from their server.
|
|
|
|
|
I am writing an application that enumerates all the subkeys in HKEY_CLASSES_ROOT\CLSID, and then writes all the names of subkeys to an XML file for reference.
It's pretty simple stuff, really. This registry location stores configuration information for all the registered COM classes on my machine, and there are about 4.000 subkeys.
Each subkeys Name is the hexadecimal string representation of a 128-bit number known as a Globally Unique Identifier (GUID). When represented textually, GUIDs are always displayed in the following canonical form:
BDA4A270-A1B1-11D0-8C2C-0080C73925BA
The HKEY_CLASSES_ROOT\CLSID subkeys are named exactly like this, except that they begin and end with curly braces.
I enumerate the subkeys with a simple for loop, saving the GUID to a TCHAR buffer (size, 128 bytes) and everyting works OK, until I hit a subkey about a third of the way down that is a GUID with one of the integers missing. Then the RegEnumKeyEx function stops writing the GUIDs to the TCHAR buffer, but continues on without generating an error code.
The program code then writes the GUID text strings to my XML file (this part works great).
I had to write another function that uses RegEnumKeyEx in a for loop again, but indexes the enumeration to begin at the subkey immediately after the truncated GUID that caused the problem initially, and runs to the final key (total subkey count obtained with RegQueryInfoKey). This works successfully. but the entire process of the determining the source of the error, and writing a seperate enumeration function was quite time consuming (I initially thought it was insufficient memory.).
I'm wondering if anyone knows why RegEnumKeyEx behaves like this. Surely, it doesn't check the text GUID values for validity. I used Registry Editor to search for other keys and associated values for that one malformed GUID, and found about a dozen entries, all with the same exact truncated format (weirdly enough, it's a Visual Studio component!).
Any useful comments are appreciated,...thanks.
|
|
|
|
|
Baltoro wrote: I enumerate the subkeys with a simple for loop...
What does this loop look like? Something like:
if (RegOpenKeyEx(HKEY_CLASSES_ROOT, "CLSID", 0, KEY_READ, &hKey) == ERROR_SUCCESS)
{
while (! bDone)
{
dwSize = 128;
lResult = RegEnumKeyEx(hKey, dwIndex, szBuffer, &dwSize, NULL, NULL, NULL, &fileTime);
if (lResult == ERROR_MORE_DATA || lResult == ERROR_SUCCESS)
{
cout << szBuffer << endl;
dwIndex++;
}
else
bDone = TRUE;
}
RegCloseKey(hKey);
}
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
The for loop that enumerates the HKEY_CLASSES_ROOT\CLSID key is as follows:
DWORD dwRetVal = 0 ;
for (DWORD dwClsidIndx = 1 ; dwClsidIndx <= 1488 ; dwClsidIndx++)
{
TCHAR ComClssGuid [128] ;
ZeroMemory (&ComClssGuid, 128) ;
LPTSTR pComClsid = ComClssGuid ;
dwRetVal = RegEnumKeyEx (hRootKey, dwClsidIndx, ComClssGuid, &dwSize, NULL, NULL, NULL, &ftLastWrtTime) ;
if ((dwRetVal != ERROR_SUCCESS) && (dwRetVal != ERROR_MORE_DATA))
{
dwRetErrorVal = dwRetVal ;
dwErrNumClsid = dwClsidIndx ;
dwClsidErrors++ ;
TCHAR ErrorMessage [192] ;
wsprintf (ErrorMessage, TEXT(" ERROR: Number of Errors: %lu. ERROR: CLSID %lu. Error Code: %lu"), dwClsidErrors, dwErrNumClsid, dwRetErrorVal) ;
SetStatusMessage (ErrorMessage) ;
return FALSE ;
}
WriteClsidNodesAlpha (ClsidDomDoc, pDocRtElment, pComClsid, dwClsidIndx) ;
}
Explanation: dwRetErrorVal, dwErrNumClsid, and dwClsidErrors, are all DWORD variables declared outside of the function, used just to store the error code, CLSID subkey number, and the total number of such errors.
WriteClsidNodesAlpha is the function that writes the data to a Node in an XML file.
...and SetStatusMessage merely displays text in the application's status bar.
|
|
|
|
|
David Crow,
Sorry, I can't get at the edit control to change the last post. You're probably laughing, it's such a ridiculous post. You will notice that the test expression in the for loop is: dwClsidIndx <= 1488
Well, I changed that value after the loop initially failed (at CLSID number 1488). it originally was 3965 (which is the value returned from RegQueryInfoKey, dwNumSubKeys).
You will also notice that I begin the enumeration at value 1, instead of zero, as recommended by the documentation. This is because, I was getting the same name "CLSID" written to the TCHAR ComClssGuid [128] buffer, 3965 times (each time the loop executed).
The code just preceeding the loop, where I obtain the hKey value is here:
DWORD dwNumBubKeys = 0 ;
DWORD dwMaxSubLen = 0 ;
DWORD dwSize = 128 ;
FILETIME ftLastWrtTime ;
HKEY hRootKey = NULL ;
const TCHAR ComClsidEntrs [] = TEXT("CLSID") ;
LPCTSTR ClsidKeys = ComClsidEntrs ;
RegOpenKeyEx (HKEY_CLASSES_ROOT, ClsidKeys, 0, KEY_ALL_ACCESS, &hRootKey) ;
RegQueryInfoKey (hRootKey, NULL, NULL, NULL, &dwNumBubKeys, &dwMaxSubLen, NULL, NULL, NULL, NULL, NULL, NULL) ;
DWORD dwRetVal = 0 ;
for (DWORD dwClsidIndx = 1 ; dwClsidIndx <= 3965 ; dwClsidIndx++)
{
TCHAR ComClssGuid [128] ;
ZeroMemory (&ComClssGuid, 128) ;
LPTSTR pComClsid = ComClssGuid ;
dwRetVal = RegEnumKeyEx (hRootKey, dwClsidIndx, ComClssGuid, &dwSize, NULL, NULL, NULL, &ftLastWrtTime) ;
if ((dwRetVal != ERROR_SUCCESS) && (dwRetVal != ERROR_MORE_DATA))
{
dwRetErrorVal = dwRetVal ;
dwErrNumClsid = dwClsidIndx ;
dwClsidErrors++ ;
TCHAR ErrorMessage [192] ;
wsprintf (ErrorMessage, TEXT(" ERROR: Number of Errors: %lu. ERROR: CLSID %lu. Error Code: %lu"), dwClsidErrors, dwErrNumClsid, dwRetErrorVal) ;
SetStatusMessage (ErrorMessage) ;
return FALSE ;
}
WriteClsidNodesAlpha (ClsidDomDoc, pDocRtElment, pComClsid, dwClsidIndx) ;
}
Really, it's more of an annoyance than anything, since I was able to correct the problem. I'm just curious as to why it happened.
|
|
|
|
|
Thanks, Davis Crow,
You know, it's probably something internal,...something that I can't access programmatically.
Don't worry about it. Maybe even it's corruption in the registry storage copy. My machine is old (running Windows XP, SP1).
Now, I know how to keep my code blocks from causing the displayed text to run off the page (here in the forum). Unfortunately, I can't even delete the post and repair the version. I know it looks confusing.
|
|
|
|
|
Baltoro wrote: Unfortunately, I can't even...repair the version. I know it looks confusing.
Actually you can. Go to one of your other posts and click the Edit button. Change the number in the URL to 2983307.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|