|
google for source code to video survaillence / webcam alarm systems etc or possibly look at delta error type stuff from a mpeg codec
|
|
|
|
|
Does anyone have any idea why VC 2003 .NET will not allow me to create a control variable for ComboBox in a secondary dialog (created using Add Resource) and activated using the DoModal function.
If I put the ComboBox in the main Dialog, I can create a control variable. I can create a control variable for it even if I put it in the ABOUT dialog. But for some reason, it simply doesn't like assigning a control variable to a ComboBox that is in a dialog that was created with the Add Resource function.
Anyone got any ideas?
Karen
|
|
|
|
|
Maybe the developer studio that you have has a bug. One solution is to add the control manually.
Kuphryn
|
|
|
|
|
How to copy and paste text in a cell in excell.
funtion _Application::GetSelection return what?
Help me please
|
|
|
|
|
Here's an example of how to set the value of an Excel cell:
if (app.CreateDispatch("Excel.Application") == TRUE)
{
app.SetVisible(TRUE);
books = app.GetWorkbooks();
book = books.Add(vtOptional);
sheets = book.GetSheets();
sheet = sheets.GetItem(COleVariant((short) 1));
range = sheet.GetRange(COleVariant("A1"), COleVariant("A1"));
range.SetValue(COleVariant(strText));
...
}
You should be able to ascertain from this how to get the value of a cell.
|
|
|
|
|
Thanks Mr David!
Yes, I know this. But May you help me how to copy text to clipboard?
In Word I do this:
_Application app;<br />
Range range;<br />
.....<br />
range.Select();<br />
Selection sel=app.GetSelection();<br />
sel.Copy<br />
sel.Paste <br />
<br />
In excel I see funtion app.GetSelection. But I don't know what object that is returned.
please help me.
Thanks
Jason Chang
tmsnhien@yahoo.com
|
|
|
|
|
I have a TCP server that uses two classes: a ConnectionManager and a DbgConsole. U can specify a parameter in console to turn on logging. It just outputs all its output through DbgConsole with a function called ConsoleOutput() which just couts a string to the console and if logging is enabled writes the string to a file. When logging is turned on, the DbgConsole class opens a new file and stores the file handle in a private member variable of that class. From then on the ConsoleOutput function just uses that handle to write to the file and log every line. This works great UNTILL...
I have a function AddConnection in the ConnectionManager class like this:
<pre>
void ConnectionManager::AddConnection(SOCKET _sd)
{
ClientConnection *cc = new ClientConnection;
cc->s = _sd;
cl.push_back(cc);
PrintClientList();
}
</pre>
This just adds the socket in a struct to the list, this is the PrintClientList() function:
<pre>
void ConnectionManager::PrintClientList()
{
cout << "Client list(by socket handle):" << endl;
CLI cli;
for ( cli = cl.begin(); cli != cl.end(); ++ cli )
{
cout << (*cli)->s << endl;
}
return;
}
</pre>
So whenever i add a connection it adds it to the list and prints the list of socket handles out to the console. This works fine untill logging is turned on. If i leave out the printing of the list (so PrintClientList()) then it works fine, but if i include it my app crashes, even though it prints it fine if logging is disabled.. I can't figure out what the problem is.. Does anyone have any ideas?
Kuniva
--------------------------------------------
|
|
|
|
|
Why toolbar created by following code do not creates tool-tips?
I checked that string resiurce is presented ith button identifier,
and property of promt if button is set to this string.
<br />
<br />
if (!m_wndToolBar.CreateEx(this,<br />
TBSTYLE_FLAT,<br />
WS_CHILD | WS_VISIBLE | CBRS_TOP<br />
| CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC <br />
)<br />
|| !m_wndToolBar.LoadToolBar(IDR_MAINFRAME/))<br />
<br />
<br />
thanks you
|
|
|
|
|
Hi,
Sorry for the very basic question - I am a beginner so please excuse me:
Could someone please tell me where I can find info on using a rich edit box in a dialog-based application without using any MFC? I mistakenly thought that it would be as simple as using any other control, but it seems not. All I want to do is have a white box with a lot of text in it and a scrollbar to scroll through it (user can't input anything). I guess a rich edit box is what I need. But I tried to add a rich edit box to my dialog and then set its text using SetDlgItemText, and if I compile and run, the dialog just exits without showing _anything_, as though the program hasn't run at all. It seems this has nothing to do with my code (well, it probably has something to do with what I'm _not_ doing in my code), as even if I took any code out relating to the rich edit box, so long as it was in my dialog, if I run, it exits as though nothing has happened. I read on MSDN that you need to call AfxInitRichEdit(), but when I tried this I just got an "undeclared identifier" message, so I guess this is just for MFC...
Any pointers would be really appreciated. Sorry again if this is a dumb question.
Many thanks,
KB
|
|
|
|
|
Have you loaded the riched32.dll (for RichEdit 1.0) or riched20.dll (for RichEdit 2.0) library? This is all that AfxInitRichEdit() does
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Thanks, that solves my problem perfectly - you've given me quite a few useful replies over the past week or so, I really appreciate it, thanks again.
Cheers,
KB
|
|
|
|
|
You're welcome
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
I have an application which I would like to change the behavior of the save button in a modal dialog box. Since I do not have the source code I was hoping that maybe this Window's hook may work.
I would like to make the following changes with the save button:
1) Once save button is pressed
2) Hook the button in order to run another application which will
3) Require operator login
4) Then save the file
I have been doing alot of searching on Windows Hooking Techniques but unfortunatly most of the examples that I find are hooking the mouse or keyboard. I have not been able to find anything useful with regards to the WH_SYSMSGFILTER & WH_MSGFILTER. Does anyone have any experience with these hooks. Any examples etc. which would be helpful in getting me started down the right track would be greatfully appreciated!
Thanks In Advance!!!
Bob Younger
|
|
|
|
|
yes, me too..
I have to map enum values to a string, and back. The string is a custom string (but a "complete" solution using the name of the enum constant would be ok, too)
anybody having nicely wrapped-up solution for it?
I need two-way lookup, case insensitive...
"Der Geist des Kriegers ist erwacht / Ich hab die Macht" StS
sighist | Agile Programming | doxygen
|
|
|
|
|
There are not elegant solutions for two-way lookup using STL map. How big does the contain get? If it is relatively small, one solution is to simply use two maps.
Kuphryn
|
|
|
|
|
I'm trying to figure out what I'd need.
The lookup is ok with a single map - searching for the value linearly is fast enough. For the case-insensitive string comparison I'd use the map lookup of course
I wonder about the other stuff - keeping "enum miantenance" as low as possible.
"Der Geist des Kriegers ist erwacht / Ich hab die Macht" StS
sighist | Agile Programming | doxygen
|
|
|
|
|
http://www.codeproject.com/vcpp/stl/bimap.asp[^]
Don't know whether or not it's case insensitive or not, but as it's based on STL you should be able to override the maps ordering functor (i.e. write your own less<string>)
[edit] After having read the whole article I spotted this:
bimap<
typename from_type, typename to_type,
typename from_compare=std::less<from_type>,
typename to_compare=std::less<to_type>,
typename allocator_type=std::allocator<direct_pair<const from_type,const to_type> > >
It's what you want.
[/edit]
--
Im hayu samim et hamo'ach shelcha betoch tsipor, hi hayta matchila la'uf achora!
|
|
|
|
|
Question: Can a Device Context be created by hand for a imaginary device?
Reason: I am creating an application that will be outputting (drawing) to an image device that does not have a physical Device (like a printer). I would like to create this DC so that when I do calls like: LPtoDP or DPtoLP or even doing a line MoveTo( DC, point) and a line LineTo( DC, point) that I don't have to calculate the difference.
In a 1200 dpi printer, and you want to draw a 1" x 1" rectangle you create the rectange (based upon your mapping mode, in this case we will use LOENGLISH) Rect( 100, 100, 200, 200 ) -> 1x1 rectangle starting at 1 inch from the top and left. So in a 1200 dpi this converts to 1200, 1200, 2400, 2400 in the actual drawing. I would like to be able to create a dc that does not connect to a physical device with a dpi say 350x350.
How can this be done? AND, can it be done?
Thanks
Larry
Larry J. Siddens
Cornerstone Communications
TAME THE DOCUMENT MONSTER
www.unifier.biz
|
|
|
|
|
I believe what you want is a metafile DC. If you are using MFC have a look at CMetaFileDC . I have never used it myself, so I may be totally off base here.
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
I have one telephone connection. I am using that connection for net. Now if some one ring me, It would get a busy beep. Is it possible that I make a utitlity that record the msg automatically without disconecting me from the net...
thx
|
|
|
|
|
Short answer is no.
Long answer is look for a "Internet Call Waiting" Modem-on-Hold™ (MOH)service from your telephone company. V.92 provides this sort of functionality http://www.v92.com/
|
|
|
|
|
I have one telephone connection. I am using that connection for net. Now if some one ring me, It would get a busy beep. Is it possible that I make a utitlity that record the msg automatically without disconecting me from the net...
thx
|
|
|
|
|
No, because the busy signal that the caller hears comes from the phone company, not your house. In other words, when they are calling you, the signal does not even reach your house. It is detected much further upstream that your phone is off the hook and thus tells the caller so with a busy signal.
|
|
|
|
|
Hi,
Can any one give me idea, how to develop a search engine like google. I want to build a one like this.
From where search engine get the matched string?
Is there any table where Keywords are stored?
From how I would know about URL.
I m new in programming. So plz answer in detail.
thx.
|
|
|
|
|
You're new to programming and you want to jump into the deep end of the pool and undertake such an ambitious project. Amazing. Some of my first programming projects, small as they were, allowed me to build a solid foundation first, and then add to it a bit more each time.
It's been a while but some of them I remember are:
-- Fahrenheit to celcius convertor
-- Monte Carlo anaylsis
-- Degrees to radians convertor
-- Calculate wind chill and heat indices
-- Quadratic equations
-- Complex numbers (used Ada and its flavor of classes for this)
-- Department store markup (wholesale * markup = sale price)
-- Number-guessing game
-- Split a file into two pieces, and then merge it back together
-- Various stdin/stdout type programs (e.g., pipe the output of a number file through a program to compute the average)
-- Writing to and reading from a data file
-- Various sorting and searching algorithms
-- RPN calculator (prerequisite of stacks, lists, and queues)
There are dozens more but I can't recall them right now. I think you get my point, however.
|
|
|
|