|
for example to get the type of HKEY_CURRENT_USER\SYSTEM\CurrentControlSet\Control\BackupRestore\FilesNotToBackup
..what hould be the parameters to be passed on to thef unctiona dn chow should i use it in my code?
ranjani
|
|
|
|
|
DWORD dwType;
RegQueryValueEx(HKEY_CURRENT_USER, "SYSTEM\\CurrentControlSet\\Control\\BackupRestore\\FilesNotToBackup", NULL, &dwType, ...);
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
for example to get the type of HKEY_CURRENT_USER\SYSTEM\CurrentControlSet\Control\BackupRestore\FilesNotToBackup
..what hould be the parameters to be passed on to thef unctiona dn chow should i use it in my code?
ranjani
|
|
|
|
|
Hello people,
i am working on a dialog-based mfc app. I added a member-variable of type CMenu to the CDialog-derived class, so that a menu is available. I use the ON_UPDATE_COMMAND_UI makro in the message-map of the Dialog to enable/disable menu-items. But the corresponding menu-item isn't drawn in grey color as expected when it is disabled. Why? Does someone has a clue how i can fix this?
Best regards
tabor25
|
|
|
|
|
|
Thank you very much for answering to my question. I read the recommended article and added a menu to the demo-project including a test-item. Then i added a UI notification-handler for the menu-item to the dialog-class (where the ui-handler for the button is located), but in case of disabled the menu-item would not be drawn in grey color. I don't know what to do!
Best regards
tabor25
|
|
|
|
|
Hi all,
I have a unicode file (strings.mc contains ids and langauge translations).
i wrote to methods to perfrom reading from and saving to this file:
void CMyClass::ReadingMCFile()
{
FILE* fp = fopen(m_szMCFile, "rb");
ASSERT(NULL != fp);
if (NULL == fp)
{
AfxMessageBox((_T("Could not open the file : %s"),m_szMCFile),MB_ICONERROR);
return;
}
wchar_t wcBuff[MAX_PATH];
do
{
fgetws(wcBuff, MAX_PATH, fp);
m_vecMCFile.push_back(wcBuff);
} while(!feof(fp) );
fclose(fp);
}
where m_vecMCFile is in the type of :
std::vector<wchar_t*> m_vecMCFile;
now i wrote a method to write the changes back to the mc file (meaning going over the vector and write each line to the file as follows:
void CMyClass::WriteMCFile()
{
if (!DeleteFile(m_szMCFile))
{
AfxMessageBox((_T("Could not delete the file : %s for writing "),m_szMCFile),MB_ICONERROR);
return;
}
FILE* fp = fopen(m_szMCFile, "wb");
ASSERT(NULL != fp);
if (NULL == fp)
{
AfxMessageBox((_T("Could not open the file : %s"),m_szMCFile),MB_ICONERROR);
return;
}
wchar_t* wcBuff = NULL;
std :: vector<wchar_t*>::iterator vecIT;
for (vecIT = m_vecMCFile.begin(); vecIT != m_vecMCFile.end(); vecIT++)
{
wcBuff = (*vecIT);
fputws(wcBuff, fp);
}
fclose(fp);
}
this code doesn't work...
can any1 help me fix it?
thanks in advanced
Yaron
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
trouble was the wchar_t wcBuff[MAX_PATH]; was defined local, so when the scope was out of the method the value was garbage, so i needed to save the value using the new operator......
that did the trick
Yaron
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
hi all,
i am using AutoRichEditCtrl for displaying few text.i have set it to a different font in which some characters have a dot above it. whenever i try to write such characters with a dot above it a white space gets automatically appended. how do i remove such white spaces???
please help me......
thanks!
ramya.
|
|
|
|
|
something that came through my mind : may be the use of '\b' in the TXT string could help ?
when you add a new character, you're program looks if that character is not a white-space and so if you have a w/s as your last char, use \b to delete that w/s.
F
|
|
|
|
|
Hi there. I created a window with "CreateWindow" API as a child window in another application. I want that this window is transparent which isnt a problem using GetDC and BitBlt... but the problem: the parent window has a changing background. How can my created window notified when the parent refreshes?
Thanks for reading & helping
|
|
|
|
|
I'm working on an MDI application in MFC. I need my CMDIFrameWnd to be able to tell which CMDIChildWnd is currently active. Specifically, I need it to know which CMDIChildWnd's name is currently being displayed in the title bar of the CMDIFrameWnd, even if that CMDIChildWnd does not have the focus (due to focus being controlled by a modeless dialog, for example).
How can I track for that?
|
|
|
|
|
I Found When I click Startmenu->Log Off, MessageBox " Are you sure You Want to Log Off" is appear,the background is fade off on gray scale.
I want to do my dialog is activate,background color is fade off on gray scale.
HOW CAN I DO IT
Please Help me
|
|
|
|
|
Never tried this, but I'd imagine the thing to do is take a screenshot of the whole screen, then paint that image onto a window the size of the screen, then progressivly repaint while desaturating the image.
*¨¨`)
¸¸.·´ ¸.·*¨¨`)
(¸¸.·* ¸ .·*
¸¸.·*
(¸¸.~~> Joel Holdsworth.
|
|
|
|
|
Hi,
My prob is like this...
1) I have a CMain wh is the parent of several propertysheets, eg CPptySheet1.
2) After pressing a button on CMain, a modal dialog box pops up, CModal.
3) I change some values using CModal and i want the changes to be reflected in PptySheet1.
4) I cannot use OnInitDialog coz the ppty sheets are initialized b4 CModal.
5) I have also tried using OnSetActive...and even OnShowWindow.....but it doesnt work. How can i dynamically show changes, if there are any, every time the property sheet is shown? Please advise...thanks!
|
|
|
|
|
Use Messages defined by oneself.
And SendMessage(...);
Hello World!
|
|
|
|
|
Erm...i'm nt too familiar with that...Could u elaborate? So do i need to specify where the message is sent to or where it is sent from etc? Thanks!
|
|
|
|
|
Hi,
I am using VC++ 6.0 to write a Win32 console app. Does anyone know how I can read all the file names in a directory if user specifies the directory for input file(s)?
Thanks a lot!
|
|
|
|
|
try doing...
_finddata_t fileinfo;
long hFile;
_chdir( --dirname-- );
if( (hFile = _findfirst( "*", &fileinfo )) == -1L )
--- no files in director ---
else
{
do
{
--- called per file ---
fileinfo.name contains the filname!
} while( _findnext( hFile, &fileinfo ) == 0 );
_findclose( hFile );
}
*¨¨`)
¸¸.·´ ¸.·*¨¨`)
(¸¸.·* ¸ .·*
¸¸.·*
(¸¸.~~> Joel Holdsworth.
|
|
|
|
|
Wow~! Thanks so much, guys!
Joel Holdsworth wrote:
_chdir( --dirname-- );
May I know what _chdir is? or what it means?
Is it part of the fileinfo structure?
Because I got an error msg for this.
thanks again.
|
|
|
|
|
hkl wrote:
May I know what _chdir is? or what it means?
It changes to the specified directory (i.e., CWD).
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
CFileFind finder;
BOOL bWorking = finder.FindFile("*.*");
while (bWorking)
{
bWorking = finder.FindNextFile();
cout << (LPCTSTR) finder.GetFileName() << endl;
}
|
|
|
|
|
Thanks. But CFileFind doesn't work in my case.
I am only writing a console app, not MFC.
(Or may be CFileFind can apply, but I don't know how.)
|
|
|
|
|
Try this:
HANDLE hFile;
WIN32_FIND_DATA wfd;
hFile = FindFirstFile("*.*", &wfd);
while ( FindNextFile(hFile, &wfd) != 0 )
{
if ( (strcmp(wfd.cFileName, "..") != 0 ) && (strcmp(wfd.cFileName, ".") != 0 )
if (wfd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
}
FindClose(hFile)
|
|
|
|
|