|
Of course you can!
Maxwell Chen
People say "No news is good news". Then, no bug is good bug!?
|
|
|
|
|
ok, i see. Thanks heap for that.
|
|
|
|
|
Kann mir jemand 'n Tip geben, wie ich die Date-/Timepicker so konfigurieren kann, das jeweils nur die Tage, Monate bzw. Jahre angezeigt werden
und nicht der ganze Kalender?????
|
|
|
|
|
Try say that again in english??
Thank you very much,
John
Aloha from Hawaii
|
|
|
|
|
Hm, looks like he or she has too much problems to see that this is an English speaking forum
"Can someone give me a tip how to configure the Date/Timepicker control in a way that it shows only days, month or years, not the whole calendar?"
|
|
|
|
|
Beim Versuch eine Access-DB in eine MDI-Anwendung (über RecordSet)
einzubinden, bekomme ich immer die Fehlermeldung: Der ODBC-Treiber
unterstützt keine Dynasets.
Bei der Anlage des RecordSets wurde die DB-Tab korrekt als Dynaset eingebunden.
Bei einem anderen SDI-Projekt war dies mit einer ähnlich strukturierten
Access-DB, mit den gleichen ODBC-Treibern problemlos möglich.
Bin für jede Lösung dankbar...
|
|
|
|
|
Try English.
Aizik Yair
Software Engineer
|
|
|
|
|
I try to translate it.
"During the attempt to access a Access-DB in a MDI application (via Recordset) I always get the error message: The ODBC driver doesn't supports dynasets.
During the creation of the recordset the DB-Tab is included correct as dynaset [Huh? What does this means? Okay, I don't use ClassWizard, I write the code by myself.] In a different SDI project it was possible without any problems with an Access-DB with the same ODBC drivers.
TIA"
|
|
|
|
|
i am trying to use qsort so that i can sort out y from highest to lowest. can anyone help me? anyways, thank you very much.
struct SPRITE
{
int x;
int y;
};
// Maximum number of sprites
const int N_SPRITES = 10;
// Array of sprites
SPRITE sprites[N_SPRITES];
int Compare (const void *one, const void *two);
/* Pre: Enter value for one and two
* Post: Compares all of both strings
*/
int main()
{
int value;
for (int i=0; i<n_sprites; i++)
="" {
="" cout="" <<="" "enter="" a="" value:="" ";
="" cin="">> value;
sprites[i].y = value;
}
qsort(sprites, N_SPRITES, sizeof(int), Compare);
for (i=0; i
|
|
|
|
|
for (int i=0; i // ERROR
{
...
}
for ( int i=0 ; i < N_SPRITES ; i++ ) // GOOD
{
...
}
Aizik Yair
Software Engineer
|
|
|
|
|
First:
John Cruz wrote:
qsort(sprites, N_SPRITES, sizeof(int), Compare);
should be qsort(sprites, N_SPRITES, sizeof(SPRITE), Compare);
Second:
John Cruz wrote:
int Compare (const void *one, const void *two)
{
return strcmp((char*)one, (char*)two);
}
one and two are pointing to SPRITE objects. So it should be something like:
return strcmp(((SPRITE*)one).y, ((SPRITE*)two).y); that is if the y member is a char*.
|
|
|
|
|
i got your number my first mistake fixed. but the second mistake:
Niklas Lindquist wrote:
one and two are pointing to SPRITE objects. So it should be something like:
return strcmp(((SPRITE*)one).y, ((SPRITE*)two).y); that is if the y member is a char*.
this wont compile because i am using strcmp which has needs 2 const char parameters and because y is not a member of char. does any know how to fix this thing?
well anyways, thank you very much.
Thank you very much,
John
Aloha from Hawaii
|
|
|
|
|
Hi,
I´m drawing a metafile, and I need to use that metafile in an ActiveX control ( so when the activeX control need to be in design mode it will make on metafile from that metafile.... )...
The problem that I got is that I cannot print or display anything, only when the ActiveX is in Run mode, it is shown ok ( even if I´m in Run Mode and I try to print, it shows anything or a mess).
Can it be, because the metafile it´s done using MM_TEXT ( setMapMode), to display the text ?
do you know any solution for this ? ( If I cannot print the control uy uy... I will be in deep sh*t ).
Thanks in advance, greetings
Braulio
|
|
|
|
|
hi all
I'm doing my small project on MFC. I'm trying to creat a class file. But it always give me some sort of mysterious error. Does any one know what went wrong? Heres is my class
class Group
{
public:
Group::Group(CString t1, CString t2, CString t3, CString t4);
CString Group::GetTeam(int i);
void Group::PutResult(int t1, int s1, int t2, int s2);
void Group::GetLadder();
private:
CStringArray team;
};
Group::Group(CString t1, CString t2, CString t3, CString t4)
{
team.Add(t1);
team.Add(t2);
team.Add(t3);
team.Add(t4);
}
//End here
and this is the error i get
question1Doc.obj : error LNK2005: "public: __thiscall Group::Group(class CString,class CString,class CString,class CString)" (??0Group@@QAE@VCString@@000@Z) already defined in question1.obj
question1View.obj : error LNK2005: "public: __thiscall Group::Group(class CString,class CString,class CString,class CString)" (??0Group@@QAE@VCString@@000@Z) already defined in question1.obj
Debug/Assignment3_question1.exe : fatal error LNK1169: one or more multiply defined symbols found
thanks in advance
|
|
|
|
|
Are you defining the constructors in a .h file? If so, move them to a .cpp .
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Protect from multiple inclusion:
#ifndef _MY_GROUP_H__
#define _MY_GROUP_H__
class Group
{
};
#endif
Yes Joaquin is right, function definitions in .H also cause such errors.
Maxwell Chen
People say "No news is good news". Then, no bug is good bug!?
|
|
|
|
|
thanks joan, thanks max . It was a big help. Yeah the problem is i implemented the constructor in the header file where as i should do it in cpp file.
Cheers
|
|
|
|
|
Hi,
We had several signal handling functions in C++ code under Unix platform.
SIGTERM - drain the requests, and shutdown
SIGHUP - A important signal handler in that it signals a reload of the data.
SIGUSR1 - drains the requests and shutdown.
It is our requirement to find functionality in the win32 world that would be analogous to signals in Unix.
we need to find Windows idioms for these functions, some type of ways to indicate to a process that we want it to drain requests and shutdown or reload data etc.
According to our understanding signal processing isn’t one of the Windows strong points.
We are in the process of finding alternatives to scope out a solution for signals in Windows.
Currently we do not have adequate domain knowledge.
Can you please provide us some directions in this regard?
Thanks,
-Sarma
|
|
|
|
|
There is 'signal()' function described in the MSDN, but I have never used it on Windows platform. If it will not help, try to map windows messages to your signals (I mean like WM_ENDSESSION to probably SIGTERM).
|
|
|
|
|
Do you want to detect or send signals? If the former, then there's a function signal analogous to UNIX. I've used it in the past to signal some appropriate event with SetEvent , which is then processed by routines in the main thread of execution.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hello all,
I know this is not a C list but maybe you can give me some help.
Here is my problem :
I have this structure defined in file aaa.h
typedef struct _my_struct{
char str1[100];
char str2[100];
} my_struct;
in the file bbb.c I have a function like this :
void my_function(int x, my_struct *p_my_struct)
{
... /* doing something*/
}
in the coresponding header bbb.h I have the declaration of thefunction :
void my_function(int x, my_struct *p_my_struct);
how can I declare my_struct in bbb.h as being external ?
I've used "external struct my_struct" but it's not compiling. Later I've tried out all the possible combinations but still not compiling. I don't want to include aaa.h in bbb.h
TIA,
Thomas
|
|
|
|
|
Simply write:
extern struct _my_struct;
Maxwell Chen
People say "No news is good news". Then, no bug is good bug!?
|
|
|
|
|
Hi,
you probebly want to construct my_struct in one .c file and then use it in another .c file.
So if I correct the Wright way to do this:
1. First construct your my_struct in one .c file (lets say it will be call "TheStruct”).
Example :
my_struct TheStruct;
2. Now after you know you construct you my_struct go to other .c file
And declare on top of it "extern my_struct TheStruct;"
TheStruct is the same my_struct you construct in 1.
No Need To do that in .h files
Aizik Yair
Software Engineer
|
|
|
|
|
Hello Aizik,
Thank you for your answer. Unofrtunatelly it's still not working. Here is the code :
/* Main.c */
extern struct my_struct *TheStruct;
void main()
{
}
int my_function(int x, my_struct *p_my_struct){
printf("inside my_function\n");
}
/* Main.h */
int my_function(int x, my_struct *p_my_struct);
/* Second.c */
#include "Second.h"
my_struct *TheStruct;
/* Second.h */
typedef struct _my_struct{
char str1[100];
char str2[100];
} my_struct;
Thank you very much,
Thomas
|
|
|
|
|
Since you used a typedef you need not define that struct external in a function declaration. Only make sure you include the corresponding header file.
external refers to objects, not to types.
Best regards,
Alexandru Savescu
|
|
|
|