Hi, I need to start a program with errormode=SEM_NOALIGNMENTFAULTEXCEPT. I have made a small launcher program for this purpose. See here the code: SetErrorMode(SEM_NOALIGNMENTFAULTEXCEPT); PROCESS_INFORMATION pi; CreateProcess(TEXT("C:/app.exe"), NULL, NULL, NULL, false, 0, NULL, NULL, NULL, &pi);
With this code starts the application app.exe, but i am not sure that it is runnend as child. It need to be a child, otherwise it doesn't use the right errorcode. Do you know if i have done it right? If not, how can i start a application as child process? Or is there another way todo it? Thank you. Best regards, Willem
whofmans
Posts
-
Create child process -
Bold text in Listcontrol?Thanks for your help! Bold looks good.
-
Bold text in Listcontrol?Hi, I have a SDI application with a listcontrol. Some fields must be in BOLD. I have tried something with LOGFONT, but when i try to get the current logfont?, Windows gives a error at the moment that the application starts.
gxListCtrl::gxListCtrl (CString Text) { ... LOGFONT lfFont; GetFont()->GetLogFont(&lfFont);
:confused: Regards, Willem -
I have a editbox in my toolbar and want change background colorThanks! The editbox works, but how can i add a messagehandler? The "Add Message Handler" menu is not there. I have tried this.
BEGIN_MESSAGE_MAP(CStatusEditBox, CEdit) ON_WM_CTLCOLOR() END_MESSAGE_MAP()
I get the following compiler error: 'GetMessageMap' : member function not declared in 'CStatusEditBox' -
I have a editbox in my toolbar and want change background colorHi, I have a SDI application with a editbox in the toolbar, now i want give the editbox another background color. Can someone help me with this? I have tried to put a WM_CTLCOLOR handler in CAppView and in CMainFrame, but i don't receive the WM_CTLCOLOR message. Thanks, Willem
-
Looking for a Edit box where i can set the font size.Thanks!
-
Looking for a Edit box where i can set the font size.DavidCrow wrote: Yes, the Edit control is what you want. Just select a different font into its DC. okay, but how can i do that? thank you!
-
Looking for a Edit box where i can set the font size.Hi, I'm looking for an Edit box where i can set the font size something bigger. Do somebody know such of control?? Thanks, Willem
-
My app. under Win98? Problem with DLL'sgiant_hao wrote: you can link your program statically with MFC I have tried it, but then i get the error "Failed to create empty document", I get this error on the XP machine where i compiled the application. If i link the app normally, then the app runs fine!(under XP)
-
My app. under Win98? Problem with DLL'sHi, I have programmed a MFC application under Win XP, and now i try to run my app on Win98. I have copied the following files to the win98 system dir: MFC42.dll, msvcp60.dll, msvcrt.dll I get the following error: The MSVCRT.DLL file is linked to missing export NTDLL.DLL RtlGetNtVersionNumbers With Dependency Walker i see that the version of ntdll.dll not correct is for my app. When i copy a newer version of ntdll.dll to the system dir, windows doesnt start correctly. Have i copied the wrong MSVCRT.DLL? Which DLL's do you normally use? Thanks for helping me! Willem
-
Change menu name on run-timeThanks! Now automaticly all the menu-item texts goes through a translate function. So that my program works with different language's.
// TRANSLATE THE MENUS! CMenu *pMenu = GetMenu(); CMenu *pSubMenu; CMenu *pSubSubMenu; CString csMnuStr; for(int i=0; pMenu->GetMenuState(i, MF_BYPOSITION) != -1; i++) // MENU { if(pMenu->GetMenuString(i, csMnuStr, MF_BYPOSITION) < 1) // empty string continue; pMenu->ModifyMenu(i, MF_BYPOSITION, 0, theApp.translate(csMnuStr)); pSubMenu = pMenu->GetSubMenu(i); // Get menu items if(pSubMenu == NULL) // Submenu does not exist continue; for(int j=0; pSubMenu->GetMenuState(j, MF_BYPOSITION) != -1; j++) // SUBMENU { if(pSubMenu->GetMenuString(j, csMnuStr, MF_BYPOSITION) < 1) // empty string continue; pSubMenu->ModifyMenu(j, MF_BYPOSITION, 0, theApp.translate(csMnuStr)); pSubSubMenu = pSubMenu->GetSubMenu(j); // get sub menu items if(pSubSubMenu == NULL) // SubSubMenu does not exist continue; for(int k=0; pSubSubMenu->GetMenuState(k, MF_BYPOSITION) != -1; k++) // SUB-SUBMENU { if(pSubSubMenu->GetMenuString(k, csMnuStr, MF_BYPOSITION) < 1) // empty string continue; pSubSubMenu->ModifyMenu(k, MF_BYPOSITION, 0, theApp.translate(csMnuStr)); } } } DrawMenuBar();
Willem -
Change menu name on run-timeThanks! Now automaticly all the menu-item texts goes through a translate function. So that my program works with different language's.
// TRANSLATE THE MENUS! CMenu *pMenu = GetMenu(); CMenu *pSubMenu; CMenu *pSubSubMenu; CString csMnuStr; for(int i=0; pMenu->GetMenuState(i, MF_BYPOSITION) != -1; i++) // MENU { if(pMenu->GetMenuString(i, csMnuStr, MF_BYPOSITION) < 1) // empty string continue; pMenu->ModifyMenu(i, MF_BYPOSITION, 0, theApp.translate(csMnuStr)); pSubMenu = pMenu->GetSubMenu(i); // Get menu items if(pSubMenu == NULL) // Submenu does not exist continue; for(int j=0; pSubMenu->GetMenuState(j, MF_BYPOSITION) != -1; j++) // SUBMENU { if(pSubMenu->GetMenuString(j, csMnuStr, MF_BYPOSITION) < 1) // empty string continue; pSubMenu->ModifyMenu(j, MF_BYPOSITION, 0, theApp.translate(csMnuStr)); pSubSubMenu = pSubMenu->GetSubMenu(j); // get sub menu items if(pSubSubMenu == NULL) // SubSubMenu does not exist continue; for(int k=0; pSubSubMenu->GetMenuState(k, MF_BYPOSITION) != -1; k++) // SUB-SUBMENU { if(pSubSubMenu->GetMenuString(k, csMnuStr, MF_BYPOSITION) < 1) // empty string continue; pSubSubMenu->ModifyMenu(k, MF_BYPOSITION, 0, theApp.translate(csMnuStr)); } } } DrawMenuBar();
-
Change menu name on run-timeThanks! Now automaticly all the menu-item texts goes through a translate function. So that my program works with different language's.
// TRANSLATE THE MENUS! CMenu *pMenu = GetMenu(); CMenu *pSubMenu; CMenu *pSubSubMenu; CString csMnuStr; for(int i=0; pMenu->GetMenuState(i, MF_BYPOSITION) != -1; i++) // MENU { if(pMenu->GetMenuString(i, csMnuStr, MF_BYPOSITION) < 1) // empty string continue; pMenu->ModifyMenu(i, MF_BYPOSITION, 0, theApp.translate(csMnuStr)); pSubMenu = pMenu->GetSubMenu(i); // Get menu items if(pSubMenu == NULL) // Submenu does not exist continue; for(int j=0; pSubMenu->GetMenuState(j, MF_BYPOSITION) != -1; j++) // SUBMENU { if(pSubMenu->GetMenuString(j, csMnuStr, MF_BYPOSITION) < 1) // empty string continue; pSubMenu->ModifyMenu(j, MF_BYPOSITION, 0, theApp.translate(csMnuStr)); pSubSubMenu = pSubMenu->GetSubMenu(j); // get sub menu items if(pSubSubMenu == NULL) // SubSubMenu does not exist continue; for(int k=0; pSubSubMenu->GetMenuState(k, MF_BYPOSITION) != -1; k++) // SUB-SUBMENU { if(pSubSubMenu->GetMenuString(k, csMnuStr, MF_BYPOSITION) < 1) // empty string continue; pSubSubMenu->ModifyMenu(k, MF_BYPOSITION, 0, theApp.translate(csMnuStr)); } } } DrawMenuBar();
-
Change menu name on run-timeHello! How can i change a menu name on runtime. With the menu-name i mean by example "File", "Edit" or "Help". Submenu's is not a problem for me because they have a ResourceID, but the menu's that i want to change on runtime does not have that, or i can't find them? Thanks for helping me.
-
How to Translate a program or how can i make a program TranslatebleThank you all! I think i use the cmoonen's way. Only not with a Index integer but with the original string. The textfile looks then like this: "Hello" "Hallo" "Error" "Fout" If the string is not found in the textfile then i return the given string, otherwise the translated string will be returned.
-
How to Translate a program or how can i make a program TranslatebleHi, I have programmed a program with Dialogs, menu's, messageboxes, etc. Now it must be translated to different language's. Is there a way to do this fast? It should be great if everybody can translate the program without the sourcecode thus with a textfile or something. Please give some ideas. Thanks, Willem
-
Sorting a vector with structsHello, I would like to sort a vector(vlines), this is a vector with struct's(line). I want to sort the vector on name and on length.
struct line{ CString name; double length; }; vector vlines;
I know there is a function sort and that it uses a predikaat function.std::sort(vlines.begin(), vlines.end(), length()); std::sort(vlines.begin(), vlines.end(), name());
But how can i code the predikaat function's? or template's??:confused: I hope someone can help me? Thanks -
std::sort(....) -> error C2039: 'sort' : is not a member of 'std'Thanks, i get now some other errors but i think i can make it.
-
std::sort(....) -> error C2039: 'sort' : is not a member of 'std'Hi, I try to compile this code:
std::sort(actionlist.begin(), actionlist.end(), compareActionlist);
actionlist is a vector. But i get this error: error C2039: 'sort' : is not a member of 'std' I have tried to putusing namespace std
in the top, but that doesn't help. Can someone help me? Thanks! -
ListCtrl: How can i make the last column visible for the user?Hi, My column in the Listcontrol don't fit on the screen, how can i make the last column visible for the user? I know the method EnsureVisible(..) but this works only for the row's. Thanks