|
Hi
When closing access database file objects in c++ I keep getting this error:- Debug Assertion Failed.
It happens as I close the CDaoDatabase object but I have noticed that when it is debugged and stepped over there are no errors.
Why doesn't this work?
CDaoDatabase db;<br />
db.Open( _T("c:\\database.mdb") );<br />
db.Close();
Also are there any good examples of using the MS Jet Engine including V4 if pos.
Many thanks
Jason
|
|
|
|
|
Hello,
I think this article helps to you.
http://funducode.com/freevc/database/database2.htm
With Regards,
R.Selvam
|
|
|
|
|
Hi,
How can we compare sign of numbers in C++ ?
Bye,
Claude
|
|
|
|
|
int i = -5;
BOOL bNegativeNumber = i >> 31;
ASSERT(bNegativeNumber == TRUE);
...
short sh = 4;
BOOL bNegative16 = sh >> 15;
ASSERT(sh == FALSE);
Hope you meant that
Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
|
|
|
|
|
I hope you are joking... the size of integers are only specified in realtive form (i.e. sizeof(char) <= sizeof(int) and so on).
Bitshifting based on static numbers are bound to fail.
Use comparisons instead (as in the post below).
And if the paths that I have followed/have tread against the flow/there is no need for sorrow
I am coming home
Return, Crüxshadows
|
|
|
|
|
int a = 145;
int b = -51;
bool fIsDifferent = (a >= 0) ^ (b >= 0);
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
Hi !!
My app is being developed in MFC, VC++7. How can I make my controls resizable ?? I mean, when an user clicks on the corner to make the window bigger or smaller... please if the piece of code could be provided it would be great!!
Thank you very much !!
Written by: Rafael Fernández López.
void life ( bool me, bool her )
{
if ( her )
{
me = true ;
}
else
{
me = false ;
} }
|
|
|
|
|
|
Hello everyone.
I have built a program with a listbox on the main dialog. I desire to use this listbox for multiple purposes, sometimes allowing the user to select an item out of it, othertimes not allowing them to select anything. What I am wondering, is it possible to have code within the program that changes the "selection" property of the listbox from "Single" to "None"?
Thanks!
|
|
|
|
|
One solution is to derive a class from CListCtrl and do custom selection. Otherwise, one possible solution is to intercept the mouse click.
Kuphryn
|
|
|
|
|
|
(I'm new at VC++). I've been looking for an hour on how to do this. I am wondering could you give me an example of how I would do this? (I tried looking for things such as m_ListBox.SetStyle() but could not find anything?)
Thanks for the reply I do appreciate it!
|
|
|
|
|
See CWnd::GetStyle() and ::SetWindowLong() to dynamically change a control's style.
/ravi
Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Close, CWnd::ModifyStyle() is the function to use (assuming you're using MFC which it looks like you are)
m_ListBox.ModifyStyle ( LBS_MULTIPLESEL | LBS_NOSEL, LBS_NOSEL );
m_ListBox.ModifyStyle ( LBS_MULTIPLESEL | LBS_NOSEL, LBS_MULTIPLESEL );
m_ListBox.ModifyStyle ( LBS_MULTIPLESEL | LBS_NOSEL, 0 );
--Mike--
Ericahist | CP SearchBar v2.0.2 | Homepage | 1ClickPicGrabber New v2.0! | RightClick-Encrypt
Pinky, are you pondering what I'm pondering?
I think so Brain, but if we shaved our heads, we'd look like weasels!
|
|
|
|
|
Hi,
Can anyone please give me a clue about changing the background color of a word in a CRichEditCtrl control?
I've seen the documentation on Rich Edit 2.0 (whereever that lives!) and CHARFORMAT2 but whenever I try it the background color remains unchanged.
BazM
|
|
|
|
|
Hello,
see this article,
http://www.codeguru.com/richedit/SyntaxColorizer.html
With Regards,
R.Selvm
------------------------------------------
Wish you happy new year!
|
|
|
|
|
Hi there and many thanks for your reply.
I had already read this article but I dont think it helps with changing the background colour of an individual word.
However, I just found a great article by Andrew Forget (CodeGuru) about Rich Edit 2 and I am hoping that this does the trick.
Have a happy and prosperous new year!
BazM
|
|
|
|
|
I wish to copy a string of text to the Windows clipboard and paste it from it to an edit control.
what is the process? i tried consulting with MSDN, however, i couldn't understand the process, and where exactly is the reference to the Edit's handle.
Can someone explain shortly how it works, and what are the steps to be performed?
|
|
|
|
|
One solution is via COleDataSource.
char sString[5] = "2004";
sString[4] = '\0';
HANDLE cbData = ::GlobalAlloc(GMEM_MOVEABLE, 5);
PTSTR pData = static_cast<ptstr>(::GlobalLock(cbData));
_tcscpy(pData, sString);
::GlobalUnlock(cbData);
COleDataSource *pODS = new COleDataSource;
pODS->CacheGlobalData(CF_TEXT, cbData);
pODS->SetClipboard();
Check out MSND.
Kuphryn
|
|
|
|
|
Hello !
I'm currently working on an DOS App but i don't know how to use colors. For e.g. I want to set the BK color on BLUE and the Text color on WHITE. And i don't know to how to draw borders. I didn't found any Articels about this.
|
|
|
|
|
Hello,
HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(hStdOut, FOREGROUND_RED);
With Regards,
R.Selvam
|
|
|
|
|
Thanks. Works great
|
|
|
|
|
*plonk*
what you mean is a Win32 Console Application, not a DOS App
scio me nihil scire
My OpenSource(zlib/libpng License) Engine:
http://sourceforge.net/projects/rendertech
Its incurable, its a Pentium division failure.
|
|
|
|
|
I want to write a virtual printer driver.
The driver should be used from any print-dialog like any other printer which is installed on the system.
It should get the pages to print, change them and give them to the "real" printer.
Probably someone knows how to write such a driver an how to give the data further to the "real" printer.
Is this possible with Visual C++ and MFC? And how to make it?
I hope someone can answer me because there are very few things on this topic on the internet.
shojo
|
|
|
|
|
I want to develop a application which will connect me directly to yahoo messenger window(or any desktop application). i.e entering username and password in Login window will be handled by my application.
Any suggestions?
|
|
|
|