|
I have gone throught the link ,
but it tells me to set the compiler option
" you must set the /Ob compiler option to 1 or 2"
How to do the option setting for complier can u tell me .
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
|
I'm looking for a code to perform a fast search in a table or array. I knowed it like binary search. The file are is in secuential order. Thank
|
|
|
|
|
Use the bsearch function in the CRT.
...cmk
Save the whales - collect the whole set
|
|
|
|
|
What do you mead when say CRT?
|
|
|
|
|
CRT - C Runtime Library
It's the standard set of C functions.
...cmk
Save the whales - collect the whole set
|
|
|
|
|
You can also use the STL's binary_search: http://www.sgi.com/tech/stl/binary_search.html
Matt Godbolt
Engineer, ProFactor Software
StyleManager project
|
|
|
|
|
Hi All,
Requirement: i want to print the table in an MS Access Database.The Design is such that when i select a database using open Dialog, the corresponding tables in it should come in combo box automatically,i.e,
1) I should be able to retrieve the no. of tables & their names as well(not resolved)
2)on selecting any 1 table in combo box, i want to automate its printing through the click of a button.
i am using vc++ 6.0 & office 2000
Where i am: I tried a lot & searched a lot on net. a lot of material is available in vb/.net but in vc++ the same approach doesn't work out. Here is a snippet of the code:
if(!app.CreateDispatch("Access.Application"))
{
AfxMessageBox("Couldn't CreateDispatch on Excel");
return;
}
// Set visible.
app.SetVisible(TRUE);
app.OpenCurrentDatabase(m_FileName,TRUE);
//Get DoCmd Collection
lpDisp=app.GetDoCmd();
ASSERT(lpDisp);
// Attach the IDispatch pointer to the oDoCmd object
oDoCmd.AttachDispatch( lpDisp );
//Parameters of Open Table & Printout shown below give errors in VC++
oDoCmd.OpenTable (TableName,acViewNormal,acReadOnly);
DoCmd.PrintOut [printrange][, pagefrom, pageto][, printquality][, copies][, collatecopies]
I don't know whether this is the desired approach to fulfill the 2 requirements mentioned above.Moreover, i don't know the desired parameters of opentable & printout in vc++(Preferably,they should be same as in vba but still these give errors. if possible, please give the exact parameters in any solution)
This is urgent. Please Help.
Thanks in anticipation,
Ankush Mehta.
Ankush Mehta
|
|
|
|
|
Hi All,
Requirement: i want to print the table in an MS Access Database.The Design is such that when i select a database using open Dialog, the corresponding tables in it should come in combo box automatically,i.e,
1) I should be able to retrieve the no. of tables & their names as well(not resolved)
2)on selecting any 1 table in combo box, i want to automate its printing through the click of a button.
I am using vc++ 6.0, office 2000.
Where i am: I tried a lot & searched a lot on net. a lot of material is available in vb/.net but in vc++ the same approach doesn't work out. Here is a snippet of the code:
if(!app.CreateDispatch("Access.Application"))
{
AfxMessageBox("Couldn't CreateDispatch on Excel");
return;
}
// Set visible.
app.SetVisible(TRUE);
app.OpenCurrentDatabase(m_FileName,TRUE);
//Get DoCmd Collection
lpDisp=app.GetDoCmd();
ASSERT(lpDisp);
// Attach the IDispatch pointer to the oDoCmd object
oDoCmd.AttachDispatch( lpDisp );
//Parameters of Open Table & Printout shown below give errors in VC++
oDoCmd.OpenTable (TableName,acViewNormal,acReadOnly);
DoCmd.PrintOut [printrange][, pagefrom, pageto][, printquality][, copies][, collatecopies]
I don't know whether this is the desired approach to fulfill the 2 requirements mentioned above.Moreover, i don't know the desired parameters of opentable & printout in vc++(Preferably,they should be same as in vba but still these give errors. if possible, please give the exact parameters in any solution)
This is urgent. Please Help.
Thanks in anticipation,
Ankush Mehta.
Ankush Mehta
|
|
|
|
|
Hi,
I use OnLButtonDown and OnLButtonUp because I want to control the left mouse button press and release over more than one button at the same time. However, if I click on the empty area of the dialog I get these functions called, while I cannot get them called when I click on the buttons themselves. There is no OnBnClickedButton..() function called. Do I have to change the properties of the buttons?
Thanks in advance
|
|
|
|
|
The standard Windows button issues the BN_CLICKED notification (which you handle via an OnBnClicked... function) when the button is released, not when it is pressed. If you want to perform an action when the button is pressed, you will need to create your own button class and handle the WM_LBUTTONDOWN message.
Software Zen: delete this;
|
|
|
|
|
The mouse message is going to the window that the cursor is over, since that's the window being acted on. So when you click the button, the button gets the message, not the button's parent. You'll need to subclass the button and handle WM_LBUTTONDOWN in your subclass.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
There is a saying in statistics that a million monkeys pounding on typewriters would eventually create a work of Shakespeare. Thanks to the Internet, we now know that this is not true.
|
|
|
|
|
Hi all,
I need to submit a HTML form via a SOCKET that is connected to an http server, more clearly, I want the http commands (GET/POST) that can imitiate sending HTML forms.
for example i have the folowing html form:
How can I send this form via a SOCKET that is connected to the HTTP server port 80?
any really good HTTP command reference? any good code about POSTING? anyone can solve the problem specifically for the above example??
Thanx in advance
Mohammad Gdeisat
And ever has it been that love knows not its own depth until the hour of separation
|
|
|
|
|
have u tried theCInternetConnection class
&
CHttpConnection
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
use CHttpConnection to communicate with HTTP server.this will make a socket connection with ur http server
|
|
|
|
|
Mohammad, see this[^] article. If you also want to extract information from the downloaded HTML, see this[^] article.
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
|
Hi,I wanna to develop a software with two network cards(Ethernet NIC).I hope I can select one of them to send and receive data with Udp protocol.Can i?Waiting for you answer.Thank you very much in advance.
|
|
|
|
|
I'm studying about Programming Add-in for MS Outlook, but have no documents about it. Can you send me a tutorial about it?
My email is cuong197@yahoo.com
Thank you very much!!
|
|
|
|
|
Hi,
I wrote a program in Visual Studio 2005b2 (Winforms), but include many of my image processing algoritms written in unmanaged c++. These functions use SSE2, and array manipulations. However, compiling my new program (.Net) resulted in very poor performance, where the execution is so slow, compared to the same code when compiled in MFC. Why is that? I'm aware that .Net compiler generates MSIL, and it is compiled to native code on the fly during execution. Most articles online says that .Net code is slightly slower than pure code, but eventually the performance difference is too small to be noticed. In my case, the performance difference is big, and the program executes horribly! Am i doing something wrong? I thought my unmanaged code will be compiled as native code, while the others will be compiled as MSIL resulting in a mixed assembly, thereby maintaining my performance, but this is not the case. Any ideas?
Also, i used #pragma unmanaged.
Thanks,
|
|
|
|
|
uus99 wrote: Most articles online says that .Net code is slightly slower than pure code, but eventually the performance difference is too small to be noticed.
I am afraid you are just another victim of the propaganda, my friend. .NET is slow - period.
My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.
|
|
|
|
|
What's the fastest thread-safe logging library for C++?
1)log4cpp - Is it thread safe?
2)log4cxx - Still trying to understand its basic codes.
3)log4cplus - Still trying to understand its basic codes.
4)libboost-log- require boost logging
5)Rob Manderson Service log at
http://www.codeproject.com/cpp/loggerservice.asp -
Tried. But big performance impact, if large amount of data is being log by independent threads.
Comparison of log4cpp, log4cxx and libboost-log is already done in http://log4cpp.hora-obscura.de/index.php/LoggingLibraryForCpp
but i'm thinking of using log4cxx or log4cplus...
|
|
|
|
|
Depends on your requirements.
I use the system event logger API.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/debug/base/event_logging_functions.asp[^]
It's thread safe, and i find it fast enough.
You can create your own log file (altough this feature isn't well documented) and use the system Event Viewer to view and filter log entries.
Rob originally created his because he want something that could handle a LOT of log entries being written at a high rate, and he didn't realize (originally) that the event logger would allow you to create your own log file.
...cmk
Save the whales - collect the whole set
|
|
|
|
|
Hello,
I am trying to create a program which will do the following tasks:
1. Get some data (in multiple columns) from the progam in to clip board.
2. Open Excel file, paste the data in the default sheet and create a graph (in desired form) from the pasted data.
3. Copy the graph in to clip board and subsequently past the image in one of the controls.
While 1 and 3 are relatively easy to perform, I am not able to perform the 2nd step.
Will anybody help!
Pani
|
|
|
|
|
pani68 wrote: Open Excel file, paste the data in the default sheet and create a graph (in desired form) from the pasted data.
Not sure how to do the graph, but what you’re looking for is Office Automation through com.
MSDN Links to get you started.
How To Automate Excel From C++ .NET and MFC To Fill or Obtain Data[^]
How To Embed and Automate an Excel Worksheet [^]
Excel using automation[^]
When I need to do any office automation I use the built in macro recorder to record what I need to do. I then dissect what the macro recorder has done into what I need to do in my app.
Good luck, hope this helps!
ZeePain! wrote: This seems like one of those programs that started small, grew incrementally, building internal pressure, and finally barfed all over its source code sneakers. Or something.
thedailywtf.com[^]
|
|
|
|