|
Check these KB articles: Q143291,Q140585, Q140586 and "Adding Controls to a Property Sheet" in VC++ help
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
I would like to know if i could use _cpp_max to compare 2 double. If not, could i find a method which do that, or must i implement it?
thanks in advance
gerald
|
|
|
|
|
Hi all,
My recordset is open:
m_rs->Open(dbOpenDynaset, "SELECT * FROM PERSON");
.
.
.
Now, i need query on the Person table, so i have two way:
Way 1: Using of m_strFilter:
m_rs->m_strFilter = "[NAME] = 'Ali'";
m_rs->Requery();
Way 2: Using closing and then opening again:
m_rs->Close();
m_rs->Open(dbOpenDynaset, "SELECT * FROM PERSON WHERE [NAME] = 'Ali'", dbForwardOnly | dbReadOnly);
What is your idea ? which is faster for my query ?
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
As with most things in our world... it depends!
The general rule should be to always do a requery to cut the overhead of destruction and construction of your recordset... Remember that this happens TWO places... in your app and on the database engine. So you generally want to modify the filter and requery...
EXCEPTION:
There are times, on certain DB engines when using a Filter sets up a read only recordSet.... regardless of the MFC Documentation. In cases where you require edit or add using the filter can produce 'Recordset is not updateable' or a message to that effect!
|
|
|
|
|
Hey Guys
This may seem like a stupid question but im really stuck. Could anyone tell me what include file i need in order to do File I/O using the windows MFC.
Thanks
Peter
|
|
|
|
|
For ansii c++ file i/o, include <io.h>
For mfc file i/o (using the CFile class), you're good to go by including your stdafx.h file.
|
|
|
|
|
Does somebody know how to install an active X component
in the Microsoft Visual C++ 6.0 Install shield?
Thanks,
John
|
|
|
|
|
If you mean the InstallShield version that comes with Visual Studio 6, then you need to create a new "File Group" for self-registering files (COM objects, ActiveX Controls). After creating the file group, select it in the File Groups tab, and the right hand pane should show some settings for this file group. Double click the "Self-Registered" setting, and you can select the Yes option. This will attempt to register all of the files in this group once they've been copied.
Hope this helps - let me know if you need more info.
------------------------
Derek Waters
derek@lj-oz.com
|
|
|
|
|
Hi,
I've been looking around for some introduction on how to use the Tab control in VC++ 6. And yes I know, in many situations it is probably better to use a Property Sheet instead (blah blah), but the thing is that I don't want to use a dedicated dialog for the tab control, and don't want to mess with apply, ok and cancel buttons, I jut want to add a small tabbed area on an already existing dialog (where things have gone a bit messy).
Now, I don't really have a problem with creating the control, assigning a control object to it, to add tabs and (hopefully) to get the message interpreter working. But what I'm not really up to is how to make borderless child dialogs (created with the resource editor) pop up when I change a tab.
Is there (somewhat detailed) info about this on the web, or could someone explain to me (slowly, please) how to do this?
Thanks,
/Daniel
|
|
|
|
|
Check the KB article Q161886. It's titled "Property Sheet as the View Window of a CFrameWnd", but there's no 'real' property sheet in this sample - they create CTabCtrl and host child dialogs inside.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Hi All,
I have a problem with DCOM Configuration.I am running a DCOM
Server in a REmote Machine(Windows NT).The client in another
M/C(Windows NT ) tries to communicate with the server.The CCI
for the server component succeeds .But,I am unable to call any
function of the Server Component.I am getting "Access is Denied"
problem . I have tried iwth Default & Custom access
permissions.Still, the problem is there.
The same server component worked well once in a system with OS
Windows 2000.
What could be the problem.I am using same CoInitializeSecurity in
both Server & Client.
All security attributes I set as NULL.Where am I going wrong ?
At the same time the problem is resolved if I use no password(Domain - Administrator) on both Server and Client.
But, this should not be case.Though the Server and Client are using different passwords the DCOM should work.What should be done?
Thanx in advance for the help.
Regards,
yamini.
|
|
|
|
|
Hi All,
I have a problem with DCOM Configuration.I am running a DCOM
Server in a REmote Machine(Windows NT).The client in another
M/C(Windows NT ) tries to communicate with the server.The CCI
for the server component succeeds .But,I am unable to call any
function of the Server Component.I am getting "Access is Denied"
problem . I have tried iwth Default & Custom access
permissions.Still, the problem is there.
The same server component worked well once in a system with OS
Windows 2000.
What could be the problem.I am using same CoInitializeSecurity in
both Server & Client.
All security attributes I set as NULL.Where am I going wrong ?
At the same time the problem is resolved if I use no password(Domain - Administrator) on both Server and Client.
But, this should not be case.Though the Server and Client are using different passwords the DCOM should work.What should be done?
Thanx in advance for the help.
Regards,
yamini.
|
|
|
|
|
Thanks to everybody who answer my appeal on 25 July. I have downloaded the files. I have written some code, however my problem is I always get a linker error message for the openBrowser function, even if I have included where to find the .lib and .dll file in my compiler settings. The same occurs with the C version of the function. Anybody else have the same problem or know of a solution?
|
|
|
|
|
Hi
I have implemented tool tips using the CToolTipCtrl, does anyone know if this can be used to display the ballon style tool tips. Or any other way my code could be easily converted.
Cheers
Rich;P
|
|
|
|
|
first: you must use IE 5 or later
create the control using the TTS_BALLOON style:
m_tooltip.Create (this,TTS_NOPREFIX|TTS_BALLOON);
for the TTS_BALLOON define you should use the CommCtrl.h from the Platform SDK or simply define it yourself:
#define TTS_BALLOON 0x40
|
|
|
|
|
Hello,
I have an application with several ToolBars. Every time I start it my toolbars are arranged one under another and take much space on the screen. So, I would like to save and restore their positions on the screen.
When I try to remember top-left corner information in the registry, the restoration does not have a good effect as the toolbars need to be distant from each other.
Please, tell me the way to restore exactly the same set of toolbars.
Thanks in advance,
Andrei
|
|
|
|
|
if you are using MFC, you can use CFrameWnd::SaveBarState and CFrameWnd::LoadBarState
|
|
|
|
|
i would like to know how we could convert a long to a string?
And, if i have a double, which have to be a long, how could i do that?
thanks in advance
gerald
|
|
|
|
|
To convert a long to a string:
long l = 42;
TCHAR szBuffer[10];
wsprintf(szBuffer, _TEXT("ld"), l);
To convert a double to a long:
double d = 42.0;
long l = (long) d;
But you should check the range of the double before the conversion.
Oliver
|
|
|
|
|
for the conversion of the double to a long, i use firstly the method ceil(double), which returns a double, and after i want to convert the result to a long, so do you know if the range is good with your method
thanks
|
|
|
|
|
Double variables may hold values which is greater than the maximum long. If you are sure that your value fits into a long you could use the conversion right away.
If not you have to do something like this
if ((d < LONG_MIN) || (d > LONG_MAX))
{
error
}
else
{
conversion
}
The ceil function does not change the integer part.
Oliver
|
|
|
|
|
Hi,
check out _ltoa in the help, or _ultoa if it's unsigned.
/Daniel
|
|
|
|
|
I wrote source code, but won't work:
void CSearchDialog::DeleteAllCol()
{
int i, c;
m_List.DeleteAllItems();
c = m_List.GetItemCount();
for(i = 0; i <= 2; i++)
m_List.DeleteColumn(i);
}
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
void CSearchDialog::DeleteAllCol()
{
int i, c;
m_List.DeleteAllItems();
c = m_List.GetItemCount();
for(i = 2; i >= 0; i--) // i from 2 down to 0
m_List.DeleteColumn(i);
}
alen
|
|
|
|
|
So, there is any way for deleting automatically ???
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|