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
H

heman154

@heman154
About
Posts
14
Topics
5
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Number of top level windows open
    H heman154

    Does anyone know how to find the number of windows open at a given time? I've looked into enumwindows and the find/get window functions, but there must be a way to just ask the window manager for this piece of information without having to iterate through all the windows. Thanks, ~Himanshu

    C / C++ / MFC tutorial question

  • detect Physical Memory size
    H heman154

    Yahoo! Thanks, exactly what I was looking for. ~Himanshu

    C / C++ / MFC hardware performance

  • detect Physical Memory size
    H heman154

    Does anyone know of a function that returns the total ram size that is available on the hardware that your application is running on. I change the logic of my code based on whether I have 128 MB or 256 MB of ram on a given unit. Thanks, Himanshu

    C / C++ / MFC hardware performance

  • how do i sense ctrl+C in a dialog based application?
    H heman154

    Use the RegisterHotKey Function. The function parameters let you input which window will receive the hotkey, and the specific key combination you need. Then in your window, place an ON_MESSAGE message map function that associates the WM_HOTKEY message with the function you want to call when the hotkey is pressed. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/keyboardinput/keyboardinputreference/keyboardinputfunctions/registerhotkey.asp[^]

    C / C++ / MFC question

  • Static functions or Normal Functions
    H heman154

    Look into the Singleton design pattern and see if that will work for you.

    C / C++ / MFC database question

  • A virtual function question
    H heman154

    Have you placed any breakpoints to determine exactly where the access violation occurs (When you try to call the function, or inside the function...may trying to manipulate another object that isn't there anymore). How does this Print Object get instantiated?

    C / C++ / MFC question help tutorial

  • set size of main application window at startup
    H heman154

    Have you tryed it? It's always worked for me. If you go on MSDN, the actual description is: "Call this member function to change the size, position, and Z-order of child, pop-up, and top-level windows." Also, make sure you put this in the OnCreate fcn.

    C / C++ / MFC question

  • set size of main application window at startup
    H heman154

    Use the following Cwnd function, BOOL SetWindowPos( const CWnd* pWndInsertAfter, int x, int y, int cx, int cy, UINT nFlags ); Do a search on this fcn in msdn to find out more.

    C / C++ / MFC question

  • PDF File Generation
    H heman154

    I had already seen a few of these utilities, but I just wanted to see if there was something in an existing API that would suit my needs (something I wouldn't have to pay for to distribute w/ my other software). Looks like that isn't possible, Thanks.

    C / C++ / MFC c++ json question

  • PDF File Generation
    H heman154

    Is there anything in the Win32 API or in MFC that I can use to create a very simple program that will convert a text file into a PDF?

    C / C++ / MFC c++ json question

  • Windows Hook
    H heman154

    If your application is has a window, use classview and add the windows message handler: OnQueryEndSession. In the body, return false, and your application will prevent any shutdown that does not use the EWX_FORCE switch. Himanshu

    C / C++ / MFC help question

  • help: Windows MessageBox prevents custom dialog from showing?
    H heman154

    I have a gui application that is launched via createprocess(...) from another gui application (that subsequently kills itself). This new application creates a secondary thread that creates a dialog (hidden) at thread creation. I am looking for windows shutdown requests on this secondary dialog (using onQueryEndSession()), and then attempt to show this dialog. It works correctly for most cases (e.g. when I press ctrl+alt+delete and then select shutdown), but sometimes I get a "System Settings Change" Message Box which appears after new devices installed. In this scenario, my application catches and prevents the shutdown request, but fails to throw up the dialog when I use ShowWindow(SW_SHOWNORMAL) (by the way, its modeless). Does anyone know why a messagebox like this would cause this behaviour? I found that uninstalling a device brings up a similar messagebox (same caption, different text), but in this test my modeless dialog does appear. Any suggestions would be appreciated. Thanks, Himanshu

    C / C++ / MFC help question

  • How to detect a system shutdown?
    H heman154

    Thanks for the suggestion, but I don't think that will be sufficient for my case. I need to know before the upgrader app gets WM_ENDSESSION. The reason is that the the message could come at some finite time after I have started, and if the timing is right, then I could be somewhere in between deleting and replacing the system files (The upgrader actually updates a remote module that takes a total of ~40 minutes, so it wouldn't be essy closeout the processing in OnEndSession). I would like to use some sort of API fcn that I could call before I start the transfer, so that I know I can guarantee that windows is not shutting down before the upgrade starts. It looks like there might not be one available. I guess I'll try to use another application to capture the QueryEndSession and then have the information available to the Upgrader at startup. Thanks, Himanshu

    C / C++ / MFC database design help tutorial question

  • How to detect a system shutdown?
    H heman154

    Is there a way to query windows to determine if a system shutdown is imminent? I have a user interface application which provides the option to execute an upgrader application. This upgrader application deletes some system files and then transfers new system files in place. The problem is that due to driver install (upgrade files are stored on a pcmcia card and windows asks to shutdown after the drivers are loaded sometimes), windows will sometimes send a messagebox asking for the unit to be restarted, which is very bad if the user selects ok when systems files have been deleted and not replaced yet. I've already put a handler function for the WM_QUERYENDSESSION message in the upgrader app (which works fine), but I still need to trap the condition in which the WM_QUERYENDSESSION message is sent before the upgrader application starts (in which case, the application missed this message). If I can find out if the shutdown is imminent, I can prevent the file transfer. Thanks, Himanshu

    C / C++ / MFC database design help tutorial question
  • Login

  • Don't have an account? Register

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