简体   繁体   English

Windows编程使用C ++中的模板

[英]windows programming using template in c++

I am interested in writing simple windows-based programs for scientific calculations in c++. 我对编写简单的基于Windows的程序进行C ++科学计算感兴趣。 Is there a place I could find source code for a template that I could use? 在哪里可以找到我可以使用的模板的源代码? The window I would create would hardly ever vary -- it would be something similar to this (but simpler!): 我将创建的窗口几乎不会改变-它将类似于以下内容(但更简单!):

http://www.lisisoft.com/imglisi/6/Science/73401version4xp.jpg http://www.lisisoft.com/imglisi/6/Science/73401version4xp.jpg

I am not a c++ programmer -- but I have created similar programs in visual basic (blush!). 我不是c ++程序员-但我已经在Visual Basic中创建了类似的程序(脸红!)。 This is my way of learning c++ by working within a limited range of program design...mainly at first just changing the formulas and a few labels. 这是我通过在有限的程序设计范围内工作而学习c ++的方式...主要是首先只是更改公式和一些标签。

Can anyone help or point me in the right direction? 谁能帮助我或指出正确的方向?

First off, there are a million things you need to know before you can just download some code from somewhere and try to work with it. 首先,您需要了解一百万件事,然后才能从某个地方下载一些代码并尝试使用它。 My best advice would be to pick up an "Introduction to C++" book. 我最好的建议是拿起《 C ++入门》一书。

But, putting that aside, I will try to answer the question. 但是,撇开这一点,我将尝试回答这个问题。 There are 2 main ways to make GUI apps in windows using C++: 使用C ++在Windows中制作GUI应用程序的主要方法有两种:

  1. Get a C++ GUI library, there is an extensive list here . 找一个C ++图形用户界面库,有一个详细的列表在这里

  2. Work with the Windows API directly. 直接使用Windows API

Once you have choosen either step 1 or 2, try to search for samples by searching the library name you have chosen followed by the word "samples" or "examples" (ie, "WxWidgets Samples", "Qt examples" or "Windows API examples") 选择第1步或第2步后,尝试通过搜索所选择的库名称和单词“ samples”或“ examples”(即“ WxWidgets Samples”,“ Qt examples”或“ Windows API”)来搜索示例。例子”)

However, either way you choose, in order to make something like the example in your picture, I would estimate that it would take you at least 6 months (and thats if you program everyday). 但是,无论您选择哪种方式,为了使图片中的示例类似,我估计这将需要至少6个月的时间(如果您每天进行编程,那就是这样)。

For a windows C++ GUI library try reliable software library at www.relisoft.com. 对于Windows C ++ GUI库,请访问www.relisoft.com,尝试可靠的软件库。 If you want to use native windows GUI programming you can also try using QT libraries. 如果要使用本机Windows GUI编程,也可以尝试使用QT库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM