How does 'GetVolumeInformation' and 'GetDriveType' sound ?
Prem Kumar
Posts
-
Hard Disk -
yahoo IM style viewprobably embedd a IE control in the top portion ?? Although I think that Yahoo has a customized editor.
-
Window ColorHave a look at GetSysColor/SetSysColors which change the whole systems colors(which is not exactly a good idea!) The next thing is to go in for painting the non-client areas(ex the title bar is non client area) for some of the things and for others you need a custom control.
-
MFC messagesOK, It's something like this, the Message Pumps are associated with a thread and not a window. Inside this thread the messages are dispatched to different windows based on the windows handles. So your code is posting back to the same thread which does not have a message pump (while(GetMessage(..) {...}) so what ever messages you post will never be executed! Now you have two options 1. Post the message to the main thread and have it executed there by using PostThreadMessage. 2. Provide a message Pump (this will mean you will need to re-tailor your existing thread function to use the message pump and not the simple while) Hope this helps..
-
MFC doc/view with non-file-based documentsJust process on new document and populate the data in the document. As for the file name just forget it, only visible trace that it is still being used it in the main frame, you can remove it by removing the bit FW_ADDTOTITLE in the mainframe's OnCreate.
-
An application runProbably what you mean is if atleast one application instance is running ? What you need is to just enumerate the process list and look at the exe or the program name. Process32First, Process32Next.
-
How can I hide the "Printing" dialog that comes up when a report is sent off toYou can probably, write your own pagination and printing or track down the point at which dialog is being shown in the mfc code and then override the function in your own class and copy from the original function and remove the dialog calling code.
-
Flicker and CwndTry to show the information by testing for a time lag of say about 500 ms to 1 sec. I think windows tooltips are also implemented in this manner
-
reading and writing raw data to an access database from c++Use void SetFieldValue( LPCTSTR lpszName, const COleVariant& varValue ); 1. Put the byte array into a safearray of type VT_U1 2. Embed the array in a variant 3. Pass it to the above function
-
splitter wndsUse CSplitterWnd::SetRowInfo & SetColumInfo to set the minimun and required sizes for the pane.
-
worrisome exceptionHi, first chance exceptions are generally c++ exceptions like possibly in MFC, you can safely ignore them.
-
Disabling a NT accountHI Abhi, Use the foll function, its quite simple NetGroupDelUser
-
An ADO problemstd::string id=(char *)(_bstr_t)m_pRecordSet->GetCollect(L"id"); Hi I think that GetCollect returns a variant, and in case of NULL values, this variant has a VT type of VT_NULL,you could check for it.
-
question about Carlos Antollini ADO classes !!!You can use bookmarks for storing the current position. As far as i know is no way currently to jump to a random position. But I guess you could always use 'Find', if you know any thing about the record you want to jump to(ex primary keys are usually automunbers)
-
ADO recordset objectIf you are using static or keyset cursor then the recordset count you get from the property 'RecordCount" is valid else you need to go from record to record manually and then use the property.
-
Imagewhat is your doubt ? Is it abt retrieving the image from the database or show the bitmap on the screen ? If it is abt the retrieving and assuming that you are using binary you can use the method GetChunk to read the binary data from the database. If abt the bitmap, there are a lot of articles here at CP.
-
File ManagementUse MoveFile BOOL MoveFile( LPCTSTR lpExistingFileName, // file name LPCTSTR lpNewFileName // new file name );
-
Setting Account name and password for accessing a remote PCUse 'WNetAddConnection2'.
-
Calling Access FileOk, first of all *.mdb files are not executables! But I think what you want to do is open the mdb file in Access ?? Is that right ? If so you can use ShellExecute(..) ; with lpOperation as "open".
-
SelectObject() RulesIf you are using MFC, every thing is taken care of if all the objects are local objects. But if you are programming in SDK you need to make calls to DeleteObject with the resource handle.