Microsoft KB Archive/116318

{| = Making Mouse Pointer Visible When Debug .FLL in Visual C++ =
 * width="100%"|

ID: Q116318

The information in this article applies to:


 * Microsoft FoxPro Library Construction Kit for Windows, versions 2.5, 2.6

SUMMARY
When you are attempting to debug a .FLL file, the mouse pointer will disappear while the debugger is active. Furthermore, when a Windows dialog box is used, the mouse will be disabled.

MORE INFORMATION
To avoid this problem, add the Windows ShowCursor function to the .FLL file. You can also use this technique to make the mouse active when calling Windows dialog boxes.

The following example calls the Windows Printer dialog box and makes it modal to Foxpro by passing the handle to the FoxPro window through the MainHwnd function found in FOXTOOLS.FLL.

Sample Code
FoxPro Code:

SET LIBRARY TO Foxtools.fll SET LIBRARY TO Printdlg.fll ADDITIVE

=printdlg(mainhwnd)

C Code: #include   #include    #include 

void FAR printdlg(ParamBlk FAR *prt) {       static     PRINTDLG pd; ShowCursor(TRUE); pd.lStructSize = sizeof(PRINTDLG); pd.hwndOwner  = (HWND)prt->p[0].val.ev_long; pd.hDevMode   = NULL; pd.hDevNames  = NULL; pd.Flags      = PD_RETURNDC; pd.nMinPage   = 1; pd.nMaxPage   = 1000; pd.nCopies       = 1;

PrintDlg(&pd); ShowCursor(FALSE); }

FoxInfo myFoxInfo[]={ {"PRINTDLG",(FPFI)printdlg,1,"I"}, };

FoxTable _FoxTable={ (FoxTable FAR*)0, sizeof(myFoxInfo) / sizeof(FoxInfo), myFoxInfo };