24小时热门版块排行榜    

查看: 9101  |  回复: 145
本帖产生 1 个 程序强帖 ,点击这里进行查看

bbettry

铜虫 (初入文坛)

送红花一朵
终于找到组织了
目标:顶级工程师
131楼2013-12-04 09:57:42
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

卡卡西耶

木虫 (正式写手)


小木虫: 金币+0.5, 给个红包,谢谢回帖
楼主,你好 我想学习下vb调用refprop软件!!该怎么办,完全木有思路和资料。。vb也不是很懂!!
132楼2014-01-14 21:36:14
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

biowhb

银虫 (正式写手)


小木虫: 金币+0.5, 给个红包,谢谢回帖
初学windows编程:想把一个主窗体的客户区分割成三个部分,下面是代码,运行起来却仍是空白的没什么变化,这是为何?求大神指点
#include <windows.h>

#define ID_FIRSTCHILD  100
#define ID_SECONDCHILD 101
#define ID_THIRDCHILD  102

// Global variable

HINSTANCE hinst;

// Function prototypes.

int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int);
InitApplication(HINSTANCE);
InitInstance(HINSTANCE, int);
LRESULT CALLBACK MainWndProc(HWND, UINT, WPARAM, LPARAM);
BOOL CALLBACK EnumChildProc(HWND , LPARAM ) ;

// Application entry point.

int WINAPI WinMain(HINSTANCE hinstance, HINSTANCE hPrevInstance,
    LPSTR lpCmdLine, int nCmdShow)
{
    MSG msg;

    if (!InitApplication(hinstance))
        return FALSE;

    if (!InitInstance(hinstance, nCmdShow))
        return FALSE;

    while (GetMessage(&msg, (HWND) NULL, 0, 0) != 0 && GetMessage(&msg, (HWND) NULL, 0, 0) != -1)
    {
        TranslateMessage(&msg);
        DispatchMessage(&msg);
    }
    return msg.wParam;
        UNREFERENCED_PARAMETER(lpCmdLine);
}

BOOL InitApplication(HINSTANCE hinstance)
{
    WNDCLASSEX wcx;

    // Fill in the window class structure with parameters
    // that describe the main window.

    wcx.cbSize = sizeof(wcx);          // size of structure
    wcx.style = CS_HREDRAW |
        CS_VREDRAW;                    // redraw if size changes
    wcx.lpfnWndProc = MainWndProc;     // points to window procedure
    wcx.cbClsExtra = 0;                // no extra class memory
    wcx.cbWndExtra = 0;                // no extra window memory
    wcx.hInstance = hinstance;         // handle to instance
    wcx.hIcon = LoadIcon(NULL,
        IDI_APPLICATION);              // predefined app. icon
    wcx.hCursor = LoadCursor(NULL,
        IDC_ARROW);                    // predefined arrow
    wcx.hbrBackground = (HBRUSH)GetStockObject(
        WHITE_BRUSH);                  // white background brush
    wcx.lpszMenuName =  "MainMenu";    // name of menu resource
    wcx.lpszClassName = "MainWClass";  // name of window class
    wcx.hIconSm = NULL;

    // Register the window class.

    return RegisterClassEx(&wcx);
}

BOOL InitInstance(HINSTANCE hinstance, int nCmdShow)
{
    HWND hwnd;

    // Save the application-instance handle.

    hinst = hinstance;

    // Create the main window.

    hwnd = CreateWindow(
        "MainWClass",        // name of window class
        "Sample",            // title-bar string
        WS_OVERLAPPEDWINDOW, // top-level window
        CW_USEDEFAULT,       // default horizontal position
        CW_USEDEFAULT,       // default vertical position
        CW_USEDEFAULT,       // default width
        CW_USEDEFAULT,       // default height
        (HWND) NULL,         // no owner window
        (HMENU) NULL,        // use class menu
        hinstance,           // handle to application instance
        (LPVOID) NULL);      // no window-creation data

    if (!hwnd)
        return FALSE;

    // Show the window and send a WM_PAINT message to the window
    // procedure.

    ShowWindow(hwnd, nCmdShow);
    UpdateWindow(hwnd);
    return TRUE;

}

