24小时热门版块排行榜    

查看: 8225  |  回复: 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 的主题更新
普通表情 高级回复 (可上传附件)
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 332求调剂 +6 Zz版 2026-03-13 6/300 2026-03-17 17:03 by ruiyingmiao
[考研] 材料工程专硕调剂 +4 204818@lcx 2026-03-17 4/200 2026-03-17 16:58 by ruiyingmiao
[考研] 085600材料与化工 +4 安全上岸! 2026-03-16 4/200 2026-03-17 14:02 by 勇敢太监王公公
[考研] 289求调剂 +6 步川酷紫123 2026-03-11 6/300 2026-03-17 10:23 by Sammy2
[考研] 304求调剂 +7 小熊joy 2026-03-14 7/350 2026-03-17 08:53 by 雾散后相遇lc
[考研] 药学383 求调剂 +3 药学chy 2026-03-15 4/200 2026-03-16 20:51 by 元子^0^
[基金申请] 今年的国基金是打分制吗? 50+3 zhanghaozhu 2026-03-14 3/150 2026-03-16 17:07 by 北京莱茵润色
[考研] 318求调剂 +3 Yanyali 2026-03-15 3/150 2026-03-16 16:41 by houyaoxu
[考研] 0703化学调剂 +6 妮妮ninicgb 2026-03-15 9/450 2026-03-16 16:40 by houyaoxu
[考研] 283求调剂 +10 小楼。 2026-03-12 14/700 2026-03-16 16:08 by 13811244083
[考研] 求老师收留调剂 +4 jiang姜66 2026-03-14 5/250 2026-03-15 20:11 by Winj1e
[考研] 308 085701 四六级已过求调剂 +7 温乔乔乔乔 2026-03-12 14/700 2026-03-14 10:49 by JourneyLucky
[考研] 材料与化工(0856)304求B区调剂 +6 邱gl 2026-03-12 7/350 2026-03-13 23:24 by 邱gl
[考研] 求材料调剂 085600英一数二总分302 前三科235 精通机器学习 一志愿哈工大 +4 林yaxin 2026-03-12 4/200 2026-03-13 22:04 by 星空星月
[考研] 26调剂/材料/英一数二/总分289/已过A区线 +6 步川酷紫123 2026-03-13 6/300 2026-03-13 21:59 by 星空星月
[考研] 0703化学求调剂 +7 绿豆芹菜汤 2026-03-12 7/350 2026-03-13 17:25 by njzyff
[考研] 材料301分求调剂 +5 Liyouyumairs 2026-03-12 5/250 2026-03-13 14:42 by JourneyLucky
[考研] 321求调剂(食品/专硕) +3 xc321 2026-03-12 6/300 2026-03-13 08:45 by xc321
[考博] 26读博 +4 Rui135246 2026-03-12 10/500 2026-03-13 07:15 by gaobiao
[基金申请] 提交后的基金本子,已让学校撤回了,可否换口子提交 +3 dut_pfx 2026-03-10 3/150 2026-03-11 08:38 by kudofaye
信息提示
请填处理意见