|
You can't prevent your window from losing focus to something else. Imagine if two programs did this - they would constantly be fighting over which one is the active window. What is it about your app that makes you want to prevent other windows from being active?
--Mike--
Visual C++ MVP
LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
I can imagine the problem you describe. However I've seen some applications deal with it, and not yield control. I'm building a simple screensaver which I think shouldn't be interrupted by such trivial things as IM windows. You still hear the noise afterall.
So I *know* there is a way, because I've seen programs that don't change focus when another window requests it.
So how do you do it? :P
|
|
|
|
|
Well, a screen saver is a special case (in NT at least). The screen saver runs on its own desktop, so it will be the only window visible no matter what, because the interactive desktop won't be visible.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
I am having two listctrls. I am not using the default scrollbars of listctrls(I am just hiding it)i want to use a seperate VScroll bar which simultaneously work on both listctrls.
How can I do this?
Thanking you in advance.
Sandeep A.C
Sanc
|
|
|
|
|
|
Hi,,
In my Project I have main Dialog DesktopSearchDlg
CreateDlg & UpdateDlg.
In CreateDlg I am accepting File Name on Ok I have to add the file name to UpdateDlg in a combo box
Can any one please tell me how to do this.
CreateDlg UpdateDlg
File Name onOK ( ) ComboBox
Regards,
Parichay.
|
|
|
|
|
hi,
steps to capture the filename from the first dialog (CreateDlg)
1) store the Filename in the CString Variable before the Ok Button was Pressed.
2) In OnInitDialog of the Second Dialog i mean (UpdateDlg) create a an Object of the First Dialog (CreateDialog) :
//==============================================================
(ie) CreateDialog *mpmain = (CreateDialog *)GetParent();
CString str = mpmain->filenamemembervarialbe;
ComboBox.Addstring(str); //Adding to ComboBox in SecondDialog
//==============================================================
over, Good Luck.
uday.
uday kiran
|
|
|
|
|
Hi,
Thanks for the reply..
I just store the file name as below
void CCreateDlg::OnOk()
{
CString fname;
fname=m_FILE_NAME;
--
---
---
}
Now in the UpdateDlg In the
BOOL CUpdateDlg::OnInitDialog()
{
}
----
I want to know what is *mpmain ??? is this MainDialog window ???
|
|
|
|
|
hi,
yes it is Main Window Dialog you are correct. also when you want to access the Mainwindow Dialog in second dialog dont forget to include the first dialog header in second dialog.
ie (i mean) # include "firstDialog.h" in the second Dialog.
good luck.
uday.
uday kiran
|
|
|
|
|
Hi,
I am bit confused now. In my project the main Dialog is CDesktopSearchDlg
after that i have CreateDlg & UpdateDlg.
//Uday
firstDialog.h" in the second Dialog.
//
i want to which is first dialog and which is 2nd dialog.
Is this code below correct ??
BOOL CUpdateDlg::OnInitDialog()
{
CDialog::OnInitDialog();
CreateDlg *CDesktopSearchDlg = (CreateDlg *)GetParent();
CString str = CDesktopSearchDlg->fname;
m_UPDATE_FILE_NAME_COMBO.AddString(str);
}
|
|
|
|
|
hi,
there is no confusion at all, from which dialog you want to access the control values ((ie) the String value of the File Name) just create an instance of the dialog and access the control values.
good luck.
uday.
uday kiran
|
|
|
|
|
can u please tell what is the error ??? is this below code correct???
-> error CCreateDlg *CCreateDlg = (CCreateDlg*)GetParent();
CString str = CCreateDlg -> fname;
m_UPDATE_FILE_NAME_COMBO.AddString(str);
--------------------Configuration: DesktopSearch - Win32 Debug--------------------
Compiling...
UpdateDlg.cpp
D:\Parichay\DS with Help\DesktopSearch\UpdateDlg.cpp(146) : error C2059: syntax error : ')'
Error executing cl.exe.
DesktopSearch.exe - 1 error(s), 0 warning(s)
|
|
|
|
|
|
can u please tell what is the error ???
-> error CCreateDlg *CCreateDlg = (CCreateDlg*)GetParent();
CString str = CCreateDlg -> fname;
m_UPDATE_FILE_NAME_COMBO.AddString(str);
--------------------Configuration: DesktopSearch - Win32 Debug--------------------
Compiling...
UpdateDlg.cpp
D:\Parichay\DS with Help\DesktopSearch\UpdateDlg.cpp(146) : error C2059: syntax error : ')'
Error executing cl.exe.
DesktopSearch.exe - 1 error(s), 0 warning(s)
|
|
|
|
|
hi parichay,
change the Class instance and Class to Different values. you are using CCreateDlg class name and Member varible as same which is confusing. please change the values as
//==========================================================================
CreateDlg *pCreateDlg = (CreateDlg *) GetParent();
CString szStr = pCreateDlg->fname;
//==========================================================================
check with it.
good luck,
uday.
uday kiran
|
|
|
|
|
Hello
I want to add more than one image in a listctrl cell(Report view) in any order.
eg:- ITII where I is the image and T is the text
Thanks in advance
Sandeep A.C
Sanc
|
|
|
|
|
|
How can I add CTRL+C handler use SetConsoleCtrlHandler to this project??
I tried but it didn't work.
static BOOL WINAPI CtrlHandler(DWORD dwCtrlType);
BOOL WINAPI TConsole::CtrlHandler(DWORD dwCtrlType)
{
if ((dwCtrlType == CTRL_C_EVENT) || (dwCtrlType == CTRL_BREAK_EVENT))
{
return TRUE;
} else
{
return FALSE;
}
}
Thank you
http://www.codeproject.com/samples/transparentconsole.asp?df=100&forumid=99138[^]
|
|
|
|
|
Inside MSDN take a look at the error number C2784 .
Nibu thomas
Software Developer
|
|
|
|
|
Got it thanks!
Just used the <vecotr> STL container, which has random iterators, and just what I needed!
|
|
|
|
|
Hi
Dear Gurus
As i am going to enter the last year of BS (Computer Science), I have to choose some project to do. At this time, I have no Idea what should i do? But i want to do something different and innovative. As you people are in professional field and know about current market trends, I request you to please give me some ideas about my final project.
Waiting for kind responce...
We Believe in Excellence
www.aqueelmirza.cjb.net
|
|
|
|
|
Hi,
Try to do the project in .Net or J2EE both are very good.
u can also do in VB using RDBMS package.
|
|
|
|
|
U can also go for Mobile, Wireless & PocketPC related stuff.
But will bit difficult than RDBMS project
|
|
|
|
|
Hello and thanks for reading.
I was wondering if it is possible to make a message handler without the burden of the window.
See i want to make an asyncronous socket and it requires a message handler to use properly. I need something like a thread or something of that maner to use and make my ultimate class .
Again, thanks. Really appreciated.
Worlds stupidest question: Who am i?!
|
|
|
|
|
Take a look at CCmdTarget .
Nibu thomas
Software Developer
|
|
|
|