LONG APIENTRY MainWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
    RECT rcClient;
    int i;

    switch(uMsg)
    {
        case WM_CREATE: // creating main window  

            // Create three invisible child windows.

            for (i = 0; i < 3; i++)
            {
                CreateWindowEx(
                    0,
                    "ChildWClass",
                    (LPCTSTR) NULL,
                    WS_CHILD | WS_BORDER,
                    0,0,0,0,
                    hwnd,
                    (HMENU) (int) (ID_FIRSTCHILD + i),
                    hinst,
                    NULL);
            }

            return 0;

        case WM_SIZE:   // main window changed size

            // Get the dimensions of the main window's client
            // area, and enumerate the child windows. Pass the
            // dimensions to the child windows during enumeration.

            GetClientRect(hwnd, &rcClient);
            EnumChildWindows(hwnd, EnumChildProc,
                (LPARAM) &rcClient);
            return 0;
        // Process other messages.

    }
    return DefWindowProc(hwnd, uMsg, wParam, lParam);
}

BOOL CALLBACK EnumChildProc(HWND hwndChild, LPARAM lParam)
{
    LPRECT rcParent;
    int i, idChild;

    // Retrieve the child-window identifier. Use it to set the
    // position of the child window.

    idChild = GetWindowLong(hwndChild, GWL_ID);

    if (idChild == ID_FIRSTCHILD)
        i = 0;
    else if (idChild == ID_SECONDCHILD)
        i = 1;
    else
        i = 2;

    // Size and position the child window.  

    rcParent = (LPRECT) lParam;
    MoveWindow(hwndChild,
        (rcParent->right / 3) * i,
        0,
        rcParent->right / 3,
        rcParent->bottom,
        TRUE);

    // Make sure the child window is visible.

    ShowWindow(hwndChild, SW_SHOW);

    return TRUE;
}
生物技术-基因工程制药
133楼2014-02-13 15:26:09
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

巴厘岛蓝山

新虫 (初入文坛)


小木虫: 金币+0.5, 给个红包,谢谢回帖
在C++中 从形参传入一个字符,将该字符从字符串中删除。
这是我的代码  但是不知道哪里错了  前辈能不能帮我指出来  谢谢了  另外怎么对字符串数组进行动态内存分配   
#include<iostream>
#include<Cstring>
using namespace std;
void remove(char string1[],char p)
{
        int i,j=0;
        char string2[10];
        for(i=0;i<strlen(string1);i++)
        {
                if(string1==p)
                        i++;
                else
                        string2[j++]=string1;
        }
        for(j=0;j<strlen(string2);j++)
                cout<<string2[j];
        cout<<endl;
}

int main()
{
        char string1[10];
        char p;
        gets(string1);
        cin>>p;
        remove(string1,p);
        return 0;
}
134楼2014-03-08 15:21:28
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

自来清风

银虫 (小有名气)


小木虫: 金币+0.5, 给个红包,谢谢回帖
引用回帖:
134楼: Originally posted by 巴厘岛蓝山 at 2014-03-08 15:21:28
在C++中 从形参传入一个字符,将该字符从字符串中删除。
这是我的代码  但是不知道哪里错了  前辈能不能帮我指出来  谢谢了  另外怎么对字符串数组进行动态内存分配   
#include<iostream>
#include<Cs ...

