|
What is the risk?
None, static_cast does not rely on RTTI.
Is there any impact on performance?
Sure, dynamic_cast is more costly.
Should I release a new version with RTTI and dynamic_cast to prevent any potential problems?
Depends on your code. If there's a chance that dynamic_cast can fail (i.e. return 0) and you were using static_cast , then your app is buggy. If not, no need to switch to dynamic_cast anyway
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
|
Hello.
Does MS Access support BatchUpdates?
I have a project in which im using following code but it gives me an error when there is
more than 2 records in the recordset which have been changed
IDispatch error # 3156 :Number of rows with pending changes exceeds the limit.
<br />
_variant_t v(m_pProject->m_ptrConnection.GetInterfacePtr());<br />
<br />
m_pRstBugs->CursorType = adOpenKeyset;<br />
m_pRstBugs->LockType = adLockBatchOptimistic;<br />
m_pRstBugs->Open((LPCTSTR)ProjectName, v,<br />
adOpenKeyset,adLockBatchOptimistic,adCmdTableDirect);<br />
<br />
if (m_pRstBugs->Supports(adIndex) && m_pRstBugs->Supports(adSeek))<br />
{<br />
m_pRstBugs->Index = DBtags::m_sProjectIndexName;<br />
}<br />
<br />
<br />
m_pRstBugs->MoveFirst();<br />
while(!m_pRstBugs->adoEOF)<br />
{<br />
_variant_t x("test");<br />
m_pRstBugs->Fields->Item["description"]->Value = x;<br />
m_pRstBugs->MoveNext();<br />
}<br />
m_pRstBugs->UpdateBatch(adAffectAll);<br />
<br />
|
|
|
|
|
I'm not sure how many changes are supported, but I think(!) the Jet Database Engine only supports 1. You might want to check out the "Maximum Pending Rows" property of your RecordSet object before making any changes.
The article for the property is on MSDN at
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adosql/adoprg04_9cop.asp
RageInTheMachine9532
|
|
|
|
|
Does anybody know how I would enumerate LAN connections and disconnect them. I know you can do this with the RAS API for dial-up connections but I am not sure if it works with LAN connection
Thanks
Ceri
|
|
|
|
|
Hello,
i am using a CStdioFile object to read in a text-file. On some positions within the file i have to seek. I do it like this:
CString line;
CStdioFile file;
...
/* Read a few lines */
while (condition) {
file.ReadString(line)
/* do something with line */
}
/* Save current start-position for new line */
DWORD pos = file.GetPosition();
/* Read a few lines */
while (condition) {
file.ReadString(line)
/* do something with line */
}
/* Go back to saved position */
file.Seek(pos,CFile::begin);
Positioning the file-pointer by using the seek-method works only correct, if every line has a 0A 0D at the end. Now i have to parse a file that only has 0A at the end and the seek-method fails. It sets the file-pointer to the middle of a line and not to the beginning of the expected line. Please help!
Best regards
tabor25
|
|
|
|
|
Do you know whether ReadString() appends or overwrite previous data in a CString object?
Kuphryn
|
|
|
|
|
Hello Kuphryn,
ReadString() overwrites the previous data in the Cstring object.
Best regards
tabor25
|
|
|
|
|
Hi, I have a whindow which is currently minimized, now for some particular reason I must set it to be a foreground window for a short moment, but I do not want the user to see it. So the best way to do so, I guess, is to restore the window then immediately move it off screen(e.g., call "::MoveWindow" and give it a CRect(-999, -999, 100, 100), or something like that).
Now the problem is that, since calling "::MoveWindow" while the window is minimized has NOT effect, I must first restore the window by calling "ShowWindow(hwnd, SW_RESTORE)", at that time, before it gets moved off screen, the window displays on screen for one second or two, and that will annoy my user.
So, is there anyway I can move a previously minimized window off screen without letting it show on the visible screen area at all? Thanks.
|
|
|
|
|
And the following :
Hide -> Restore -> Move -> Show ? Cn you hide it while it is minimized ?
~RaGE();
|
|
|
|
|
Since SW_RESTORE will display the window regardless of its previous state.
|
|
|
|
|
Hi !
I have programmed a visual c++ add-in, which runs fine on all our visual c++'s but one, which throws the error : add-in cannot be registered because DllRegisterServer() fails. Add-in will not be loaded again. (Merely translated from German ).
There is no memory error, registry can be accessed, so any idea of what could be the problem ?
Platform is WinNT 4.0 SP 5.0, Visual C++ 6.0.
~RaGE();
|
|
|
|
|
use depends.exe to check if some of the dlls needed by add-in are missing
|
|
|
|
|
Can anyone recommend a good package of charting components? I've downloaded a demo of GigaSoft ProEssentials and that's the sort of thing I'm looking for. I don't know what else is out there and I'd like to know how it compares with other packages. I'm more interested in scientific applications, including plotting in real time as data is collected, than simple pie charts, etc. Thanks for your help.
|
|
|
|
|
hi every bdy,
does ny bdy here know how to make a cell, in MFCGridCtrl multiline. Like if the text is more than the width of the cell than it should go into the next line. I have tried using SetItemFormat nRow,0,ES_MULTILINE|ES_AUTOVSCROLL|ES_WANTRETURN) with these parameters but i doesnt seems to work. I would be really greatful if ny bdy could help me in this regard
regards,
Bilal.
Email bilal793@yahoo.com
|
|
|
|
|
|
thanks for replying ...
i hve even changed the height of the rows ... but its still not working ... i hve read the whole document of gridctrl.asp again nd looked for the words u mentioned, but they are not there ...
is it somehow possible for u to make a small application in which there is a cell with multiline ... i would reallly appreciate it
regards
Bilal
|
|
|
|
|
oh sorry ... i mean the message board there ...
try this ...
|
|
|
|
|
thanks chris ... i hve managed to solve the problem
thanks for replying and ur help ..
regards
Bilal.
|
|
|
|
|
Ok ... i'm glad that i could help you ...
But i'm not chris ... cr doesn't mean chris )
Doesn't matter ...
cr97
|
|
|
|
|
Hi,
Does anyone know of how I can create a HBITMAP resource from a bitmap file. I remember seeing some source code about this, but cannot find it anymore.
Thanks,
Pankaj
Without struggle, there is no progress
|
|
|
|
|
HBITMAP LoadBitmap(
HINSTANCE hInstance,
LPCTSTR lpBitmapName
);
~RaGE();
|
|
|
|
|
LoadImage is the SDK command you want.
hBmp = (HBITMAP)::LoadImage (NULL, "c:\test.bmp", IMAGE_BITMAP, 0,0, LR_LOADFROMFILE);
Iain.
|
|
|
|
|
I want my dialog to appear at the bottom left corner of desktop window. How can i do this ???
|
|
|
|
|
SetWindowPos() ?
Rickard Andersson8
Here is my card, contact me later!
UIN: 50302279
E-Mail: nikado@pc.nu
Interests: C++, ADO, SQL, Winsock, 0s and 1s
|
|
|
|