|
CEdit::<a href="http://msdn.microsoft.com/en-us/library/kb01s86y(vs.80).aspx">SetCueBanner</a>[<a href="http://msdn.microsoft.com/en-us/library/kb01s86y(vs.80).aspx" target="_blank" title="New Window">^</a>]
Sets the text that is displayed as the text cue, or tip, in an edit control when the control is empty and does not have focus.
|
|
|
|
|
|
gopalraja wrote: how do i get this feature in VC++ 6.0
Madhu's answer is correct for VC2003 and on. For VC6, you need to do the following:
- Download and install a version of the Windows SDK that is compatible with VC6 AND has WIndows XP features[^]
- Use the
Edit_SetCueBannerText [^] macro (which you'll get by #including commctrl.h) to set the prompt text in the edit box. Note that the text you pass as the macro's second argument is a wide-string, something like L"Password"
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hi !
I'm desperately seeking, not Susan, but a way to spawn a process on my computer which will not be killed when I logoff. Some sort of a background process ...
My customers are using our software and have the ability to launch a very long process (to compute something). I would like to give them the possibility of logging out (e.g. for the week-end).
Any ideas out there will be highly appreciated.
Thanks.
|
|
|
|
|
andypandy2 wrote: to spawn a process on my computer which will not be killed when I logoff. Some sort of a background process ...
Try windows services; You can find the sample at Creating a Simple Win32 Service in C++[^]
|
|
|
|
|
Thanks, that should do the job !
|
|
|
|
|
m_pRS->Open("SELECT Name FROM EmployeeDetails",m_ptrConnection->ConnectionString, adOpenForwardOnly,adLockReadOnly , adCmdText);
This is my SQL query for opening an ADO recordset. Can you give me any idea on how to write a query which takes a value from a edit box and use it in the query. For example:
SELECT Name FROM EmployeeDetails WHERE Name=m_EditBoxValue
How am i supposed to append the remaining part of query.
Thank You In Advance
|
|
|
|
|
Use CString's Format function
like
CString strQuery(_T(""));
strQuery.Format(_T("SELECT Name FROM EmployeeDetails WHERE Name='%s'"),m_EditBoxValue);
m_pRS->Open(strQuery,m_ptrConnection->ConnectionString, adOpenForwardOnly,adLockReadOnly , adCmdText);
|
|
|
|
|
What if I wanted to use Like in the sql query are there anything that I should be aware of.
modified on Thursday, May 14, 2009 5:55 AM
|
|
|
|
|
Rather than building a query string embedding the parameter value (can we say SQL Injection[^]?), I'd suggest you build a parameterised query[^].
For what you want, this would want something like:
Cmd1.CreateInstance( __uuidof( ADODB::Command ) );
Cmd1->ActiveConnection = your connection;
Cmd1->CommandText = _bstr_t(L"SELECT Name FROM EmployeeDetails WHERE Name=?");
Param1 = Cmd1->CreateParameter( _bstr_t(L""),
ADODB::adVarChar,
ADODB::adParamInput,
-1,
_variant_t(_bstr_t(m_EditBoxValue) );
Cmd1->Parameters->Append( Param1 );
m_pRS = Cmd1->Execute( &vtEmpty, &vtEmpty2, ADODB::adCmdText );
To use the LIKE operator, just replace WHERE Name=? with WHERE Name LIKE ?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
The Recordset does open but trying to fill the datagrid gives the error.
"Recordset not bookmarkable", I have set the Cursorlocation=adUseClient.
Any ideas.
|
|
|
|
|
Try setting the CursorType property of the Recordset to adOpenStatic
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hi,
Is anyone familiar with the MAPI embedded attachments? I need to combine a message from my code, and attach an Image inside the message, so it will be visible as an image.
I was able to find an article from Microsoft that is supposed to explain how to do it(http://support.microsoft.com/kb/168903[^], but when I do it Outlook tells me (at the top of the new message) that the attachment was blocked since it unsafe. Does anybody have a clue? A code that does it or what flags / functions can solve it?
Thanks,
Yakobom
|
|
|
|
|
yakobom wrote: Outlook tells me (at the top of the new message) that the attachment was blocked since it unsafe.
All versions of Outlook since Outlook 2000 Service Release 1 (SR1) include a security feature that blocks attachments that might put your computer at risk for viruses or other threats. Although Outlook blocks access to the attachment, the attachment still exists in the e-mail message.
yakobom wrote: Does anybody have a clue? A code that does it or what flags / functions can solve it?
This[^] MSDN article gives more detail on this; no codes.
Look at the Advanced troubleshooting section of the article, I am sure you can do some tweaking with outlook registry entries to Outlook's attachment security behavior locally. Or you can ZIP the image and attach to a mail so that your recipients may not see a security warning.
|
|
|
|
|
First of all, thanks for your quick answer.
I am familiar with the security issue, but I'm afraid my problem is a bit more complex than that - I am able to attach images in the 'regular' way (as an attachment), the problem is only when I try to embed it (so the image will appear as a part of the text). This is why I believe what you suggest cannot help me...
Any other ideas?
Yakobom
|
|
|
|
|
yakobom wrote: This is why I believe what you suggest cannot help me...
Sorry for that!
yakobom wrote: Any other ideas?
I haven't played much with MAPI; How about attaching certificate[^] with your message so that outlook may identify your mail as a 'safe' one ? Please look at this, and check whether this works for you... [Just a suggestion, and am not sure about this approach]
There are lot of samples on MAPI programmes here[^]; I think you may get some more ideas from there.
|
|
|
|
|
Hi,
Our project(client\server application) support redundancy(i.e there 2 running servers,one of them is the root and the other is the secondary,and there are multiple clients connected to each one of the servers.once the root server is down,the secondary becomes the root server and continue to serve the clients from the same location the other server stopped).
The servers uses PING messages between them to realize when a server(which can be the root server) is down(to switch to another root).
In addition,we wrote some kind of watchdog application,which is running on each server,and which is being notified by it's server(keep alive events).
In case that the watchdog didn't get such keepalive event for a predefined period of time(for example - the server is in endless loop) - the watchdog resets it's server in order to let another server to become a root server.
So far so good
During one of our unit test,we encountered a problem which causes the operating system(Windows XP) of the root server to hangs(note that not only the server application hangs but the computer is not responding).
In such case the watchdog application is not working also,therefor - cannot reset the root server.
You probably ask yourself:
"So whats the problem?
The other server will try to PING to the other root server,and since the PING process will fail,the
other server will become the root server."
Well......you're wrong!!!!!
For some reason,though the operating system hangs - it still response to PING request.
Now for the questions...
1. We're looking for an API which causes the operating system to hangs (so when we'll fiind a
solution we will be able test it.
2. Is there another way to stop PING handling while the operating system hangs?
3. Is there a built in watchdog mechanism in Windows XP that we can use(or another watchdog
application which runs in a lower level and can reset the computer in case that the operating
system hangs?
Sorry for the (very) lonk post...
With best regards,
Eli
|
|
|
|
|
Create a high priority thread with an infinite loop.
This should screw up the system quite bad.
SetPriorityClass
SetThreadPriority
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
I don't think it wil work since it is a dual-core computer - so only one CPU will be stucked..
Eli
|
|
|
|
|
You're right. It won't work.
You could try to starve memory using the /burnmemory switch.
Boot Parameters to Manipulate Memory[^]
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Thanks for your reply,I will try that.
In case it is working - is it mean that ,for some reason,the operating system can't get enough physical memory(which is very weird because it is not consistent).
Thanks again,
Eli
|
|
|
|
|
That option is just to simulate a machine with less physical memory.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
eli15021979 wrote: 1. We're looking for an API which causes the operating system to hangs (so when we'll fiind a
solution we will be able test it.
What if you turned off ICMP replies from the server?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hi,
How can i programming direct map using c++?
|
|
|
|
|
Hello
You can use the one from the STL. have a look to std::map.
Regards
Franck
|
|
|
|