 |
|
 |
i think if u have a menu based dialog , u can not opt to make it a child else your menus would be gone thanx
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hi techies,
I have created the dialog based application and for some unavoidable reasons, I was supposed to call another property sheet's DoModal function from the OnInitDialog function of my main application dialog class. Becoz of which task bar icon was not appearing. And then putting // Show the task bar icon ModifyStyleEx(0,WS_EX_APPWINDOW); this code in OnInitDialog of Property sheet worked and Task bar icon was appearing. But no luck with taskmanager list 
Any help in this will be great help to me. regards smitha
My application class
BOOL CFlowCalSIDlg::OnInitDialog() { CDialog::OnInitDialog(); // Add "About..." menu item to system menu. // IDM_ABOUTBOX must be in the system command range. ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); ASSERT(IDM_ABOUTBOX < 0xF000);
CMenu* pSysMenu = GetSystemMenu(FALSE); if (pSysMenu != NULL) { CString strAboutMenu; strAboutMenu.LoadString(IDS_ABOUTBOX); if (!strAboutMenu.IsEmpty()) { pSysMenu->AppendMenu(MF_SEPARATOR); pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); } }
// Set the icon for this dialog. The framework does this automatically // when the application's main window is not a dialog SetIcon(m_hIcon, TRUE); // Set big icon SetIcon(m_hIcon, FALSE); // Set small icon
**** My code goes here********** theApp.m_hMainWnd = m_hWnd; CMyPropertySheet pSheet( IDS_TITLE_FCFV /*_T( "My appl" )*/ ); pSheet.SetWizardMode(); pSheet.DoModal(); **** My code goes here**********
return TRUE; // return TRUE unless you set the focus to a control }
and in CMyPropertySheet.cpp file BOOL CMyPropertySheet::OnInitDialog() { //Set the sheet icon HICON hIcon = theApp.LoadIcon(MAKEINTRESOURCE(IDR_MAINFRAME)); SetIcon(hIcon, TRUE); // Set big icon. SetIcon(hIcon, FALSE); // Set small icon // Show the task bar icon ModifyStyleEx(0,WS_EX_APPWINDOW); return CPropertySheet::OnInitDialog(); }
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hi, Could you solve this problem. I am also having the same problem, if you find the solution please let me know.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
yes this was very useful , but i need to remove it fully not even in alt+tab combination. how do i make it,pl help me.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Sorry my english.
Here is what I did:
In the InitInstance() function inthe CWinapp derived class created by the wizard in a dialog project
...... //Create a new dinamic "CInvisibleDlg" object CInvisibleDlg* dlg = new CInvisibleDlg;
//Asingn the pointer to the m_pMainWnd variable m_pMainWnd = dlg;
//Call Run for the Cwinapp derived class to begin the message loop Run();
//When the dialog quits we delete it delete dlg; return FALSE; } //End of the InitInstance() function
//////////////////////////////////////////////////////////////////////////////
In the .RC file change the dialog's EXSTYLE from WS_EX_APPWINDOW to WS_EX_TOOLWINDOW
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION EXSTYLE WS_EX_TOOLWINDOW // Change WS_EX_APPWINDOW to WS_EX_TOOLWINDOW
and if you want a invisible window comment "WS_VISIBLE"
/////////////////////////////////////////////////////////////////////////////
And finally in the CDialog derived class, in this case "CInvisibleDlg", from within the Constructor just call Create( IDD ) were IDD is the resource simbol of the dialog template.
Just one last thing, in the dialog I override the function "OnOk()" to call "postQuitMessage( 0 )" because of another way the App never ends.
Hope This helps, and again sorry for my poor english.
|
| Sign In·View Thread·PermaLink | 5.00/5 |
|
|
|
 |
|
|
 |
|
 |
For any Doc/View application, change the fist argument in CreateEx() from 0 to WS_EX_TOOLWINDOW if you want to hide it from Alt-Tab. In this way, the created invisible window has WS_EX_TOOLWINDOW style, which does not appear in the task bar or in the window that appears when the user presses ALT+TAB. At the same time, invisible window's caption bar doesn't show up at all. No concern about the shrinked caption bar.
A perfect solution combined with Chris's code and MS WS_EX_TOOLWINDOW style.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
How I can add an icon in the left superior corner (title of program) in a SDI, without enabling Document/View Architecture Support in Step 1.
thank you
|
| Sign In·View Thread·PermaLink | 1.00/5 |
|
|
|
 |
|
 |
How I can add an icon in the left superior corner (title of program) in a SDI, without enabling Document/View Architecture Support in Step 1.
thank you
|
| Sign In·View Thread·PermaLink | 1.00/5 |
|
|
|
 |
|
 |
Hello I'm a graduating student with almost no experience in professional programming and I have a question: How can I make my Visual Basic 6.0 windows application to run and show only as tray icon and not on task bar?
Thank you in advance
mickey
|
| Sign In·View Thread·PermaLink | 1.33/5 |
|
|
|
 |
|
 |
Solution is
CMainFrame::OnCreate () { ...
HICON icon = (HICON)::GetClassLong(m_hWnd, GCL_HICON); if(icon) { HWND wnd = m_wndInvisible.m_hWnd;
::SetClassLong(wnd, GCL_HICON, (LONG)icon); ::SetClassLong(wnd, GCL_HICONSM, (LONG)icon); }
|
| Sign In·View Thread·PermaLink | 2.00/5 |
|
|
|
 |
|
 |
I am trying to make my dialog-box based application work as follows: - When the program starts, an icon in the status bar is created, but no icon in the taskbar
- When I press the icon in the status bar the application gets back to its normal state Give me a demo !
ZHANGYIFEI
|
| Sign In·View Thread·PermaLink | 2.75/5 |
|
|
|
 |
|
|
 |
|
 |
In MSDN, they tell you the following to accomplish the same thing.
"To prevent the window button from being placed on the taskbar, create the window with the WS_EX_TOOLWINDOW extended style."
|
| Sign In·View Thread·PermaLink | 5.00/5 |
|
|
|
 |
|
|
 |
|
 |
Yes you do, but you have to add one more line of code according to MSDN to remove the teensy-weensy caption bar, and here goes: "you must hide the window first (by calling ShowWindow with SW_HIDE)".
I made a small code example:
BOOL InitInstance(HINSTANCE hInstance, int nCmdShow) { HWND hWnd;
hInst = hInstance; // Store instance handle in our global variable
hWnd = CreateWindow(szWindowClass, szTitle, WS_EX_TOOLWINDOW, CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL);
if (!hWnd) { return FALSE; }
ShowWindow(hWnd, nCmdShow); UpdateWindow(hWnd);
// // Hide button in taskbar ShowWindow(hWnd, FALSE);
return TRUE; }
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Use the extended window style WS_EX_TOOLWINDOW combined with the window style WS_POPUP. No more taskbar icon !!!
|
| Sign In·View Thread·PermaLink | 1.00/5 |
|
|
|
 |
|
|
 |
|
|
 |
|
 |
Sorry for the late reply...
I've got it working in VC++6.0, VC++7.0 and VC++7.1 without any problems.. Do you or anyone else expirience any problems? Al it takes is some good look at the examples 
Albert van Peppen
|
| Sign In·View Thread·PermaLink | 2.00/5 |
|
|
|
 |
|
|
 |
|
|
 |
 | Java  Nick | 13:48 20 Jul '00 |
|
 |
Does anyone know how to write or spawn a Java application that sits on the Taskbar, but is hidden as in the example above? This would be like a service that runs in the background like NT
|
| Sign In·View Thread·PermaLink | 5.00/5 |
|
|
|
 |
|
|
 |
|
 |
Well, it's nice that the app icon doesn't appear duplicate (in the task bar ans the system trayy as well), but unfortunately, its task entry is also removed from the task LIST within the Task Manager if the window is minimized to the tray. How can I avoid that (I always need that task list entry to obtain the corresponding window handle by using FindWindow(...))???
Or, in other words: How do I wake up that minimized window from within another process/application?
|
| Sign In·View Thread·PermaLink | 1.80/5 |
|
|
|
 |