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
  1. Home
  2. General Programming
  3. Managed C++/CLI
  4. minimizing dialog to system tray

minimizing dialog to system tray

Scheduled Pinned Locked Moved Managed C++/CLI
helpcollaborationtutoriallearning
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dona jain
    wrote on last edited by
    #1

    i succeeded in making tray icon..bur how to minimize it to tray only when i click on minimize button.also after filling all three field which are asked and then when i press ok i want the dialog window to minimize to taskbar icon..please help me...my code is as follows: #include #include "resource.h" #include #include #include #include #include #include "FileOperation.h" #include #define WM_ICON_NOTIFY WM_USER+1 //--------------------------------------------------------------------------- LPSTR lpString; HWND hWnd; LRESULT CALLBACK DlgProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); //--------------------------------------------------------------------------- INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,LPSTR lpCmdLine, int nCmdShow) { DialogBox(hInstance, MAKEINTRESOURCE(IDD_DLGFIRST),hWnd, reinterpret_cast(DlgProc)); return FALSE; } //--------------------------------------------------------------------------- LRESULT CALLBACK DlgProc(HWND hWndDlg, UINT Msg, WPARAM wParam, LPARAM lParam) { char cPath[20]; char cUserName[20]; char cPassword[20]; switch(Msg) { case WM_INITDIALOG: { } case WM_ICON_NOTIFY: { } case WM_LBUTTONDBLCLK: { ShowWindow(hWndDlg, IDD_DLGFIRST); break; } break; case WM_COMMAND: { switch(wParam) { case IDOK: { size_t nLen; GetDlgItemText(hWndDlg, IDC_EDIT1, cPath, 20); nLen = strlen(cPath); if (nLen == 0) { MessageBox(hWndDlg,"Please Enter SVN Path","Error",MB_ICONERROR); break; } GetDlgItemText(hWndDlg, IDC_EDIT2, cUserName, 20); nLen = strlen(cUserName); if (nLen == 0) { MessageBox(hWndDlg,"Please Enter your user name","Error",MB_ICONERROR); break; } GetDlgItemText(hWndDlg, IDC_EDIT3, cPassword, 20); nLen = strlen(cPassword); if (nLen == 0) { MessageBox(hWndDlg,"Please Enter your Password ","Error",MB_ICONERROR); break; } /*EndDialog(hWndDlg, 0);*/ /*std::ofstream file ("config.txt"); file << " SVN Path entered by user is -> "<" <"<

    M 1 Reply Last reply
    0
    • D dona jain

      i succeeded in making tray icon..bur how to minimize it to tray only when i click on minimize button.also after filling all three field which are asked and then when i press ok i want the dialog window to minimize to taskbar icon..please help me...my code is as follows: #include #include "resource.h" #include #include #include #include #include #include "FileOperation.h" #include #define WM_ICON_NOTIFY WM_USER+1 //--------------------------------------------------------------------------- LPSTR lpString; HWND hWnd; LRESULT CALLBACK DlgProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); //--------------------------------------------------------------------------- INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,LPSTR lpCmdLine, int nCmdShow) { DialogBox(hInstance, MAKEINTRESOURCE(IDD_DLGFIRST),hWnd, reinterpret_cast(DlgProc)); return FALSE; } //--------------------------------------------------------------------------- LRESULT CALLBACK DlgProc(HWND hWndDlg, UINT Msg, WPARAM wParam, LPARAM lParam) { char cPath[20]; char cUserName[20]; char cPassword[20]; switch(Msg) { case WM_INITDIALOG: { } case WM_ICON_NOTIFY: { } case WM_LBUTTONDBLCLK: { ShowWindow(hWndDlg, IDD_DLGFIRST); break; } break; case WM_COMMAND: { switch(wParam) { case IDOK: { size_t nLen; GetDlgItemText(hWndDlg, IDC_EDIT1, cPath, 20); nLen = strlen(cPath); if (nLen == 0) { MessageBox(hWndDlg,"Please Enter SVN Path","Error",MB_ICONERROR); break; } GetDlgItemText(hWndDlg, IDC_EDIT2, cUserName, 20); nLen = strlen(cUserName); if (nLen == 0) { MessageBox(hWndDlg,"Please Enter your user name","Error",MB_ICONERROR); break; } GetDlgItemText(hWndDlg, IDC_EDIT3, cPassword, 20); nLen = strlen(cPassword); if (nLen == 0) { MessageBox(hWndDlg,"Please Enter your Password ","Error",MB_ICONERROR); break; } /*EndDialog(hWndDlg, 0);*/ /*std::ofstream file ("config.txt"); file << " SVN Path entered by user is -> "<" <"<

      M Offline
      M Offline
      Mark Salsbery
      wrote on last edited by
      #2

      Still haven't found the right discussion board?

      Mark Salsbery Microsoft MVP - Visual C++ :java:

      I 1 Reply Last reply
      0
      • M Mark Salsbery

        Still haven't found the right discussion board?

        Mark Salsbery Microsoft MVP - Visual C++ :java:

        I Offline
        I Offline
        iddqd515
        wrote on last edited by
        #3

        but reading is so hard :(

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

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