|
by using RegNotifyChangeKeyValue() ,we can notify the changes,then how i can capture the changed key name ,value,status i used RegQueryValueEx(),
i got some garbage value like iiiiiiiiiiiiiiiiii.
Any one give idea about how to capture the name after identifying the notification.
Thanks
Kiran.V
|
|
|
|
|
show the code you are using to capture the change of a key name, and we will see why you get a garbage....
Yaron
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
Hi Yaron,
I want to monitor the changes in the registry,By selecting on of the Root key then monitor the changes in that inlcude key,subkeys.....for name,value and status.
i Add the code in the thread function for monitoring as belowvoid
MonitorThread(void* pParam)<br />
{<br />
DWORD dwFilter = REG_NOTIFY_CHANGE_LAST_SET, dwType, dwSize ;<br />
char lpszUser[81];<br />
HANDLE hEvent;<br />
HKEY hKey;<br />
LONG lErrorCode;<br />
<br />
while(1) {<br />
m_Sec.Lock();<br />
dwSize = 81;<br />
dwType = REG_SZ;<br />
<br />
lErrorCode = RegOpenKeyEx(hKey, NULL, 0,<br />
KEY_NOTIFY | KEY_READ, &hKey);<br />
<br />
hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);<br />
<br />
lErrorCode = RegNotifyChangeKeyValue(hKey, TRUE, dwFilter, hEvent,TRUE);<br />
<br />
WaitForSingleObject(hEvent, INFINITE);<br />
<br />
lErrorCode = RegQueryValueEx(hKey,NULL,0,&dwType,(unsigned char*)lpszUser,&dwSize);<br />
<br />
int item=pList->InsertItem(pList->GetItemCount(),lpszUser);<br />
lErrorCode = RegCloseKey(hKey);<br />
<br />
m_Sec.Lock();<br />
CloseHandle(hEvent);<br />
}<br />
<br />
<br />
<br />
}
For reading root key i put one combo box in the dialog and selecting one root key by pressing start button starts the monitoring ,if any changes occurs in the that rootkey registry display that key name,value ans status(create/modify/delete).
by pressing stop button stops the monitoring
Thanks,
Kiran.V
|
|
|
|
|
I want to defrag and optimize RAM.so that the unreleased memory
will be released.can anyone help me to write the program.
Thanks
nirmal
|
|
|
|
|
I am not sure what you mean by that but if you are talking about physical memory management then look into Address Windowing Extensions provided in Win API. It lets you lock in some pages in physical memory, for example, when you do OS-level optimization of your algorithms working with reasonably large data sets.
|
|
|
|
|
How to improve the resolution of a bitmap in a .bmp file. When I print the bitmap, its resolution is not good.
Can anyone suggest me some code to improve its resolution???
aasstt
|
|
|
|
|
The only reason i can think of that your bitmap resolution is not good, is because you strech it even not intently.
make sure when you blit the bitmap, that the cx and cy are correct (meaning you got them right using the GetBitmapDimentions method)....
Yaron
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
I have created a compatible DC of the printer DC and then I have Converted DDB to DIB. Then I have written this DIB in a .bmp file. but when I open this file in Paint & give its print its resolution is not good.
aasstt
|
|
|
|
|
Can you be more specific.
|
|
|
|
|
I have created a compatible DC(MemDC) of the printer DC.
Then MemDC->SelectObject(bitmap)
Then whatever I draw on the screen is drawn in memory.
and then I have Converted this bitmap from DDB to DIB.
Then I have written this DIB in a .bmp file. but when I open this file in Paint & give its print its resolution is not good i.e it is not appearing as a smooth image but an image with steps in it.
aasstt
|
|
|
|
|
aasstt,
I dont know your code but I use handle printer dc and I created bitmap
or I load bitmap from file and then print and resolution isnt bad.
Now you have bitmap from file or you created bitmap inside your program
|
|
|
|
|
I have created the bitmap and then written that bitmap using the WriteDIB function(which I have downloaded from codeproject)in a .bmp file.
aasstt
|
|
|
|
|
if you have bitmap(that you created) why you directly print instead save to file and again loaded?if it has handle HBITMAP
|
|
|
|
|
How to output a two dimensional array of datatype int array[x][y]in a Listbox control?
|
|
|
|
|
may i know what u r trying to do actually?
how u need the output???
Regards,
Prashanth.v
|
|
|
|
|
I would like to access each and every element in this array[100][100], in either list box or Edit box...but i couldnt get any result, my programm is gettign hanged,, plz help me
For eg:
int array[100][100];
CListbox m_intoutput;CEdit m_intoutput;
for(int i=0;i<100;i++)
for(int j=0;j<100;j++)
{
m_intoutput=array[100][100];
}
|
|
|
|
|
hii srija,
int array[100][100];
CListbox m_intoutput;CEdit m_intoutput;
for(int i=0;i<100;i++)
for(int j=0;j<100;j++)
{
CString str;
str.Format("%d",array[i][j]);
m_intoutput.Addstring(str);
}
Regards,
Prashanth.v
|
|
|
|
|
Ya, even i did so, but am getting junk values as output, for eg:-85899
-85899
-85899
-85899................
Waht could be the reason?
|
|
|
|
|
what so you want ecatly?
what is this?
m_intoutput=array[100][100];??
|
|
|
|
|
How do I get the command line arguments When I start my MFC EXE Application?
Can I find them somewhere from the CWinApp class…?
_____________________________
...and justice for all
APe
|
|
|
|
|
Of course
use the ParseCommandLine method, in your InitInstance of your CWinApp derived class...
from there it's easy
Yaron
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
d00_ape wrote: How do I get the command line arguments
use GetCommandLine()
nave
|
|
|
|
|
Is there a way to use Windows vista controls in my VC++ application?
Thanks
Yaron
Ask not what your application can do for you,
Ask what you can do for your application
-- modified at 6:30 Tuesday 25th April, 2006
|
|
|
|
|
Hi Yaron,
What do you mean?
Do you want that you want to use the Media player inside your application and not as a seperate window?
Regards,
Eli
|
|
|
|
|
Media player???
no, i am taking about the new look of the new windows platform which is called 'windows vista' it has some cool GUI which i want to use in my VC application.
my question is, is there a library i can link to or APIs i can use to do so?
thanks
Yaron
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|