You can allocate the buffer with VirtualAlloc() and then use VirtualProtect() with PAGE_READONLY - by every change of the region exception (access violation) will be generated. Debugger will catch this exception like a breakpoint (for example, DebugBreak()). If you wish to use this exception in...
If it really must be net WM_CTLCOLOREDIT, try so:
case WM_CTLCOLORSTATIC:
hwndtemp = (HWND)lParam;
hdc = (HDC)wParam;
if(hwndtemp == hCaption1)
{
SetTextColor(hdc,RGB(0,255,255));
SetBkColor(hdc,RGB(0,0,0));
return (BOOL)GetStockObject(NULL_BRUSH); //Or COLOR_BACKGROUND or what You wish...
}
break;
If You really wish to hold processor for exactly 1 ms, You can make it from a driver only, that hooks int0 (from system timer). So you can add to Windows real time task.
_ConnectionPtr m_pConnection = NULL; //pointer m_pConnection is NULL here
//This line can't make m_pConnection != NULL
m_pConnection.CreateInstance( __uuidof(Connection) );
//You use a NULL pointer m_pConnection here - it will not work
m_pConnection->ConnectionString = "DSN=myExcel;UID=;PWD="...
The problem with MFC DLLs is wrong ResourceHandle (it is the handle of executable called LoadLibrary(), not dll!). You can change this handle with AfxSetResourceHandle(m_Hinst_of_your_dll) and then call DoModal().
Do not forget to restore old handle after it!
Every application on Win NT/2K/XP can read/write registry on both computers (A and B in Your sample), if it (or user started it) has enough rights. With API RegConnectRegistry() You can force application to access registry on computer You needs. To find out, if exe is local or resided on another...
It should be in MFC so:
::EnableWindow( hwDeleteButton, FALSE );
:: says compiler / linker to use Window's EnableWindow() instead of CWnd::EnableWindow().
You should be an administrator (on some 2000/XP systems the only way is to log on as Administrator, not another user from admin group) or have write rights for all system (sub)folders.
Then, You may have a bad profile (do not ask me why, but i have had such problem too - i could not work with MS...
You may be have not enough rights on drive f: or some it's subfolders, where afxwin1.inl is. Release does not need this file, only debugger.
Debug symbols can be wrong installed too.
>IonFilipsky
I know this technologies, but there are lot of questions on the forum, where people hope to find a very simple solution (couple lines of code). And my answer says only, here is no such easy solution - You says the same, but with many words.
hashimsaleem,
if You wish to use...
You can show a dialog instead:
//Modeless dialog
HWND hDlg = CreateDialogParam(GetModuleHandle(NULL), MAKEINTRESOURCE(IDD_MY_DLG), NULL, (DLGPROC)DlgMy_Proc, (LPARAM)NULL);
ShowWindow(hDlg, SW_SHOWNOACTIVATE);
RedrawWindow(hDlg, NULL, NULL, RDW_UPDATENOW); //To show texts
//Make inits You needs...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.