|
I know you can have disconnected recordsets in ADO. I think you do this by setting the ActiveConnection property of the Recordset to NULL. As far as inserting a record I would imagine it would work. Hope this helps.
|
|
|
|
|
When building for UNICODE, I'm getting a C4005 warning for a redefition of the UNICODE macro for each file in the project as each file includes stdafx.h, which in turn ultimately defines the macro.
Besides using a pragma to ignore the message, is there something else that I should be doing to build a UNICODE project without getting these warnings?
Cheers,
Tom Archer
"Use what talents you possess. The woods would be very silent if no birds sang there except those that sang best." - William Blake
* Inside C# -Second Edition
* Visual C++.NET Bible
* Extending MFC Applications with the .NET Framework
|
|
|
|
|
Tom Archer wrote:
is there something else that I should be doing to build a UNICODE project without getting these warnings?
You could put the definition on the command line (-DUNICODE ) rather than in stdafx.h.
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"
|
|
|
|
|
|
Sorry, i misread your question. What defines are specified on the command line? _UNICODE or UNICODE or both?
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"
|
|
|
|
|
|
Tom Archer wrote:
Both
Have you tried defining just one of them? MFC/ATL uses _UNICODE but the windows headers use UNICODE, so afxv_w32.h and atldef.h have a section to synchronise them if they're not both set. They shouldn't define them if they're already defined, but might be doing so... The windows headers pdh.h and oledlg.h also do this synchronisation.
Hope this helps
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 am trying to gradually blend a bitmap onto the primary surface, it works one time but when I try to do it again, the lpDDSBack.lpSurface is set to 0x000000,which it was not in the first execution!, and I am getting an exception error,
how could this be?
First I load the bitmap into the directdrawsurface lpDDSBitmap using the DDLoadBitmap function!
win* p;
typedef struct win
{
LPDIRECTDRAW lpDD;
LPDIRECTDRAWSURFACE lpDDSPrimary;
LPDIRECTDRAWSURFACE lpDDSBack;
LPDIRECTDRAWSURFACE lpDDSBitmap;
LPDIRECTDRAWCLIPPER lpClipper;
}
p->lpDDSBitmap=DDLoadBitmap(p,p->lpDD,L"crystalcocktail.bmp");
IDirectDrawSurface * DDLoadBitmap(win* p,IDirectDraw *pdd, LPCTSTR szBitmap)<br />
{<br />
HBITMAP hbm;<br />
BITMAP bm;<br />
IDirectDrawSurface *pdds;<br />
<br />
hbm=SHLoadDIBitmap(szBitmap);<br />
if (hbm == NULL){<br />
return NULL;<br />
}<br />
<br />
GetObject(hbm, sizeof(bm), &bm);
<br />
<br />
<br />
pdds = CreateOffScreenSurface(pdd, bm.bmWidth, bm.bmHeight);<br />
if (pdds) {<br />
DDCopyBitmap(pdds, hbm, bm.bmWidth, bm.bmHeight);<br />
}<br />
<br />
DeleteObject(hbm);<br />
<br />
return pdds;<br />
}
And then I Blit the bitmap surface to the Backbuffer using the Flip_Bitmap_To_Back(p):
bool_t Flip_Bitmap_To_Back(win* p)<br />
{<br />
HRESULT ddrval;<br />
RECT rcRectSrc;<br />
RECT rcRectDest;<br />
POINT pt;<br />
<br />
pt.x = 0; pt.y = 0;<br />
ClientToScreen(p->Wnd, &pt);<br />
GetClientRect(p->Wnd, &rcRectDest);<br />
OffsetRect(&rcRectDest, pt.x, pt.y);<br />
SetRect(&rcRectSrc, 0, 0, 472, 286);
ddrval =IDirectDrawSurface_Blt(p->lpDDSBack, &rcRectDest, p->lpDDSBitmap, &rcRectSrc, DDBLT_WAIT, NULL);<br />
if(ddrval==DDERR_SURFACELOST){<br />
restoreAll(p);<br />
}<br />
}
And then finally I uses the blendfunction
BltAlpha(p->lpDDSPrimary,p->lpDDSBack,0,0,&r,128,RGBMODE_565); //var RGBMODE_565
}
If I do this one more time the exception error occurs, and I don´t know why, could it be that the surface gets lost in some of the actions or?????
Please help me someone, thanks Dani
|
|
|
|
|
Hi,
I'm looking for a way to start out a standard C++ Console Application in full-screen. I know that once the app has started the user can press Alt+Enter, but it'd be really neat if I could figure out a way to get around that.
Anybody know of the code snippet to do something like that?
Thanks in advance for any help
Makutu the amateur programmer.
|
|
|
|
|
Add shorcut to your app and change behavior in "paramerts" tab.
|
|
|
|
|
Thanks but I kinda already knew that.
Is there any way to make opening in full screen mode be embedded into the executable itself?
|
|
|
|
|
I'm trying to use CxImage Library from codeproject..
But I realized that it is not so fast..
My favorite image viewer IrfanView shows really fast operation..
Which library do you think they use?
Which is the best FREE library?
ImageMagic? CxImage? GDI+?
I wish the library should be easy to use and FAST..
|
|
|
|
|
Go for Com Interface IPicture and for sampele download loadpic.exe from MSDN
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
What is the differance between c++ and visual C++
|
|
|
|
|
C++ is the pure standard language... (in theory).
now, each compiler can implement all (or more or less) of the grammar of the C++. that is the case of microsoft with its Visual suite.
Visual C++ that is compiled by the microsoft compiler contains specifics, that is why we commonly use this name to difference it from the others...
is that clear now ?
TOXCCT >>> GEII power
|
|
|
|
|
Have you learn c#? I`m thinking of learning it.
<italic>Work hard and a bit of luck is the key to success. You don`t need to be genius, to be rich.
|
|
|
|
|
nop, and i don't want to... i love tyoo much my c++ to learn for a "Microsoft extension of .NET object language"... you well understand, i don't like C#... (shame on me maybe, but the few i already read about it didn't interrest me).
TOXCCT >>> GEII power
|
|
|
|
|
At first, I didn`t like it, but now i kinda like it.
<italic>Work hard and a bit of luck is the key to success. You don`t need to be genius, to be rich.
|
|
|
|
|
C++ is a programming language, Visual C++ is a Microsoft integrated development environment (IDE) for C++ programming.
|
|
|
|
|
So is the board managed c++ the c++ language and not visual C++
|
|
|
|
|
"Managed C++" is Microsoft's non-standard extension of the C++ language for the .NET platform. The latest versions of Visual C++ can be used to create Managed C++ programs.
|
|
|
|
|
A part of my program use rich edit control,now I want to set a bitmap as the background of richedit control,how to implemente it?
hiall
|
|
|
|
|
implement in rich edit control's perant message - WM_CTRLCOLOR... CWnd::OnCtrlColor this func returns HBRUSH parameturs ... One from parameters of OnCtrlColor is nCtrlColor when it is equal to COLOR_EDIT and COLOR_MSG you must creat your own brush (which must not be local varible) and in this new brush draw the image (CDC::bitblt(...)) ... in the end return this burash as a result from CWnd::OnCtrlColor.
For value diffirent from COLOR_EDIT and COLOR_MSG return the result from OnCtrlColor from base class.
|
|
|
|
|
Can i please get help in this topic of c++ programming, the problem is it's my first time in programing i don't know where to begin
|
|
|
|
|
Sweetlady wrote:
i don't know where to begin
I presume you know what Mortgage Amortization means. And I presume you can do the calculations with a pen and paper (with help from a calculator).
So, do a calculation on paper, taking note of all the steps you need to take in order to do it. Take note of all the information you need to do the calculation also.
Now, you know what information you need and what to do with it. You can start working out what commands you need to give C++ in order to get the information, process the information and finally produce the result.
If you have a specific problem you can ask back - but general queries like the one above (especially ones that look like homework questions) require too much work to answer fully. You really need to demonstrate that you have made an attempt to do the work yourself first, and have then got stuck on some particular part of it.
Do you want to know more?
Vogon Building and Loan advise that your planet is at risk if you do not keep up repayments on any mortgage secured upon it. Please remember that the force of gravity can go up as well as down.
|
|
|
|