void remove(char string1[],char p)
{
        int i,j=0;
        char string2[10];
        for(i=0;i<strlen(string1);i++)
        {
                if(string1==p)
                        i++;
                else
                        string2[j++]=string1;
        }
这一段有问题。
1. if(string1==p)  中的string1是首地址,不是字符内容。
2.for循环里面的i++是干嘛的?
改成   
int j=0;
for(int i=0;i<strlen(string1);i++)
        {
                if(string1!=p)
                 tring2[j++]=string1;
        }
内存分配用new或malloc(看情况选择)
135楼2014-04-07 20:36:35
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

ylqc169

新虫 (初入文坛)


小木虫: 金币+0.5, 给个红包,谢谢回帖
刚开始学C# 很有挑战
136楼2014-05-05 10:08:25
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

cswfpp

新虫 (初入文坛)


小木虫: 金币+0.5, 给个红包,谢谢回帖
楼主你好,我最近在编写一个动态规划的程序,因为没有学过MATLAB,所以想用稍微了解些的C++。因为我的决策变量是二维的,所以不知道该怎么下手。麻烦问一下,如果用C++ 解线性规划,是不是必须要设计算法,而没有直接可用的工具箱?
PS:让x(i,j)为二维的决策变量,如果我给模型添加约束x(i,j)*x(j,i)=0,是不是就变成了非线性规划。
137楼2014-06-21 10:14:41
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

huzhao_hua

至尊木虫 (著名写手)


小木虫: 金币+0.5, 给个红包,谢谢回帖
引用回帖:
8楼: Originally posted by 波不动 at 2009-11-25 13:34:49
还是没人问问题的话,那我来问一个问题。

就是平时自己编了一个函数方法之类的东西,如何把它封装成DLL,有什么条件没?以便以后可以随时调用。因为我看见我们老师就是这么用的。他编的FFT程序,就是一个dll文件 ...

这应该要功能相同吧,要是不相同,还真不行,我用的是C#和SQL
快乐是我的本性,真诚更是我的本性!
138楼2014-07-16 15:20:12
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

my12321

新虫 (初入文坛)


小木虫: 金币+0.5, 给个红包,谢谢回帖
利用VS2010环境和C#语言编程实现图表控件的示例演示,完成坐标可调、坐标平移、曲线缩放、曲线滚动、添加图表题目、编辑横纵坐标等功能。     这个如何实现啊
139楼2014-08-16 10:17:53
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

明天不上课

木虫 (正式写手)

不说话


小木虫: 金币+0.5, 给个红包,谢谢回帖
楼主你好,我刚学c#不久,现在是想用一个winform控制一个电化学工作站的一个测试方法,实现在一定时间后的数据采集和结果保存的工作,不知可否提供一下思路,有什么推荐教程之类的?
每天都要奋斗
140楼2014-10-20 08:44:29
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 magic7004 的主题更新
普通表情 高级回复 (可上传附件)
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[教师之家] 售SCI一区T0P文章,我:8.O.55.1.O.5.4,科目全,可+急 +3 6GojgJvkDudM 2026-08-16 3/150 2026-08-17 09:49 by xLVPIRuSvCUe
[基金申请] 今天系统多次维护,明天很可能放榜! +5 zju2000 2026-08-16 5/250 2026-08-16 23:23 by Haru815
[基金申请] 2027广东省杰青 +3 奶牛小黑 2026-08-15 6/300 2026-08-16 20:07 by 奶牛小黑
[基金申请] 快农历七夕节了,轻松一下,男人悄悄话,女施主请不要进来。 +3 Tide man 2026-08-14 3/150 2026-08-16 17:47 by jurkat.1640
[基金申请] 我的国基提前知道中了,可是同事的操作让我实在接受不了,怎么会有这样的人 +11 家与远方 2026-08-10 16/800 2026-08-16 10:28 by ray43
[基金申请] 有时候,自然基金真的不能太认真 (我的申报经验) +10 majunge000 2026-08-11 12/600 2026-08-16 08:18 by xli1984
[精细化工] 招聘 金属平磨液,抛光液研发工程师 +3 小天0311 2026-08-14 3/150 2026-08-16 07:31 by H9PLUS
[基金申请] filecode=后面第一个是大写字母 +6 wangze12014 2026-08-14 7/350 2026-08-15 20:12 by gltch
[基金申请] 关于Filecode分析方法 +10 majunge000 2026-08-10 13/650 2026-08-15 12:26 by hanpeng972
[基金申请] 各位道友,我要去昆明玩几天,回来见。 +7 Tide man 2026-08-14 8/400 2026-08-15 01:11 by arzu_hma
[基金申请] 是这周出结果还是下周出结果? +4 yuleib84 2026-08-11 4/200 2026-08-14 23:05 by lfy8008
[基金申请] filecode +15 documentary 2026-08-10 17/850 2026-08-14 10:08 by kissu88
[基金申请] FileCode能看出啥? +10 要乐观耀哥 2026-08-10 32/1600 2026-08-14 09:37 by 要乐观耀哥
[基金申请] 重要来源:本周末出结果 +10 瞬息宇宙 2026-08-12 10/500 2026-08-13 15:46 by likettle
[基金申请] 不应该看fileCode +7 且听虎啸 2026-08-12 9/450 2026-08-13 14:27 by flydreamws
[基金申请] Filecode 又变了,巨变 +3 WH3796 2026-08-12 4/200 2026-08-13 14:13 by 小木虫6752397
[基金申请] 分享一下我之前已中青C的计划书的filecode +4 布布和一二 2026-08-11 5/250 2026-08-13 12:56 by cratir
[基金申请] 为什么网上很多人说本周 12号出结果 +6 瞬息宇宙 2026-08-10 7/350 2026-08-11 19:25 by Tide man
[基金申请] 什么时候出结果,有咨询渠道??? +3 Tide man 2026-08-11 3/150 2026-08-11 17:54 by kudofaye
[基金申请] 确定了,国自然21号放榜 +6 布布和一二 2026-08-10 7/350 2026-08-10 19:15 by 2000zf36392
信息提示
请填处理意见