|
in my program, i call a stored procedure in a SQL 7.0 database by executing an ADO command object, everything
goes well and the recordset is returned correctlly,but
i just could not update the recordset using PutCollect
method and the error complains that the provider dose
not surport the operation.
maybe someone can give me help.
|
|
|
|
|
Is there any way of printing an adobe pdf file using visual c++ 5.0 or higher?
Please, any response any one can give me will be greatly appreciated.
Sincerely,
Erich J. Ruth (an overworked graduate student)
|
|
|
|
|
Do a ShellExecute() on the PDF file, passing a verb of "print".
|
|
|
|
|
Mike,
Thank you for your reply. I can print a pdf file. Is there any way I can print text on top of the printed pdf file? That is, the user will input certain information. I want to print that information on top of the printed pdf file as it is printing. Is this possible?
Please, please, any response you can give me will be greatly appreciated. Details are cherished.
Sincerely,
Erich J. Ruth (an overworked graduate student)
|
|
|
|
|
hmm... That sounds like it'd be tricky. Since Acrobat (or the reader) does the printing all on its own, you'd have to modify the PDF file or something for your idea to work.
Either that, or tell the user to reinsert the paper the PDF gets printed on so you can print your own text.
|
|
|
|
|
Erich,
I don't know if this is going to help you, but I noticed on http://www.activepdf.com that they offer .pdf construction and manipulation tools. I was looking at them from the ASP component (server side) perspective, but I'm sure they would have stuff you could use on the client side too. Maybe you should check them out.
|
|
|
|
|
Check out http://www.planetpdf.com . There are a lot of libraries for manipulating PDF files.
|
|
|
|
|
Can anyone recommend a class which will write to both a Windows 95 and a Windows 98 registry?
|
|
|
|
|
CRegKey in ATL.
This article: http://www.codeproject.com/system/chklm.asp
Other registry articles here and over at CodeGuru.
|
|
|
|
|
Hi
I`m in trouble with setting a bitmap in any row I want in ClistCtrl.
I have no problem to make a ImageList, but it put the same bitmap
in every row. I need to put any bitmap in any row I want.
The CListCtrl was made by MFC-Wizzard.
Can anybody help me ?
thanks,
Sascha
|
|
|
|
|
Post your code related to SetImage and imageList
|
|
|
|
|
I'm not sure, but I think that if you don't set an image explicitly for an item it gets the first from the imagelist.
Be sure to pass LVIF_IMAGE to SetItem in the 'mask' argument only for those items you want to have images.
I have no other ideas.
|
|
|
|
|
Hi,
Is it possible to change the menu which resides in the menu bar in run-time? I would to enable/disable pop-up menus which resides in the command bar menu.
I know how to modify menu item inside a menu but I don't know how to change the top pop-up menu.
Thanks,
Shai
|
|
|
|
|
Dear Shai,
Here's something that might help:
BOOL CMainFrame::DoChangeMenu()
{
CMenu menu;
if (!menu.LoadMenu(IDR_MYMENU))
return FALSE;
if (!SetMenu(&menu))
return FALSE;
DrawMenuBar(); // refresh menu bar with new menu
return;
}
Hope that helps!
|
|
|
|
|
Hi,
how can I detect whether an integer operation like a+b or exp(i) generates an overflow? When adding two big numbers like INT_MAX-4 and INT_MAX-25, the result will be negative and no error is generated. In mathematics, such overflows can also happen when using __int64 data type. Who has a solution?
Thanks
Andreas
|
|
|
|
|
You can test the overflow flag with the _asm instructions jno and jo. You can also explicitly invoke the integer overflow trap if you want to use exceptions:
void CTestDirDlg::OnButton2()
{
int a, b, c;
a = INT_MAX - 4;
b = INT_MAX - 25;
try {
c = a + b;
_asm {
jno wereOk;
int 4;
}
}
catch(...) {
MessageBox( "Overflow!", "Error");
}
wereOk:
return;
}
I realize there is the issue of portability here, but its one possible solution - could be refined. Using SEH you might be able to identify the EXCEPTION_INT_OVERFLOW exception with more certainty than the catch(...), and avoid the _asm.
You might not even want to throw the exception, just test the flag.
I think there is code out there somewhere that can convert these kinds of traps to C++ exceptions - or perhaps it would be better to just throw our own exception object, rather than invoking the processor trap. The trap might be useful if you want to enable first-chance exception handling for c0000095.
I can't seem to find a way to enable this trap in the way that we can enable floating point exceptions with controlfp.
|
|
|
|
|
OK, works fine. But what is with other operations like multiplication, and other data type like long or __int64?
|
|
|
|
|
How can I change resource for dialog form a meny in that dialog.
|
|
|
|
|
hi,
i am using MFC, i create a CDialogBar in a CRebar and my CDialogBar has 3~4 editboxes, however, i cannot uses ctrl+c or ctrl+v in these textboxes anymore and also cannot tabs thru the controls. the problem is so obvious so i think it must be something i missed.
pls help!!
gordon
|
|
|
|
|
Can someone please enlighten me about how to maximize the app's mainframe at startup? I have tried calling ShowWindow() from the InitInstance() and that doesn't do it. I've looked through the MS docs in the Visual Studio 6 and not come accross anything relevant (like a code snippet, for example!) Some pointers would be greatly appreciated!
One person suggested setting the style to WS_MAXIMIZE in PreCreateWindow() but that does not do it.
|
|
|
|
|
In the CWinApp descendent:
// The one and only window has been initialized, so show and update it.
m_pMainWnd->ShowWindow(SW_SHOWMAXIMIZED);
m_pMainWnd->UpdateWindow();
SW_SHOWMAXIMIZED does it for you.
Also in the Application wizard in step 4 of 6 there's an Advanced Button. Follow that button to the Windows Style Tab and check the Maximized box.
|
|
|
|
|
Both of them are correct!!
but only if you join both of their answers
at InitInstanse there is a variable called
p_MainWnd
do the following
p_MainWnd->ShowWindow(WS_MAXIMISE);
a good place to put it is at the end of that function
|
|
|
|
|
You don't want to pass WS_MAXIMIZE, a style code, to ShowWindow.
You're supposed to do as Mr. Warg pointed out:
Change
pMainFrame->ShowWindow(m_nCmdShow);
pMainFrame->UpdateWindow();
to
pMainFrame->ShowWindow(SW_SHOWMAXIMIZED);
pMainFrame->UpdateWindow();
Note the WS_* in front means a *W*indow *S*tyle code, whereas the SW_* in front means a *S*how*W*indow code.
AppWizard supplies the
pMainFrame->ShowWindow(m_nCmdShow);
pMainFrame->UpdateWindow();
code for you; all you have to do is to replace the m_nCmdShow with SW_SHOWMAXIMIZED, and you're in business!!
Brian Hart
|
|
|
|
|
I'm trying to find out from an application if another one has blocked (ie. "Not responding" in the NT Task Manager). How do I do that?
Thanks
|
|
|
|
|
Do any of these extra macros for code formatting do word wrapping on comment blocks? I would really like something like this. So when you have a large comment block like:
// blah blah blah blah blah blah blah blah blah
// blah blah blah blah blah blah blah blah blah
// blah blah blah blah blah blah blah blah blah
And you have to edit it a lot, you don't have to manually word wrap it. Anyone know a macro that does this?
|
|
|
|