|
|
This will help :
HBRUSH CtestMFCDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
if(nCtlColor== CTLCOLOR_EDIT )
hbr=CreateSolidBrush(RGB(0,100,0));
return hbr;
}
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
THANKS A LOT
Please mail me
|
|
|
|
|
<imho>
We should use the reflect message =WM_CTLCOLOR on CMyEdit more OOPs Oriented.
Regards,
FarPointer
Blog:http://farpointer.blogspot.com/
|
|
|
|
|
If you are doing this in OnCtlColor handler for WM_CTLCOLOR notification, and you want to affect the colours of all of edit boxes, then you can try the last argument of OnCtlColor , which describes the type of control:
HBRUSH CMyDialog::OnCtlColor( CDC * pDC, CWnd * pWnd, UINT nCtlColor)
{
if(nCtlColor == CTLCOLOR_EDIT)
{
. . .
}
else
{
return CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
}
}
Hope it helps.
|
|
|
|
|
THANKS A ..... ..................LOT
Please mail me
|
|
|
|
|
Add a class variable that holds the color, and for each edit box, modify that variable.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
stop deleting your questions when someone gives you the answer you were looking for.
it's not the first time i say you this, and you still behave like a SELFISH man
if you don't want others to see the answer anymore, then don't ask it here ; find a friend and ask him whatever you like. but here (and in a general mean on forums), things are written to be read after a more or less time since it was written
isn't it Mr. Gourav ?!
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
Can we give buffer as input to the ISpRecogniser instead of file. I just want to take the buffer out from a file and give as input to the ISpRecogniser.Is there any function though which we can set the input as buffer.
Plese help me.
Thank you
KIRAN PINJARLA
|
|
|
|
|
Guessing you are using ISpStream::BindToFile function to associate the input audio stream with a file, maybe you can try ISpStream::SetBaseStream to associate it with an in-memory stream created with CreateStreamOnHGlobal ?
|
|
|
|
|
Hi,
I have an application in which I am loading data from a database (in this specific case a large database) into a grid in my GUI. So, I open the query into a recordset using the Open method as follows:
sQuery.Format(_T("SELECT DISTINCT D.fieldA, DC.fieldB
from TableDC DC, TableD D
WHERE D.fieldA = DC.fieldA AND D.No = '3’
ORDER BY DC.fieldB"));
if(!Open(AFX_DB_USE_DEFAULT_TYPE, sQuery, CRecordset::readOnly))
{
...
}
The problem is that the statement that contains the call to the Open method sometimes takes about 2 minutes to execute (and sometimes works ok).
Anyone have any idea of why this happens? And maybe an idea of how I can fix it (speed it up)?
|
|
|
|
|
Are the TableD.fieldA and TableD.No fields indexed?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I don't think they are. Not in table D at least.
What exactly do you mean by indexed?
|
|
|
|
|
SWDevil wrote: What exactly do you mean by indexed?
See here.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
ok - I think I confused indexes and primary keys
do you know how I can see in SQL server if the fields are indexed or not?
And how can I use indexes on these fields to speed the execution of the open method?
|
|
|
|
|
SWDevil wrote: do you know how I can see in SQL server if the fields are indexed or not?
Have you considered the Index Tuning Wizard? There's also SHOWPLAN_TEXT and SHOWPLAN_ALL opptions.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
As I now, execution of SQL queries can be speeded up by defining appropriate indexes in the database definition. I think you have to add indexes for TableD.fieldA , TableDC.fieldA , TableD.No and TableDC.fieldB . This can be done with the application you are using for database management.
In additions, use the DISTINCT statement only if is realy required.
|
|
|
|
|
Do you know how to add indexes to fields in SQL Server?
|
|
|
|
|
SWDevil wrote: Do you know how to add indexes to fields in SQL Server?
Use the CREATE INDEX command.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Use the index tuning wizard in the Query Analyzer. This will give you the right index creation scripts optimized for your select statement.
cheers...milton kb.
|
|
|
|
|
ShowWindow(SW_HIDE) will hide the window and in my case , make the windows of other applications to the foreground and activate them. How can I restore it programatically when my application is not having focus.. Does my application have to be a service..in which case any short cut key will make it active again?
row
|
|
|
|
|
ROWALI wrote: How can I restore it programatically when my application is not having focus
You need a handle or a pointer on your window, and then use ShowWindow(SW_SHOW).
BUT the question is : what is the reason for your window to be showed again ? According to the answer, you'll find the method to bring the window back (e.g. do it from another app -- a hook, or from within your app).
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
|
|
|
|
|
Just an idea...
You could always use RegisterHotKey() and set a hotkey activation. Then in your dialog, you would need to handle the WM_HOTKEY message, and do ShowWindow(SW_SHOW) and make your dialog visible again.
or
You could add a system tray icon, and have the user click the tray icon to show the dialog again.
I would suggest searching codeproject, there are many samples of both.
-Randor
|
|
|
|
|
After you ShowWindow(SW_NORMAL) Use SetWindowPos with HWND_NOTOPMOST for the "insert after" parameter.
byebye..
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[ ]--
[My Current Status]
|
|
|
|
|