Hi,

 

I need to port a VisualBasic function to C++ (MFC). The VB function simply launches another application (Rasmol, RasWin.exe) and executes some commands in that application. This is the VB code I need to implement in C++:

If Not RasMolRunning Then
        RasMol = Shell(g_RasMolPath & "\raswin.exe", 1)
    Else
        txtDDE.LinkExecute "zap"
        AppActivate "RasMol"
    End If
   
    ' Tell RasMol what to do
    txtDDE.LinkTopic = "RasWin|System"
    txtDDE.LinkMode = LINK_MANUAL
    ' Clear RasMol
    txtDDE.LinkExecute "zoom 0"
    txtDDE.LinkExecute "load mdl " & m_rasMolFile
    'txtDDE.LinkExecute "spacefill 125"
    txtDDE.LinkExecute "wireframe 40"
    txtDDE.LinkExecute "zoom " & 100

    Exit Sub

 

I know how to use ShellExecuteEx (or CreateProcess) to run the application, however I don�t know how can I use the DDE commands (e.g. txtDDE.LinkExecute). I�ve never ever used VB �

Any help?

 

Thanks,

Carlos

Reply via email to