int _tmain(int argc, _TCHAR* argv[]) { if (argc < 3) { return 0; } fileName = argv[1]; openApp(argv[2]); isOpen = true; //fileType = argv[2]; while (true) { EnumWindows(EnumWindowsProc, NULL); /* std::cout << isFind << std::endl; std::cout << isOpen << std::endl;*/ if (!isFind && isOpen) { char* temp = WcharToChar(fileName); std::cout << "{\"name\":" << "\"" << temp << "\"" << "," << "\"status\":" << "\"close\"}" << std::endl; delete[] temp; break; } isFind = false; //break; Sleep(1000); } return 0; }
static void iconOpenCb(Widget w, XtPointer client_data, XtPointer call_data) { DTIconRec *dticon = (DTIconRec *) client_data; openApp(dticon->app.form, True); }
static void openIconCb(Widget w, XEvent *event, String *params, Cardinal *num_params) { dticons_blocked = False; openApp(w, True); }