|
TRY
CMap with integer as a KEY!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
Does anyone know how to send HTML directly to the printer? I need to do this programmatically. I'm creating HTML files on the fly, and I'm able to display them properly using Internet Explorer. This provides sort of a "Print Preview" mechanism, but I can find no way automatically print it. It would be great if iexplore.exe had a command line option to print the document without bringing up the IE screen.
I've tried some sharewares that claim to do this, but the formatting is never correct. It seems like I need to get this to work with IE somehow.
Any suggestions are greatly appreciated.
|
|
|
|
|
This[^] article may help. Unfortunately, I think you'll still see the standard Print dialog box.
[edit]
If you can get a pointer to the document object within the web browser control, you may be able to use call ExecWB() with IDM_PRINT [^]. This command allows you to print without having to display a dialog to the user.
[/edit]
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Ravi Bhavnani wrote:
This command allows you to print without having to display a dialog to the user
Unfortunately, at least as of IE 6, that's no longer true. All mechanisms that print from the web browser control (script, ExecWB , etc.) now invoke the print dialog, even if you specified no interaction. This was changed as a security mechanism, to prevent malicious web pages from printing uncontrolled to the default printer. This change may have been applied retroactively to IE 5 and 5.5 via Windows Update, but I'm not sure.
Software Zen: delete this;
|
|
|
|
|
Hi,
I am porting a project from VC6 to VS 2003 and when I compile it, every file that contains #include <fstream.h> will tell me it cannot be found.
Of course I can start using CFile not but I just don't have the time to start modifying the code.
So,
Is there any other #include I can use to support all of my 'ofstream' and 'ifstream' functions I used in my code ?
Thanks,
Shay
|
|
|
|
|
The stl header declaration, <iostream.h> , etc. are all depreciated. Use <iostream> (without the .h) instead.
I Dream of Absolute Zero
|
|
|
|
|
Not sure if this is the right forum for this, but I need to determine whether a given .wma file has DRM set in it or not. I'm working on a project that uses a 3rd party tool to burn CD's, and they have told us that these types of files are not supported, so I need to weed them out before they get there.
I've been digging around MSDN pretty much all morning, and keep going in circles, not really finding anything out. Most of the DRM articles talk about encoding the file to begin with, not what to do after. The only one thing I found about after the fact was this little not to promising tidbit: "The actual mechanics of DRM take place through low-level functions in the operating system. As a result, higher level APIs, such as DirectShow, and the applications built on top of them, such as Windows Media Player, have little opportunity interact directly with DRM."
Any ideas? There must be some way of detecting it.
-----
In the land of the blind, the one eyed man is king.
|
|
|
|
|
I have an application written as a C console mode program. I am considering using MFC to gain access to dbDAO classes.
Can anyone tell me if this is feasable, and if so, how to go about changing my app to MFC console mode?
Thanks
John Alderman
|
|
|
|
|
not directly, as MFC is a superset of Wrappers...
if you really need to develop in MFC, you will have to use your time and your brains to port you code up. otherwise, it will be "a bit" easier for you to use Win32 APIs
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Yes, you can certainly make your C console mode app link with MFC. Best to start by creating a new console app and select MFC in the app wizard.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
I just began to write a database program using ODBC, and got 2 problems.
the 1st was: I used the m_db.ExecuteSQL(), but failed, get error info as "ORA-00911 invalid string "
here is the sample code:
CString sql="drop table employee cascade constraints create table employee (name varchar2(90) not null, ID number(6) not null);";
m_db.ExecuteSQL(sql);
this piece of code failed, I don't kown where is wrong .
the another similiar SQL command is below
CString sql="insert into employee values('a',1); insert into employee values('b',2);";
m_db.ExecuteSQL(sql);
this snippet didn't work too. the same error occured !
the 2nd questions is, How can I know if a table exists or not, if the table doesn't exist, the
command
m_db.ExecuteSQL("drop table employee ;")
always failed with erro info "the table or view doesn't exist;"
By executing this snippet, what I want to do is to drop the table first , then create the table again, and import some records, just do a new complete installation.
pseudocode below:
if(table exists)
drop table and create table again
else
create table without drop table or an errror showing "the table or view doesn't exist" prompted.
I don't known how to resolve these problems, Any help will be appreciated!
|
|
|
|
|
Do you know them to be valid and formatted correctly for Oracle?
|
|
|
|
|
CString sql="insert into employee values('a',1); insert into employee values('b',2);";
m_db.ExecuteSQL(sql);
this doesn't work!
but
m_db.ExecuteSQL("insert into employee values('a',1); ");
do work! why!
|
|
|
|
|
I think the sql string is valid. I don't know where is wrong?
|
|
|
|
|
Not sure if this works for tables, but try
create or replace ....; instead of the
drop ...; create ...; I use this all the time for views and procedures. I think it works for tables too.
Chris Meech
I am Canadian. [heard in a local bar]
Remember that in Texas, Gun Control is hitting what you aim at. [Richard Stringer]
Nice sig! [Tim Deveaux on Matt Newman's sig with a quote from me]
|
|
|
|
|
do you mean it should looks like below:
CString sql="create or replace table employee (name varchar2(90) not null, ID number(6) not null);";
m_db.ExecuteSQL(sql);
instead of
CString sql="drop table employee cascade constraints create table employee (name varchar2(90) not null, ID number(6) not null);";
m_db.ExecuteSQL(sql);
How about the 2nd questions?
|
|
|
|
|
Sorry I was wrong, for tables, the 'create or replace' can not be used. I think what you have to code it like the following
CString sql = "drop table employee cascade constraints";
m_db.ExecuteSQL(sql);
sql = "create table employee(name varchar2(90) not null, id number(6) not null)";
m_db.ExecuteSQL(sql);
Chris Meech
I am Canadian. [heard in a local bar]
Remember that in Texas, Gun Control is hitting what you aim at. [Richard Stringer]
Nice sig! [Tim Deveaux on Matt Newman's sig with a quote from me]
|
|
|
|
|
Does anyone know how to create a window with the familiar grey canvas/workspace which can house multiple windows which can be restored, maximized and minimized?
|
|
|
|
|
|
Hi all,
Do anyone has some idea on how to implement a toolbar with right- or center-aligned buttons (not the right-aligned text on buttons) with Visual C++?
Looking forward to your warmly reply.
|
|
|
|
|
I'm trying to activate profiling in Visual C++ 6.0.
I've activated Settings->Link->General->Enable Profiling tab.
However Build ->Profile is still greyed out!
|
|
|
|
|
I want to handel WM_MOUSEMOVE message and change color of picture when mouse is over them but my program didn't work and stop working after some minutes
plese help me
thanks a lot
|
|
|
|
|
Can you post the code of your WM_MOUSEMOVE handler?
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
|
You could create a region around the picture and then use PtInRegion in your WM_MOUSEMOVE handler to check if the mouse is over the picture. If it is then you can make the alterations to the picture, if not leave it as is.
Hope this is of some help.
|
|
|
|