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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
F

Flit

@Flit
About
Posts
18
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • FindFirstPrinterChangeNotification fails on XP laptop.
    F Flit

    Hi Graham, thanks for your help you set me on the right track. I installed a new printer on the laptop and it worked fine, the printer I was testing with previously was a network printer. I went to check on the network printer and it turned out that one of the helpful folk here had unplugged it because they needed the power outlet. I guess this happened between my succesful tests and when I started testing on the laptop. I've added in some code to disregard any printers that aren't available and it's working fine. Thankyou.

    C / C++ / MFC help

  • FindFirstPrinterChangeNotification fails on XP laptop.
    F Flit

    Hi DavidCrow, thanks for the response. FindFirstPrinterChangeNotification returns INVALID_HANDLE_VALUE. GetLastError returns ERROR_CALL_NOT_IMPLEMENTED.

    C / C++ / MFC help

  • FindFirstPrinterChangeNotification fails on XP laptop.
    F Flit

    Howdy folks, I'm having a little problem with FindFirstPrinterChangeNotification that has got me baffled. When I call this function on a laptop running XP Pro SP2 I get this error: This function is not supported on this system. However this same .exe works fine on the other XP systems I've tested it on and calls the function with no problems. If anyone has any insight into what could be causing this problem I would be very grateful for the help. Thanks folks.

    C / C++ / MFC help

  • pop up message
    F Flit

    You can use CreateWindowEx to create buttons.

    C / C++ / MFC c++ help question

  • Program executes automatically
    F Flit

    All methods require some level of interaction. If there is no interaction how will the computer know what you want it to do? Putting an entry in the registry at HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run will cause your application to run when a user logs on. This does require interaction but it is very minimal and only needs to be done once. Also if there is no interaction at all how will you get your application onto the target machine?

    C / C++ / MFC windows-admin tutorial question

  • How to record voice using DirectSound..?
    F Flit

    Is it essential that you use DirectSound? If not try using mciSendString, you can do all the things you want very easily using this function.

    C / C++ / MFC graphics game-dev help tutorial question

  • Program executes automatically
    F Flit

    Use Task Scheduler to run the executable at the desired time. That is the simplest way.

    C / C++ / MFC windows-admin tutorial question

  • focus to the current instance of a program
    F Flit

    ClassName is the name of the type of class of the window you are looking for. Such as the name you used when you called RegisterClass. WindowName is the name of the window you wish to find. This is the window title. Such as "The Code Project - Free Source Code and Tutorials - Internet Explorer". Read the MSDN entry for FindWindow, that should explain it better than me. Hope this is helpful.

    C / C++ / MFC question c++ com tools

  • WM_MOUSEMOVE
    F Flit

    You could create a region around the picture and then use PtInRegion in your WM_MOUSEMOVE handler to check if the mouse is over the picture. If it is then you can make the alterations to the picture, if not leave it as is. Hope this is of some help.

    C / C++ / MFC help

  • joystick button as mousebutton
    F Flit

    Hi, I think the mouse_event function is what you are looking for. Hope it does the trick.

    C / C++ / MFC question

  • pop up message
    F Flit

    One way of doing this would be to create a window using CreateWindow then at the appropriate times use ShowWindow or SetWindowPos to show or hide the window. If you want it positioned in the lower right corner of the screen you'll need to know how big the screen area is, use SystemParametersInfo with the SPI_GETWORKAREA flag to get that. You'll also need to know how big your window is GetWindowRect will tell you that. Then use that information with SetWindowPos to position the window where you want it. Don't forget that the taskbar isn't always at the bottom of the screen. You could also try using a Dialog window. Have a look at the relevant pages in MSDN and that should get you started. Good luck.

    C / C++ / MFC c++ help question

  • focus to the current instance of a program
    F Flit

    This is how I limit my apps to a single instance and activate the first instance if another is run. HANDLE hm = CreateMutex(NULL, TRUE, "Mutex Name"); DWORD dw = GetLastError(); if(dw == ERROR_ALREADY_EXISTS) { SetForegroundWindow(FindWindow("ClassName", "WindowName")); return(0); } There are probably better ways but this is the simplest I know and has always worked just fine.

    C / C++ / MFC question c++ com tools

  • Capture handle of window from process id
    F Flit

    You could use EnumWindows. In the EnumWindowsProc call GetWindowThreadProcessId and compare the process id with the one you have, if they match then that window belongs to the process in question. You should be able to build up a list of all the windows that belong to the process.

    C / C++ / MFC help tutorial

  • Display DIB when I have its handle (HBITMAP)
    F Flit

    Create a memory device context and then select the bitmap into it using SelectObject. You can then use BitBlt to copy it to the DC of your window to display it. Have a look at the Windows GDI section of MSDN, that might help.

    C / C++ / MFC question

  • ScreenSaver Notification
    F Flit

    If you set a system wide hook for mouse and keyboard when you detect the screen saver has started you'll be able tell when the screen saver has stopped as it is mouse and keyboard activity that they respond to. Remember that for a system wide keyboard/mouse hook the hook functions need to be in a dll.

    C / C++ / MFC question

  • ScreenSaver Notification
    F Flit

    I saw this article in the MSDN, hope it helps. HOWTO: Know When Your Screen Saver Starts ID: Q238882

    C / C++ / MFC question

  • NT Service shutdown.
    F Flit

    Hi, I'm creating an NT Service class. I'm having trouble making it shutdown. It responds to the SERVICE_CONTROL_STOP message okay but when it receives the SERVICE_CONTROL_SHUTDOWN message it doesn't terminate at all. I'm running it on NT Server 4.0 no service packs. Does anyone know of anything special I need to do to shutdown my service. Any help would be appreciated. Thanks for reading. Flit.

    C / C++ / MFC sysadmin help

  • Creating shares that survive a restart?
    F Flit

    I'm trying to share a directory on the local machine(Win98) using NetShareAdd. I fill in the share_info_50 structure and run the code and it works fine, I check and the directory is shared. Restart the computer however and the directory is no longer shared. I haven't managed to find any documentation on this so far, I thought perhaps another function needed to be called to update the registry, where I assume information about shares is stored. If anyone has any clues that would help me along I'd love to hear them. --- Flit@tpg.com.au

    C / C++ / MFC com windows-admin help question announcement
  • Login

  • Don't have an account? Register

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