Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. tchouch

    How do I open a dialog window resource when a user clicks a button?

    Try to show parent window (hwndChild) with ShowWindow() before create the dialog. I hope, You use right CompassDlgProc().
  2. tchouch

    DEBUGGER VERBAGE

    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...
  3. tchouch

    How do I get text from a MFC view (I think) in another app?

    May be it will work with EM_STREAMOUT?
  4. tchouch

    WM_CTLCOLORSTATIC does not work

    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;
  5. tchouch

    Alternative to Sleep-Function

    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.
  6. tchouch

    ADO and ODBC newbie question! ;)

    _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="...
  7. tchouch

    1812 error when trying to create dialog

    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!
  8. tchouch

    CDocument: go to a line

    int nPos = GetView()->GetRichEditCtrl().LineIndex(Line_Number - 1); GetView()->GetRichEditCtrl().SetSel(nPos, nPos); //Only cursor without chars selection
  9. tchouch

    Catch CloseWindow and DestroyWindow

    You can hook/catch messages WM_CLOSE and WM_DESTROY (or work with their handlers ON_WM_CLOSE( ) and ON_WM_DESTROY( ) in MFC).
  10. tchouch

    Across network, where does SetRegKeyValue write?

    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...
  11. tchouch

    NetShareAdd problem

    Try to add this: SHChangeNotify(SHCNE_NETSHARE, SHCNF_PATH, pDirectoryToShare, NULL);
  12. tchouch

    Disable a button in a dialog that host ActiveX control

    It should be in MFC so: ::EnableWindow( hwDeleteButton, FALSE ); :: says compiler / linker to use Window's EnableWindow() instead of CWnd::EnableWindow().
  13. tchouch

    Ghostscript?

    And what debugger else says? An iterface of that obj (CLSID in Registry) may be wrong installed too.
  14. tchouch

    Problems installing Visual C++.net

    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...
  15. tchouch

    Cfiledialog problem in debug version

    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.
  16. tchouch

    How to drag a bitmap?

    >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...
  17. tchouch

    SystemShutdown From Within a Service

    Try to call CreateService() with SERVICE_WIN32_OWN_PROCESS | SERVICE_INTERACTIVE_PROCESS by creating the service.
  18. tchouch

    How to drag a bitmap?

    You must write a program that does this - there are no such APIs.
  19. tchouch

    Static text invisible on dialog

    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...
  20. tchouch

    Folder creation Question (n00b!)

    CreateDirectory( "c:\PGQ\dump", NULL);

Part and Inventory Search

Back
Top