|
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 25-Jan-21 4:09am.
|
|
|
|
|
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
|
|
|
|
|
Reminds me of when I was asked to send text files with "larger fonts" since the usual recipient had a hard time reading the "text" reports.
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
Hello,
I am searching for tools that allow you to design a state machine and generate the corresponding C code. As a bonus, I would like the tool to:
- given the source code, generates the state machine
- allow to easily switch between a State Machine view (high level), to source code view (detail, low level)
- the State Machines are saved in a Git/CSV/SVN friendly format
Any suggestions ?
I easily found Home - Modern Embedded Software | Quantum Leaps[^], but found it to have a too steep learning curve.
|
|
|
|
|
There's a member on this website named Honey the Codewitch.
This member is quite knowledgeable about compiler design and has written several articles that you might find very helpful.
Search for articles by this member.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
|
Hoping for some program to translate a C program (in the sense "an arbitrary C program") into a state machine is naively optimistic.
Even if that C program was initially generated from a state machine model, so you could hope to recognize code key patterns allowing you to identify code fragments handling specific state transitions etc., most programmers feel the freedom to not give a sh*t about FSM principles, so they toss the code all over the place, making it impossible to recognize the pieces.
What you can do is to provide a framework for editing the FSM as a FSM, and let the developer specify the actions of each individual transition within that framework. Then, the framework can lay out the code for each transition (as well as the common logic for the state transitions themselves).
This is actually one of my current pet projects. Maybe I will write a CP article about it some day. It is far from ready yet, but if you would like to discuss it directly with me, send me an email. Maybe that could help pushing my hobby project forward
|
|
|
|