|
Could you show the type of the variable custpass .
Steve
|
|
|
|
|
Hi Steve,
I think that's the type here
CString custpass;
amano
|
|
|
|
|
Ok then. Try this:
<br />
RegSetValueEx(<br />
hKey,<br />
"POP3 Password2",<br />
0,<br />
REG_BINARY,<br />
reinterpret_cast<const BYTE*>(static_cast<LPCTSTR>(custpass))<br />
);<br />
Steve
PS: This is the kind of problem you get when you mix the low level (the RegSetValueEx API) with the high level (CString).
|
|
|
|
|
I just tried to compile it with the new code, but am getting the following error message:
error C2660: 'RegSetValueExA' : function does not take 5 parameters
|
|
|
|
|
Ok, I forgot the size parameter. Try this:
RegSetValueEx(<br />
hKey,<br />
"POP3 Password2",<br />
0,<br />
REG_BINARY,<br />
reinterpret_cast<const BYTE*>(static_cast<LPCTSTR>(custpass)),<br />
(custpass.GetLength()+1)*sizeof(TCHAR)<br />
);
Steve
|
|
|
|
|
Ok...just been able to try this out.
The password is still not being saved to the Registry.
Does it matter where i am trying to write it to?
I am writing it to HKEY_CURRENT_USER\Software\Microsoft\Internet Account Manager\Accounts\
amano
|
|
|
|
|
amano8u wrote: HKEY_CURRENT_USER\Software\Microsoft\Internet Account Manager\Accounts\
HI,
first try by writing some dummy text there!, if you successful in writing that, then try the ansqwer mentioned by Mr. Hewitt
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow cheers, Alok Gupta VC Forum Q&A :- I/ IV
|
|
|
|
|
Hi Alok,
I don't understand what you mean? I am able to write text there and create the keys and etc. if that is what you are referring to. I am unable to write the correct data there.
amano
|
|
|
|
|
Are you sure you need to save it as binary, not as text? I don't know what OE expects.
Also, does your user account have permissions to alter this part of the registry?
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Hey Ryan,
i am trying to replicate what the OE wizard does. That one stores the value as a Binary.
But if text will do the trick i am happy to use that. Do you have an example how it would be written if it is to store it as text?
Would i be replacing the "REG_BINARY" to "REG_SZ" ??
and yeah permissions are available to alter the Registry.
amano
|
|
|
|
|
I have two monitors. They are connected with one graphic cards, which one from vga port and one from dvi port. How can I send different dialogs to different monitors and with one globle mouse.
Thanks in advance
|
|
|
|
|
you can use following apis.
MonitorFromWindow
EnumDisplayMonitors
Anderson Sheen (exteide@gmail.com)
The Extension IDE: http://www.exteide.com
|
|
|
|
|
I have an application which works with multiple monitors. I follow the process shown below (C not MFC, but the idea is the same.)
Start by setting up the monitors in Windows so they display diferent information.
Use EnumDisplayMonitors(NULL, NULL, MonitorInfoProc, 0) - the MonitorInfoProc callback procedure is called once for each monitor, and receives a handle to each monitor.
Using that handle (within MonitorInfoProc ), you can get the parameters for each monitor, by using GetMonitorInfo(hMon1, &monitorInfo) , and then access the various parameters such as lMonitorTop[uMonitorBeingEnumerated] = monitorInfo.rcMonitor.top and lMonitorLeft[uMonitorBeingEnumerated] = monitorInfo.rcMonitor.left .
Look at the members of the MONITORINFO structure to see what information is available.
Once you have the top left of each monitor and the size of each monitor, use SetWindowPos to position your windows where you want them.
|
|
|
|
|
I have keypad as a input. It use usb to connect. There is a driver to drive it. Is there anybody can give me an idea to use joystick as a mouse and keypay button(only number) to chose the button on the windows.
Thanks in advance
|
|
|
|
|
you can use DirectX input library.
DirectX input supports APIs related human interface device(HID) like joystick, light pen and etc.
you don't need to init the video mode even if you're using DirectX.
DirectX is just library.
And there are so many sources on the internet about DX input.
Good luck.
Anderson Sheen (exteide@gmail.com)
The Extension IDE: http://www.exteide.com
|
|
|
|
|
Hi .
Does anyone have a working code to change a file attributes from FILE_ATTRIBUTE_DIRECTORY to FILE_ATTRIBUTE_NORMAL.
Simply speaking I need to make a file from the directory.
student
|
|
|
|
|
You could try SetFileAttributes() but I doubt it will work. Stranger things have happened, though.
"The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli
|
|
|
|
|
I don't know what you are trying to achieve, but I doubt whether changing the attribute will do it! A file which is actually a set of directory entries (if that is what this would give) would not be useable in other applications (i.e. if you opened it with notepad or word, I don't think it would give anything recognisable as a directory listing, in case this is what you are trying to achieve.)
Maybe this would be a way to hide your directory full of smut, but if someone else runs scandisk, the clusters occupied by the files would be freed, since they are apparently unused (I guess that's what might happen - I've forgotten about directory structures, etc.)
Try the other suggestion regarding setting attributes, but if that does not do what you want, I suggest that you try to describe what you are trying to achieve in a few sentences - maybe someone can give ideas then.
|
|
|
|
|
Hi , thank you for the message. I know very good a sequences of the attribute changes…
The SetFileAttributes will not allow to change directory to file. I need some FAT32 or NTFS direct functionality , probably at the low level file access. Like it was with Norton Editor for DOS. NE for DOS allowed to change attributes from directory to file, and you are right, everything under that directory disappeared for the DOS. In my case it is a fast way to remove full path.
student
|
|
|
|
|
Ah, OK.
Thanks for the explanation of what you are trying to do.
Sorry - I can not offer any suggestions.
|
|
|
|
|
I want to write an application that overlays information on the window(s) of another external application. Basicly I want to draw information on that applications window. Does anybody have a clue on how to do this?
I can think of two strategies:
1. Write the information on a transparent window an make sure that the windows stays over the application I want to modify through constantly monitoring the window hierarchy.
2. Make som kind of hook in the external program and capture paint events. After the original paint is done I have some own code that writes what I want over the GUI.
I think I would prefer the first strategy if it is possible, since it is less intrusive and eaisier to adopt to different kinds of applications. But I don't know if it is possible to do a window that is completly transparent to mouse and keyboard events. I wouldn't want my application to steal the focus from the application I modify. The modification should be visual only. Another problem is that I guess it might be hard to make the Z order and positioning to be in perfect sync all the time (although short missalignments is acceptable).
Does anyone have an clue of which API calls to use to make such a system? Does anyone have any sample code that does similar things?
|
|
|
|
|
You can use CImageList.
CImageList.BeginDrag
CImageList.DragMove
CImageList.EndDrag
Above will satisfy your request.
It supports transparent drawing. but you would need some trick.
Anderson Sheen (exteide@gmail.com)
The Extension IDE: http://www.exteide.com
|
|
|
|
|
If you give the window the WS_EX_TRANSPARENT extended style, it will pass through mouse clicks to the window beneath it. As for the Z-order issue, I'm not sure what would be the best way to solve it. It may be easier simply to hook the window and subclass it, and redo the painting.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
|
I don't think so, message are #define , so they will be replaced at compilation.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|