|
Apologies for the shouting but this is important.
When answering a question please:
- Read the question carefully
- Understand that English isn't everyone's first language so be lenient of bad spelling and grammar
- If a question is poorly phrased then either ask for clarification, ignore it, or mark it down. Insults are not welcome
- If the question is inappropriate then click the 'vote to remove message' button
Insults, slap-downs and sarcasm aren't welcome. Let's work to help developers, not make them feel stupid.
cheers,
Chris Maunder
The Code Project Co-founder
Microsoft C++ MVP
|
|
|
|
|
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.
cheers,
Chris Maunder
The Code Project Co-founder
Microsoft C++ MVP
|
|
|
|
|
Hello,
In a dialog, i have added picture control from resource. in this i am displaying an image accordingly at the runtime which is working fine.
I need to zoom in / zoom out the displayed image according to mouse wheel move. I thought of adding window procedure to that picture control, so that i can handle mouse command over there. in MFC, i can see options and examples, but in win32 api, i dont know how to do that.
Can anyone suggest me how to do.
Regards,
Gopi.
|
|
|
|
|
|
Thanks,
will check on this.
|
|
|
|
|
Just derive your own class from the CStatic (picture control is a static control), create the control member variable in the dialog for this picture control, and handle any Windows message you need in this derived class.
|
|
|
|
|
Thanks.
my application is in win32 and picture control created through toolbox. how to subclass this control to CStatic (MFC) derived class?
|
|
|
|
|
- Use MFC class Wizard to derive new MFC class from CStatic (say CMyPicture);
- Change the control ID of your picture control from IDC_STATIC to something more sensible (like IDC_MYPICTURE);
- Use MFC class Wizard to create the control member variable (of the new created type CMyPicture) for your picture control.
Also see MSDH (docs.microsoft.com) for details.
|
|
|
|
|
Thank you.
Will give it a try.
|
|
|
|
|
|
Does someone have a code in c, for a battleship game, i have to do it on codeblock
Thank you
|
|
|
|
|
You should try doing it yourself.
It's more fun.
I'd rather be phishing!
|
|
|
|
|
Sorry, this site does not provide code to order.
|
|
|
|
|
Julien JG7 wrote: Does someone have a code in c, for a battleship game, i have to do it on codeblock So if YOU have to do it, why are you asking for SOMEONE ELSE's code?
"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
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
What is a common way to use NASM (or other assembly compilers) when developing windows applications. Do you integrate it with VisualStudio shell or you go down the path of always using the command line?
|
|
|
|
|
|
The usual way to integrate assembly files into a C++ project is to add the MASM "build customization" (right click a project, go to Build Dependencies > Build Customizations, check the box in front of MASM). Then you can include .asm files as normal sources without needing to do anything weird. You can install vsyasm and use YASM that way, if you prefer a more NASM-y syntax. Using NASM itself is possible, but as far as I know there's no nice integration like that, you can set it up manually as a custom build tool.
Similar information is in microsoft docs.
|
|
|
|
|
thanks harold aptroot, Richard
modified 2 days ago.
|
|
|
|
|
Hi,
I recently upgraded the solution from VS 2015 to VS 2017 enterprise edition. When i build the solution am getting this error.
Error LNK2019 unresolved external symbol _vsprintf referenced in function _COND_PushCondition ctn_lib.lib(condition.obj) 1
Any clue is highly appreciated.
Kind regards,
Suresh
|
|
|
|
|
That is part of the standard C run time libraries so it should always be found. You may need to rebuild that library.
|
|
|
|
|
Thanks and it is working now
|
|
|
|
|
can anyone give me code c++ that read swedish txt file read
|
|
|
|
|
How do Swedish files differ from any other txt file?
Because it contains text in Swedish? Are you looking for a function that can give you the text in English? Try Google Translate!
|
|
|
|
|
|
Try Swedish-C++ .
"In testa che avete, Signor di Ceprano?"
-- Rigoletto
|
|
|
|