|
I have already gone through those messages to no avail, i have even tried passing keyboard values direct to the OnChar method of the CDateTime Control but when i pass them from the button presses, eg press one and send the appropriate stuff via OnChar it will not update, however via a normal keypress it does update. I am beginning to wonder if the CDateTimeCtrl is a bit of a 'funny' class unless you use it exactly in the way microsoft want you to!
|
|
|
|
|
Just like LoadLibrary.
Help me plz...
|
|
|
|
|
What do you want to do exactly?
What function do you need?
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
I need LoadLibrary from memory, not from file.
Just like:
BOOL MyLoadLibrary(PBYTE LibCode);
|
|
|
|
|
I know an assembly way, if interested send me a mail
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Wow..... It's realy?!
Send it to me: winddriver@msn.com
Thank u very much~~~~~~~~~~~
|
|
|
|
|
yes,the above mr say right,what file or function do you indeed want ?which
dll the function is in?
for example,i want to use GradientFill function in msinmg32.dll to draw gradient rectange
i can do this way:
hinst_msimg32 = LoadLibrary( "msimg32.dll" );
m_bCanDoGradientFill = FALSE;
if(hinst_msimg32)
{m_bCanDoGradientFill = TRUE;
dllfunc_GradientFill = ((LPFNDLLFUNC1) GetProcAddress( hinst_msimg32, "GradientFill" ));
}}
|
|
|
|
|
DLLs automatically use shared memory for READ-ONLY areas.
Due Regards
Mahendra
|
|
|
|
|
We are getting a link error (2001) only in release mode however everything is fine when I run rebuild in Debug. Obviously this isn't a lot of info, I am researching on MSDN right now, any suggestions? I have already read the VC++ FAQ.
- Nick Parker My Blog | My Articles
|
|
|
|
|
Check in the Project Settings dialog box, the "Link" tab.
Make sure the libraries in the "Libraries" editbox are the same as in the debug configuration's "Libraries" editbox.
Bikram Singh
|
|
|
|
|
Thanks, I was missing two .lib files. I guess I must be having a case of the Mondays.
- Nick Parker My Blog | My Articles
|
|
|
|
|
Nick Parker wrote:
I guess I must be having a case of the Mondays.
Thank goodness it's only a 24-hour bug!
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
|
We all seem to have one of those once in a while!
Ant.
|
|
|
|
|
If you could dump the link errors here may be it would bemore usefull to comment on.
I'll write a suicide note on a hundred dollar bill - Dire Straits
|
|
|
|
|
If Value is NULL trying to set nValue to 0
is _com_error correct
TRY
{
nValue = recordset2->Fields->GetItem("Value")->GetValue();
}
CATCH_ALL(_com_error, e)
{
nValue = 0;
}
END_CATCH_ALL
|
|
|
|
|
CATCH_ALL only takes one parameter.
If you want to do want you suggest change thus
try<br />
{<br />
nValue = recordset2->Fields->GetItem("Value")->GetValue();<br />
}<br />
catch(_com_error& e)<br />
{<br />
nValue = 0;<br />
}
Other than that it will definately set nValue to 0 when a com error is thrown while reading the "Value" field.
Ant.
|
|
|
|
|
How to build a DataBase of data types (int, char, struct, …)?
I would like to build an ACCESS DataBase, containing information about all the data types we use.
For example:
Suppose, we have the following C/C++ code;
typedef char ARRAY_8_BYTES[8];
struct Foo1
{
int a[20];
int b;
ARRAY_8_BYTES a6;
char a[8];
};
struct Foo2
{
Foo1 foo1;
Foo1 *pFoo1;
char c[12];
};
Ideally, I’d like to have an ACCESS DataBase, containing data about the Foo1, Foo2 structures. So, I would be able to build a program, which uses this data base and (for instance) generates automatically the C code structure definitions above.
The questions I ask myself are:
1) How to organize data which is hierarchical by nature using a relational
data base such as ACCESS?
2) Are they better solutions than using ACCESS to solve this kind of
problem?
3) Do you know about other databases or commercial softwares that permit to
do this?
4) Could you please give me either a precise answer or links which can help
me?
Many, many Thanks.
|
|
|
|
|
It sounds like you need to preface each of your struct/class types with a specially-formatted comment. Then you could write a parser that would scan .h and .cpp files looking for known types (e.g., int , bool , char ) and the aforementioned comments.
While not directly related, back in the mid 90s, I started using a product by Eric Artzt called AutoDuck. It was a utility he developed while working for Microsoft. It scanned source files for special comments and created .hlp files for developers to use.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
The problem is NOT how to parse the .cpp, .h in order to build the DataBase, but how to build the data base.
I've just given (as an example only) the possibility to read the data base and to generate .cpp and .h files (and not the opposite)
Thank you anyway
|
|
|
|
|
Michigan1854 wrote:
...but how to build the data base.
Ahh, I overlooked that minor detail.
I would create an empty database, with all relevant tables, from within Access. Then create a DSN (from the ODBC applet in Control Panel). Next, derive a class from CRecordset , which will ask you for the name of the DSN previously created. When you need to add a record to the database, simply use the AddNew() and Update() methods of this class.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
I know how to access a data base, create by ACCESS from C++ (Using either ODBC, DAO or ADO).
What I do NOT know is how to organize data which is hierarchical by nature using a relational data base such as ACCESS?
If I had to deal with relational data, such as: (Table 1 related to Table 2)
Table 1: Client ID, Client Name, Client address
Table 2: Order number, Client ID
Client ID connects Table 1 to Table 2.
But how to organize in such tables recursive data.
struct FOO1
{
int a;
int b;
int c;
};
struct FOO2
{
struct FOO1 f1;
struct FOO3 f3;
....
};
|
|
|
|
|
Hello guys,
I need some suggestions on this.
I have two dialogs CDialog1 and CDialog2. CDialog1 has a ComboBox that contains a list of values. CDialog2 has a ListBox. The CDialog1 calls up CDialog2 using DoModal(). When the CDialog2 is up, its ListBox should be filled with the listed values in the ComboBox of the CDialog1 (of course, this would be done in the CDialog2's OnInitDialog()). Then in the CDialog2, the items in the ListBox can be changed and as soon as this dialog is closed (EndDialog()), the values in the ListBox will go back and replace the ones in the CDialog1's ComboBox.
As you can see, I need to either share these two members (likely via the use of DDX control) between the two dialogs or have the CDialog1's ComboBox fully accessible by the CDialog2.
I tried to create paired members (CComboBox or CListBox) in the other dialog for the original member, duplicate a copy and create functions to update the list on both sides whenever necessary. But the copying didn't work. I couldn't go, for example, in CDialog1 before calling DoModal,
CDialog2 dlg2;
dlg2.m_ComboBox = dlg1.m_ComboBox;
</code>
The other way I could think of is to use SendMessage() to retieve/update the ComboBox' values from CDialog2 to CDialog1. Or, I could simply make the ComboBox globally accessible through pointer for CDialog2.
Before I try anything, I'd really like to hear from anyone. What would be the best way (MS recommended way?)to go about it? Or could my first method be corrected?
Thanks alot
|
|
|
|
|
J.B.
I can only suggest the method that I have used in the past, so this may not ideally fit your requirements exactly.
J.B. wrote:
As you can see, I need to either share these two members (likely via the use of DDX control) between the two dialogs or have the CDialog1's ComboBox fully accessible by the CDialog2.
Directly accessing another objects UI control is for me a general no, no! This applies to worker threads as well as separate UI classes.
Share your information via a public member variable, declared in the dialog class being called. Since you are dealing with a number of distinct items, I would go for a container variable, such as an stl's vector class.
- Before calling DoModal(), fill the instantiated dialog class's vector collection with the list of items.
- In your OnInitDialog() overridden function, populate your now valid listbox/list control, with this member vector.
- On successful termination of your dialog (OnOk), modify the public vector variable, if any changes are needed.
- In your calling dialog function, use the returned vector of items to modify its control display.
This method has worked for me in the past, so you may find it useful in your solution.
I Dream of Absolute Zero
|
|
|
|
|
Thanks RChin!
I shall try that~
|
|
|
|