Thanks BlockInput() was what I was looking for. :)
rolfhorror
Posts
-
VC++ 6.0 MFC - Temp disable mouse and keyboard for 5 secs. -
VC++ 6.0 MFC - Temp disable mouse and keyboard for 5 secs.I'm developing an app that needs to shut off the monitor after a given time, much like a screensaver. I've done some googling but cannot seem to find anything that works or is relevant. My example function: void CMyAppDlg::OnTimer(UINT nIDEvent) { //Turn off monitor / standby - (depends on monitor) //my lcd only goes to "sleep". SendMessage(WM_SYSCOMMAND, SC_MONITORPOWER, 2); //<- this works, but is aborted ad soon as user move mouse or keys... //Here is where I need to "freeze" mouse and keybrd. //for 5 sec. or so, to prevent user from activating / wake up the //monitor again aborting the shutoff-command, so they realize it's shut //off. CDialog::OnTimer(nIDEvent); } Thanx! (VC++ 6.0 MFC, Win-XP)
-
Html element tooltip / title attribute in Opera kioskmode not showing? [modified]Let's take this example; in a html-doc:
"Hello world" tooltip/title does not show up in Opera kioskmode/fullscreen (not F11), nor does any other html element title attribute value.. Anyone know how to get opera to show this ? Cant seem to find a kioskmode switch to enable this.. Is this a opera bug ? (btw using Opera version 10.63. Linux and Windows) I really dont want to use javascript/css to make tooltip-popups. thx!
modified on Saturday, October 23, 2010 12:31 PM
-
vc++ 6 mfc, easiest way to pass variables between dlgs?thanx, this is what i was looking for :-)
-
vc++ 6 mfc, easiest way to pass variables between dlgs?thanx for you help :-)
-
vc++ 6 mfc, easiest way to pass variables between dlgs?i'm not here to flame, so no offense. it was all in good humor. :-) (by the way, i have that book)
-
vc++ 6 mfc, easiest way to pass variables between dlgs?thanx i'll look into that
-
vc++ 6 mfc, easiest way to pass variables between dlgs?when i say folder, i mean the "folder" at the bottom on the classtree with the name "Globals".
-
vc++ 6 mfc, easiest way to pass variables between dlgs?i have two dlgs which i want to access the same variable, i,ve got some global variables in the "Globals" folder but i cant access them from the childdlg. i thought global was GLOBAL? how to do this easy. thx
-
how to extract "versioninfo" from sourcecode?never mind i got it working thx
-
how to extract "versioninfo" from sourcecode?i have the following code, it compiles without error, but how can i extract this into a global CString that i can use later for ie in an messagebox or something? i've tried several names in the code but i cant get a hold of them.. //the code string FixedModuleVersion() { char file_name[ MAX_PATH ]; GetModuleFileName( ::GetModuleHandle( NULL ), file_name, MAX_PATH ); DWORD dwDummyHandle; DWORD len = GetFileVersionInfoSize( file_name, &dwDummyHandle ); vector buf( len ); ::GetFileVersionInfo( file_name, 0, len, buf.begin() ); unsigned int ver_length; LPVOID lpvi; ::VerQueryValue( buf.begin(), "\\", &lpvi, &ver_length ); VS_FIXEDFILEINFO fileInfo; fileInfo = *(VS_FIXEDFILEINFO*)lpvi; stringstream s; s <<HIWORD(fileInfo.dwFileVersionMS) <<"." <<LOWORD(fileInfo.dwFileVersionMS) <<"." <<HIWORD(fileInfo.dwFileVersionLS) <<"." <<LOWORD(fileInfo.dwFileVersionLS); return s.str(); } // // This routine will extract the version string from the // string version resource in the RC file for the current module. // Note that you must add version.lib to your project to // link to the Win32 versioning API calls. The actual call // VerQueryValue() uses a value of 040904B0 for the language // and character set. This value is equivalent to English // language text encoded using Unicode. // string StringModuleVersion() { char file_name[ MAX_PATH ]; GetModuleFileName( ::GetModuleHandle( NULL ), file_name, MAX_PATH ); DWORD dwDummyHandle; DWORD len = GetFileVersionInfoSize( file_name, &dwDummyHandle ); vector buf( len ); ::GetFileVersionInfo( file_name, 0, len, buf.begin() ); char *version; unsigned int ver_length; ::VerQueryValue( buf.begin(), "\\StringFileInfo\\040904B0\\FileVersion", (void **) &version, &ver_length ); return string( version, ver_length ); } //end - now how to get hold of something to use?
-
vc++ 6 mfc, dialog with child, messed upi have some updateData(),updatewindow(), and a "SetWindowPos(&wndTopMost,NULL,NULL,NULL,NULL,SWP_NOMOVE|SWP_NOSIZE);" funcs in the maindlg, maybe thats why the childdlg get overpainted? but i dont have it enabled on mousemove func.. strange.
-
vc++ 6 mfc, dialog with child, messed upthanx, but how do i find the name of the parent? ive tried some of my class names and so on.. i tried to find it in CWnd *pParent and the main dlg class, but i cant get a hold of it, ..errors.. even tried this: made a global var at the start of maindlg: CWnd* pParentWnd = CWnd::GetActiveWindow(); stored in pParentWnd CChildDlg *dlg; dlg = new CChildDlg; dlg->Create(IDD_CHILDDLG, pParentWnd); dlg->ShowWindow(true); // works fine until move the mouse, then messed up and its overpainted by the maindlg.. theres something im missing.. thx
modified on Wednesday, August 6, 2008 4:22 PM
-
vc++ 6 mfc, dialog with child, messed upi have a main dialog with some controls, i also have a second dialog(modeless) and i want to make it into child. when selected style "popup" in the child dlg properties the "child" dlg acts normal, but its not what i want, because i only want the child dlg to appear inside the main dlg, not anywhere else on the screen. opening the child dlg, when selected style "child" in the dlg properties, the main dlg gets painted onto the child dlg making it a transparent mess. how can i get the "child" dlg to be painted correctly? this is the code that opens the modeless "child" dlg: void CMyApp::OpenChDlg() { CChildDlg *dlg; dlg = new CChildDlg; dlg->Create(IDD_CHILDDLG); dlg->ShowWindow(true); } thx
-
VC++ 6, MFC, ComboBox, load list from file? [modified]yes, to load a list from a text-file into the combobox drop down list. some code to load the file and split it with commas or something, and then somthing like: m_myComboCtrl.AddString(1rstLineInFile); m_myComboCtrl.AddString(2ndLineInFile); and so on.
-
VC++ 6, MFC, ComboBox, load list from file? [modified]hi, is it possible to load a txt-file into the combobox list? any suggestions on how to do this easy.. tanx EDIT: nevermind, i found some working code to load csv files into combos dropdown..
modified on Saturday, June 7, 2008 8:17 AM
-
CBitmapButton mouseover change bitmap? (vc++ 6.0)tanx, i'll try that! :)
-
CBitmapButton mouseover change bitmap? (vc++ 6.0)hi, im sure this question is a regular one. i'm making an app with bitmapbuttons and want to change bitmap on the button when hovering over them can't seem to find any good articles about this subject. heres a code i've been trying out, cant seem to get it to work. //loaded the default button bitmaps in OnInitDialog() m_btn1.LoadBitmaps(IDB_MYBUTTON_DEFAULT); //this works and sets the bitmaps on my buttons //something like this is what i want to do void CMyDlg::OnMouseMove(UINT nFlags, CPoint point) { CRect m_Rect; m_btn1.GetWindowRect(m_Rect); if (m_Rect.PtInRect(point)) { //when mouse is over button change to this bitmap m_btn1.LoadBitmaps(IDB_MYBUTTON_OVER); } } any solutions? tanx :-)
-
include mfc42.dll in exe? (vc++ 6.0) [modified]tanx, this is awesome! :-)
-
include mfc42.dll in exe? (vc++ 6.0) [modified]ok, ill check it out. thanks for the help. :-)