For those new to message boards please try to follow a few simple rules when posting your question.
Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
Keep the subject line brief, but descriptive. eg "File Serialization problem"
Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode HTML tags when pasting" checkbox before pasting anything inside the PRE block, and make sure "Ignore HTML tags in this message" check box is unchecked.
Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
Please do not post links to your question in one forum from another, unrelated forum (such as the lounge). It will be deleted.
Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
No advertising or soliciting.
We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
I am covering a book tutorial about programming win32 and when I am compiling the code provided,
radio buttons doesn't show when are checked, instead the checkbox that is in the same dialog window
shows when it is checked.
Yes, I had placed a brakepoint after the CheckRadioButton RADIO1 function at the "break" statement.
When I press the Radio1 radio button the program goes and stops at the breakpoint, but what I had observed is that when a press play again to the compiler the program continues to execute and then it's comes back at the break point without to press again the radio button.
Check in Resource.h file to see if those two radio buttons has consecutive values ... might be a problem if they are not.
Yes, that it was, in the resource.h the values of the radio butons were reversed, first it was Radio2 then Radio1. I putted their correspondent values in increasing order and problem was solved.
Many thank Flaviu
I just created a quick test with your code and it works fine. There must be something else happening that we cannot see. As suggested by Flaviu above, please check the defined values for the dialog buttons.
In addition what was said before, I suggest you add a default case for the inner switch in WM_COMMAND. Then set a breakpoint on that default. Maybe you're missing a case in that switch statement?
GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)
I got a strange message from my compiler. Same code, same (at nearly) settings for Debug and Release versions. But what is more important, same files and same code! But when I try to create Release version, I get this:
Thank you, your tip was useful. I checked all places in the project's settings where I met the word "manifest" and found one, where settings for Debug and Release were different. Release wanted to generate manifest file, but Debug did not. I excluded manifest generation for the Release version and finally got it.
Look, guys, I have a code that worked properly under Windows XP 32 bit.
hHookMsg = SetWindowsHookEx(WH_JOURNALPLAYBACK, hkprc, hInst, 0). But under Windows 7 64 bit this call failed and I got System Error Message "Acces denied"
I tried this:
hHookMsg = SetWindowsHookEx(WH_JOURNALPLAYBACK, hkprc, hInst, GetCurrentThreadId())
hHookMsg = SetWindowsHookEx(WH_JOURNALPLAYBACK, hkprc, (HINSTANCE)NULL, GetCurrentThreadId())
and got "This hook can be set only globally".
Any ideas how to resolve the situation?
They have put security around that sort of thing and you probably have to be running as administrator and it's likely going to throw a UAC to user to confirm it is okay. Goto MSDN and look at the documentation.