I KNOW I sould be looking at the customer's setting. The problem is that I'm not getting any support from him.
So, I need to understand the settings on my computer so I can run some tests and make suggestions to him. My problem is that I'm not very well versed in "security" settings in Windows 7. I still think it is a user permission setting in Registrey - but I'm not sure where to look yet.
The Registry key permission setting does indeed stop my program from writing to its Registry key. On my two WinXP and my Win7 systems the Registry key permissions are set to "full control".
Registry editor does not allow me to manually change the "full control" permission to "Read". The "full control" permission is checked but disabled (dimmed) so I can't change it and I don't know why. I had to find a utility that changed the permission outside of registry editor. When the key permission was changed to "read" then writing to the Registry failed.
CWinApp:WriteProfileInt() fails with a "read" permision but there is no error code associated with the failure (i.e. GetLastError() doesn't return an error code).
I think the only thing I can do is detect the Registry write failure, report it to the user, and use an INI file instead of the Registry. I don't particularily like it but I think that's my only choice.
When changing permissions on registry keys using regedit, make sure you select your user name to see which permissions you have. Programmatic changes to the registry are done using either your user account or the system user account, or some similar named account on the system. My bet is that the read or write permission is not set for all the accounts on your system. This is easy to check, open your regedit, navigate to the key in question, right click the key, select permissions. This should show a registry permissions dialog. Select each user account on the top section of the dialog and watch how the related permissions change for the different accounts. When you find the account with the missing permission, you will have your culprit. Hope this helps.
I'm wanting to batch edit the ID3V2 tags in around 1660 CDs worth of tracks, as I have metadata stored elsewhere.
Part of this process involves adding a APIC tag with the contents of a JPEG file.
Now, I have jumped through the various hoops to get everything working except one thing, namely, the artwork. Everything else (genre, album, track number, etc) work fine, and the tags are visible to iTunes and Windows Media Player. However, I am stumped as to how to add the artwork
I thought that the sequence
TagLib::ID3v2::Tag*t = f.ID3v2Tag();
// code omitted to initialise the ByteVector of data from file (which I checked!)
TagLib::ID3v2::AttachedPictureFrame* pF = new TagLib::ID3v2::AttachedPictureFrame();
should work, but it does not save my artwork
If anyone has working C++ code that does work, I'd be very grateful.
The jpeg image is bigger than the Picture Control, and the jpeg file is in the local disk. It is no problem to show jpeg image, I can use the CImage to load the jpeg image and then user Picture Control's SetBitmap() method to display this image.
of-course yes. You can invoke a modal dialog from another modal dialog. Coming to your problem there is something wrong with the usage of CFileDialog. can you paste the complete exception stack/message so that we can able find what went wrong.
I took this sample from here[^] hope you are doing the same. if not give a try.
dlgFile.GetOFN().lpstrFile = fileName.GetBuffer(<very large number&>);
dlgFile.GetOFN().nMaxFile = <very large number >;
INT_PTR nResult = dlgFile.DoModal();
Read these lines carefully
The destruction of CFileDialog objects is handled automatically. It is not necessary to call CDialog::EndDialog.
To allow the user to select multiple files, set the OFN_ALLOWMULTISELECT flag before calling DoModal. You need to supply your own filename buffer to accommodate the returned list of multiple filenames. Do this by replacing m_ofn.lpstrFile with a pointer to a buffer you have allocated, after constructing the CFileDialog, but before calling DoModal.
When the user allocates their own buffer to accommodate OFN_ALLOWMULTISELECT, the buffer can't be larger than 2048 or else everything gets corrupted (2048 is the maximum size).
Additionally, you must set m_ofn.nMaxFile with the number of characters in the buffer pointed to by m_ofn.lpstrFile. If you set the maximum number of files to be selected to n, the necessary buffer size is n*(_MAX_PATH + 1) + 1.
You are using the _T() macro in some places to ensure your strings are correctly created as ASCII or Unicode. However, further down you are using the (LPCTSTR) cast. This means that your code should not even compile in Unicode mode. You also failed to tell us what the exception is that you are seeing.
So you think that randomly changing some strings to Unicode will fix the problem? My comment was made in the hope that you would actually think about what you are trying to do and whether your various parameters are correct. Read the documentation[^] and look more closely at the requirements for the different parameters on the CFIleDialog class.
You should also learn the difference between the _T() macro and the L prefix on strings. And finally you need to understand exactly what a cast, such as (LPCTSTR), does and how it affects the way your program runs.
When the user clicks the OK button, they are expecting to be done, not be presented with yet another dialog box. The OK button should not be available to click until all required information has been collected. It sounds like what you need is a Browse button to allow browsing for the file name.
"One man's wage rise is another man's price increase." - Harold Wilson
"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
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
one paramter as everybody was telling me I have problems wih my parms
So why not take my advice, read the documentation, and fix the incorrect parameters? Unless and until you properly address the things that are obviously incorrect you are not going to make any progress finding the problem.
The program takes the input of an initial keyand an initial
vector, reads the plaintext or ciphertext from a file, conducts the encryption or
decryption, and writes the resulting ciphertext or plaintext into a second file.
test caseisas follows: using a binary initialization vector of10101010, a binary plaintext
of0000000100100011 encrypted with a binarykeyof0111111101 should give a binary
ciphertext of1111010000001011. Decryption should work correspondingly.
We have implemented the functionality of "What's this" help button in our MFC code.
When select "What's this" help menu and press any control then help is displayed properly; but while click on the buttons of the toolbar, windows message
"Windows.hlp file is not found. Will you locate /specify the file by yourself" with Yes and No button appeared.
After some time message disappears automatically.
And We also do not found windows.hlp at our system.
We have facing this issue at windows 7 (KB917607 is applied) and at windows XP while trying to display the help message at same toolbar button help displayed successfully.
Software developer with 10 years experience in developing desktop applications using C/C++,VC++,Qt,OpenGL for CAD/CAM/CAE/CFD applications. Call Sujan @ +91-8420921887/+91-9163437906. skype: 'sujan.dasmahapatra' , email : 'email@example.com'