Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
P

pgibson007700

@pgibson007700
About
Posts
15
Topics
6
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Hook Print Dialog in Word
    P pgibson007700

    Hi, gave up with this project a long while ago - never got any where with the Office products. I was using madCodeHook see http://www.madcodehook.com/madCodeHookDescription.htm[^] which worked for every application I tried except the Office suite ! The project as I said is now long forgotten and I don't write code anymore - retired due to ill health.

    C / C++ / MFC csharp visual-studio json help question

  • FindNextPrinterChangeNotification - Invalid Handle
    P pgibson007700

    Sorry no never got it working, abandoned the project a year or so ago.

    C / C++ / MFC sysadmin c++ json tutorial question

  • Hook Print Dialog in Word
    P pgibson007700

    Mike, thanks for that, I'll tackle the problem another way.:)

    C / C++ / MFC csharp visual-studio json help question

  • Hook Print Dialog in Word
    P pgibson007700

    I am using a system wide hookapi DLL which hooks StartDocA, StartDocW, EndDoc, PrintDlgExA, PrintDlgExW the latter so I can obtain the number of copies, page range etc. My hook DLL works for NotePad, WordPad etc but the problem I have is Word (and I presume the other Office applications) does not appear to use PrintDlgA, PrintDlgW, or the Ex versions to display the Print dialog and hence I cannot obtain the number of copies, page range etc. Does anyone know which API Word is using to display the Print dialog ? I am using Visual Studio .NET 2003, Windows XP (with SP2) and Office XP. Thanks in advance :confused:

    C / C++ / MFC csharp visual-studio json help question

  • Hook Print Dialog in Word
    P pgibson007700

    I am using a system wide hookapi DLL which hooks StartDocA, StartDocW, EndDoc, PrintDlgExA, PrintDlgExW the latter so I can obtain number of copies, page range etc. My hook DLL works for NotePad, WordPad etc but the problem I have is Word (and I presume the other Office applications) do not appear to use PrintDlgA, PrintDlgW, or the Ex versions to display their Print dialogs and hence I cannot obtain the number of copies, page range etc. Does anyone know which API Word is using to display the Print dialog ? Thanks in advance :confused:

    C / C++ / MFC json help question

  • How to hook windows'socket functions using SetWindowsHookEx function
    P pgibson007700

    You could look at the following http://www.codeproject.com/dll/apihijack.asp[^] which has a simple example showing how to hook API's.

    C / C++ / MFC help tutorial

  • Printer port ipaddress [modified]
    P pgibson007700

    The portname returned on our network for 'standard tcp/ip' always starts with IP_, so if this is returned strip of the IP_ and the rest is your IP address. Hope this helps.

    C / C++ / MFC question

  • At StartDoc obtain the current printer name
    P pgibson007700

    I'm trying to obtain when the user starts printing, by having a global hook for StartDoc, what is the name of the printer that is currently selected, any ideas on how to obtain this ? Using VC++ 6.0 and Windows XP.

    C / C++ / MFC question c++ tutorial

  • How to use Tokenize() wid CStrings in VC6
    P pgibson007700

    How about this little class http://www.codeproject.com/string/ctokenex.asp[^]

    C / C++ / MFC csharp c++ help tutorial

  • FindNextPrinterChangeNotification - Invalid Handle
    P pgibson007700

    here is my code, I have taken out some debug strings, but the printername is valid as are the values of the handles returned. The code has been taken from the Microsoft Printmon example with just a few changes as I am using this in a class, hence the use of 'this' // setup printer name strcpy (pPrinterName, this->m_PrinterName); // open Printer, if access denied return ZeroMemory (&pd, sizeof (pd)); pd.DesiredAccess = PRINTER_ACCESS_USE; if((nReturn = OpenPrinter (pPrinterName, &hPrinter, &pd)) == ERROR_ACCESS_DENIED) return FALSE; // initialize local copy of the printer queue data ZeroMemory (&Queue, sizeof(Queue)); Queue.Printer.hPrinter = hPrinter; GetQueue (&Queue); // prepare for notifications, we want when a job is added, check for an error hPrinterNotification = FindFirstPrinterChangeNotification (hPrinter, PRINTER_CHANGE_JOB, 0, &NotificationOptions); if (hPrinterNotification == INVALID_HANDLE_VALUE) return 0; Queue.Printer.hPrinterNotification = hPrinterNotification; // loop while we are stilling waiting on Notifications while (Queue.Printer.hPrinterNotification != INVALID_HANDLE_VALUE) { if (WaitForSingleObject (Queue.Printer.hPrinterNotification, INFINITE) == WAIT_OBJECT_0) { // get the changes and reset the notification if (!FindNextPrinterChangeNotification (Queue.Printer.hPrinterNotification, &dwWaitResult, &NotificationOptions, (void **)&pNotification)) { ErrorBox(GetLastError(), "FindNextPrinterChangeNotification ...failed\r\n"); } Note also that the Printmon example also fails at the FindNextPrinterChange call with an invalid handle when the printer is a network one, so the error is consistent.

    C / C++ / MFC sysadmin c++ json tutorial question

  • FindNextPrinterChangeNotification - Invalid Handle
    P pgibson007700

    Using the tried and trusted ErrorBox method as follows void ErrorBox (DWORD dwError, LPCSTR lpString) { #define MAX_MSG_BUF_SIZE 512 char *msgBuf; DWORD cMsgLen; cMsgLen = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ALLOCATE_BUFFER | 40, NULL, dwError, MAKELANGID(0, SUBLANG_ENGLISH_US), (LPTSTR) &msgBuf, MAX_MSG_BUF_SIZE, NULL); MessageBox( NULL, msgBuf, lpString, MB_OK ); LocalFree( msgBuf ); #undef MAX_MSG_BUF_SIZE it displays ... each and every time for a network printer ! The handle is invalid.

    C / C++ / MFC sysadmin c++ json tutorial question

  • StartDoc not being called by word
    P pgibson007700

    I have an application that hooks startdoca, startdocw, enddoc, startpage and endpage api's, however when using Microsoft Word (winword.exe) startdoca/w does not get called, anyone know what other api is starting the printing process ? Using APISPY32 from Matt Pietrek I can see that startpage/endpage and enddoc are being called but no startdoca/w, what gives ? Notepad for example has a startdocw call why not winword anybody know ?

    C / C++ / MFC json tutorial question

  • Reading INF file
    P pgibson007700

    I have a VC++ application where I need to read (and sometimes parse) the contents of various printer manufacturers INF files to populate a listbox to enable our users to select which printer to install. I am stuggling to find example code using the following setupapi calls SetupGetLineByIndex SetupGetStringField I have tried using the Profile api's also, but some INF's are better than others and using GetPrivateProfileSection doesn't always work successfully and involves rather messing string handling. Any help would be appreciated, many thanks in advance.

    C / C++ / MFC c++ json help tutorial

  • Right click on listview item display context menu
    P pgibson007700

    I have not written any code yet to process the right click, all I want to do is what Printers and faxes does i.e displays menu with Open, Printing Preferences..., Properties etc, remember my list control with only contain a text item, which is the name of the printer. Therefore I can obtain server name etc and use OpenPrinter to obtain a handle etc.

    C / C++ / MFC question c++ tutorial

  • Right click on listview item display context menu
    P pgibson007700

    Hi I have a listview control, created with single selection, the list contains the names of printers, port names etc. When I right click an item how can I display the context menu that is displayed when you right click a printer object in Printers and Faxes ? i.e the user sees the same menu to be able to delete/rename printer, click the properties item etc. I'm using Visual C++ 6.0 on Windows XP, and know how to obtain a handle and open the printer in question and use the PrinterProperties call, but I want to display the menu as you can in Printers and Faxes. Thanks in advance

    C / C++ / MFC question c++ tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups