dev-cpp-users Mailing List for Dev-C++ (Page 110)
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
You can subscribe to this list here.
| 2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(15) |
Oct
(115) |
Nov
(154) |
Dec
(258) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2001 |
Jan
(377) |
Feb
(260) |
Mar
(249) |
Apr
(188) |
May
(152) |
Jun
(150) |
Jul
(195) |
Aug
(202) |
Sep
(200) |
Oct
(286) |
Nov
(242) |
Dec
(165) |
| 2002 |
Jan
(245) |
Feb
(241) |
Mar
(239) |
Apr
(346) |
May
(406) |
Jun
(369) |
Jul
(418) |
Aug
(357) |
Sep
(362) |
Oct
(597) |
Nov
(455) |
Dec
(344) |
| 2003 |
Jan
(446) |
Feb
(397) |
Mar
(515) |
Apr
(524) |
May
(377) |
Jun
(387) |
Jul
(532) |
Aug
(364) |
Sep
(294) |
Oct
(352) |
Nov
(295) |
Dec
(327) |
| 2004 |
Jan
(416) |
Feb
(318) |
Mar
(324) |
Apr
(249) |
May
(259) |
Jun
(218) |
Jul
(212) |
Aug
(259) |
Sep
(158) |
Oct
(162) |
Nov
(214) |
Dec
(169) |
| 2005 |
Jan
(111) |
Feb
(165) |
Mar
(199) |
Apr
(147) |
May
(131) |
Jun
(163) |
Jul
(235) |
Aug
(136) |
Sep
(84) |
Oct
(88) |
Nov
(113) |
Dec
(100) |
| 2006 |
Jan
(85) |
Feb
(119) |
Mar
(33) |
Apr
(31) |
May
(56) |
Jun
(68) |
Jul
(18) |
Aug
(62) |
Sep
(33) |
Oct
(55) |
Nov
(19) |
Dec
(40) |
| 2007 |
Jan
(22) |
Feb
(49) |
Mar
(34) |
Apr
(51) |
May
(66) |
Jun
(43) |
Jul
(116) |
Aug
(57) |
Sep
(70) |
Oct
(69) |
Nov
(97) |
Dec
(86) |
| 2008 |
Jan
(32) |
Feb
(47) |
Mar
(106) |
Apr
(67) |
May
(28) |
Jun
(39) |
Jul
(31) |
Aug
(25) |
Sep
(18) |
Oct
(25) |
Nov
(5) |
Dec
(21) |
| 2009 |
Jan
(33) |
Feb
(27) |
Mar
(27) |
Apr
(22) |
May
(22) |
Jun
(10) |
Jul
(17) |
Aug
(9) |
Sep
(21) |
Oct
(13) |
Nov
(4) |
Dec
(11) |
| 2010 |
Jan
(10) |
Feb
(8) |
Mar
(4) |
Apr
(1) |
May
|
Jun
(2) |
Jul
|
Aug
(1) |
Sep
(8) |
Oct
(26) |
Nov
(9) |
Dec
(1) |
| 2011 |
Jan
(21) |
Feb
(16) |
Mar
(4) |
Apr
(19) |
May
(26) |
Jun
(9) |
Jul
(6) |
Aug
|
Sep
(4) |
Oct
(3) |
Nov
(2) |
Dec
(1) |
| 2012 |
Jan
(4) |
Feb
(7) |
Mar
(4) |
Apr
|
May
(1) |
Jun
(10) |
Jul
(1) |
Aug
(1) |
Sep
(18) |
Oct
(3) |
Nov
(1) |
Dec
(1) |
| 2013 |
Jan
(4) |
Feb
(2) |
Mar
(15) |
Apr
(6) |
May
(1) |
Jun
(3) |
Jul
(1) |
Aug
(2) |
Sep
(4) |
Oct
|
Nov
(9) |
Dec
|
| 2014 |
Jan
(4) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(5) |
Aug
(4) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
(4) |
| 2015 |
Jan
(2) |
Feb
(3) |
Mar
(1) |
Apr
(2) |
May
(1) |
Jun
(2) |
Jul
|
Aug
(1) |
Sep
(2) |
Oct
(9) |
Nov
(35) |
Dec
(6) |
| 2016 |
Jan
(7) |
Feb
(10) |
Mar
(10) |
Apr
(9) |
May
(13) |
Jun
(9) |
Jul
(1) |
Aug
(3) |
Sep
(3) |
Oct
(1) |
Nov
(1) |
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
(1) |
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: lordSauron <lor...@gm...> - 2005-08-21 17:53:45
|
Yeah, otherwise your String class is okay. Just try and keep in mind that it should only be a wrapper on top of character arrays, nothing more. This is because you really should use character arrays in the first place, but since I'm lazy I'm building a similar class modeled after Java's java.lang.String's look and feel (but not it's "leave memory everywhere" technique), but yeah, that looks okay by me. The only thing I'd like to know about is why you had the iostream operators made as friends of String, rather than overloading them outside of String. I don't get that. Mind explaining? |
|
From: Per W. <pw...@ia...> - 2005-08-21 11:52:09
|
Hi!
You have defined a string conversion function that will return
const char*
but you are assigning to a non-const char* variable.
See any problem somewhere ;)
/Per W
On Sun, 21 Aug 2005, bhadram rao wrote:
> Dear friend,
> I'd a problem. I'm using user defined conversion function char* to use like
> char* ch=s1;(string object name); But the problem is that it is giving compilation error. It cannot able to find the conversion operator char*. Can any body solve my problem. Please help me in this aspect.I'd already defined user conversion operator. But still not working.
> String::operator const char*() const
> {
> return buf;
> }
> yours friendly,
> bhadram
> D:\cpppractice\aug20\maincpp.cpp(12) : error C2440: 'initializing' : cannot convert from 'class bhadram::String' to 'char *'
> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
> Error executing cl.exe.
> maincpp.obj - 1 error(s), 0 warning(s)
|
|
From: bhadram r. <bha...@ya...> - 2005-08-21 08:55:27
|
Dear friend,
I'd a problem. I'm using user defined conversion function char* to use like
char* ch=s1;(string object name); But the problem is that it is giving compilation error. It cannot able to find the conversion operator char*. Can any body solve my problem. Please help me in this aspect.I'd already defined user conversion operator. But still not working.
String::operator const char*() const
{
return buf;
}
yours friendly,
bhadram
D:\cpppractice\aug20\maincpp.cpp(12) : error C2440: 'initializing' : cannot convert from 'class bhadram::String' to 'char *'
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
Error executing cl.exe.
maincpp.obj - 1 error(s), 0 warning(s)
The program is as under:
cpp file is:
# include <iostream.h>
# include <String1.h>
using namespace bhadram;
void main()
{
String s1("kummarasetti");
String s2("veera");
String s3("bhadram");
char* ch=s1;
cout<<ch;
}
header file:
# include <string.h>
namespace bhadram
{
class String
{
private:
int size;
char* buf;
friend ostream& operator<<(ostream& ostr,String& s);
friend istream& operator>>(istream& istr,String& s);
friend String operator+(String ,String);
public:
String(int n=0);
String(const char* c);
String(const String& s);
String& operator=(String& s);
String& operator+=(String& s);
operator const char*() const;
};
String::operator const char*() const
{
return buf;
}
String operator+(String s1,String s2)
{
String tempOb;
tempOb.size=s1.size+s2.size;
tempOb.buf=new char[tempOb.size+1];
strcpy(tempOb.buf,s1.buf);
strcat(tempOb.buf,s2.buf);
return tempOb;
}
String& String::operator+=(String& s)
{
char* temp=new char[size+s.size+1];
int tempSize=size+s.size;
strcpy(temp,buf);
strcat(temp,s.buf);
delete [] buf;
size=tempSize;
buf=new char[tempSize+1];
strcpy(buf,temp);
return *this;
}
String& String::operator=(String& s)
{
delete [] buf;
size=s.size;
buf=new char[size+1];
strcpy(buf,s.buf);
return *this;
}
istream& operator>>(istream& istr,String& s)
{
delete [] s.buf;
char tempBuffer[200];
istr>>tempBuffer;
s.size=strlen(tempBuffer);
s.buf=new char[s.size+1];
strcpy(s.buf,tempBuffer);
return istr;
}
ostream& operator<<(ostream& ostr,String& s)
{
return ostr<<s.buf;
}
String::String(const String& s)
{
size=s.size;
buf=new char[size+1];
strcpy(buf,s.buf);
}
String::String(const char* c)
{
size=strlen(c);
buf=new char[size+1];
for(int i=0;i<size;i++)
{
buf[i]=*c++;
}
buf[i]='\0';
}
String::String(int n)
{
if(n==0)
n=1;
size=n;
buf=new char[size+1];
for(int i=0;i<n;i++)
{
buf[i]=' ';
}
buf[i]='\0';
}
};
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com |
|
From: Zac N. <zn...@gm...> - 2005-08-20 15:23:43
|
Me too please, this is just cluttering up my inbox. I don't look at it=20 anymore. Thanks a lot, -Zac On 8/20/05, hauke laue <hau...@we...> wrote: >=20 > Hallo, > please unsubscribe me form the mailing list. >=20 > Regards Hauke Laue >=20 >=20 > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development Lifecycle=20 > Practices > Agile & Plan-Driven Development * Managing Projects & Teams * Testing & Q= A > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |
|
From: hauke l. <hau...@we...> - 2005-08-20 14:19:17
|
Hallo, please unsubscribe me form the mailing list. Regards Hauke Laue |
|
From: rohit b. <rv...@gm...> - 2005-08-20 13:10:32
|
Regarding my earlier mail, prototyping the function solved the problem. But then, why was is not necessary to prototype the overloaded >> and << operators? They were friend functions too. -- Rohit V. Bhute http://rvbhute.blogspot.com/ |
|
From: Petchesi G. <ga...@pr...> - 2005-08-20 09:24:21
|
On Fri, 2005-08-19 at 20:06, Peter Pravda wrote: > Hi > > This piece of code works in Dev-C++: > > int a[10],b[10]; > a=b; /* array to array assignment */ > > Why does it work? I experimented a little bit and found out, that it really copies one array to > another. I think ANSI C forbids this. And it doesn't work with other compilers I tried (MS VC++, > Borland C++ for DOS). > I was googling some our, but found nothing about this feature. > Any explanation? ===== It works as expected here, I was not able to compile the code with 4.9.9.2. gabriel > Thx > Peter |
|
From: rohit b. <rv...@gm...> - 2005-08-20 09:10:24
|
My class is as follows.
-----------------------------------
class complex{
private:
double real, imag;
public:
complex ();
complex (double r, double i);
complex (const complex& a);
void in (double r, double i);
void in (complex& a);
friend istream& operator>> (istream& s,
complex& c);
friend ostream& operator<< (ostream& s,
complex& c);
complex operator+ (complex& a);
complex operator- (complex& a);
complex operator* (complex& a);
friend complex operator* (double a, complex& b);
complex operator/ (complex& a);
complex operator~ ();
complex operator^ (int b);
double get_real();
double get_imag();
double mod();
double arg();
};
--------------------------------
I've used 3 friend functions. The istream and ostream
functions are visible in the class browser but the "friend
complex operator* (double a, complex& b)" function is not
visible. It works perfectly but experience has shown that if
its not seen in the browser, there's something wrong
somewhere. The implementation of this function is as follows.
----------------------------------
complex operator* (double a, complex& b)
{
complex temp;
temp.real=a*b.real;
temp.imag=a*b.imag;
return temp;
}
-------------------------------------
Any faults that I've missed?
TIA.
--
Rohit V. Bhute
http://rvbhute.blogspot.com/
|
|
From: Noorez K. <lor...@ho...> - 2005-08-19 22:56:33
|
For my taskbar, I am having some trouble receiving the mouse events. I did some testing and I found that I was receiving the correct message set in the NOTIFYICONDATA struct, the correct icon identifier in the wParam, but the mouse event which should be in the lParam is always 0. What could be wrong? _________________________________________________________________ Take charge with a pop-up guard built on patented Microsoft® SmartScreen Technology. http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines Start enjoying all the benefits of MSN® Premium right now and get the first two months FREE*. |
|
From: lordSauron <lor...@gm...> - 2005-08-19 19:57:53
|
On 8/18/05, LETCHUMANAN SAMINADAN <arl...@ya...> wrote:
> Dear all,=20
> =20
> I'm designing a program by using Dev C++ under MS Windows XP Pro. Current=
ly
> I'm using MS Exel Pro 2003 to save my data.....=20
Yay. What's it supposed to do?
I really can't answer anything unless I know what the heck you're
telling me you're trying to do, furthermore, reading an xls is really
difficult. I'd suggest getting an API or something to help you there.
Talk to the guys on the PHP groups - they've had that problem a lot,
and they're really good (usually) and I don't remember them ever
finding a solution, but since they shut up about it after about a week
something tells me that they more or less find a solution. Though I
would reccommend requireing the input to be something more readable,
like XML, which is at least understandable by humans (with IQs over 98
;)
=20
> The source code I'm using for this application is:-=20
> =20
> sp =3D fopen("utility.xls","a+");
> =20
> fprintf(sp,"DATE \t MACHINE \t MACHINE HRS \t PT. NUM \t EMP.NAME\n"); =
=20
> =20
> fclose(sp);
> =20
> When I view the data. The data has been saved in "Text(Tab delimited)" un=
der
> Save as type. But I would like the data to be saved in "Microsoft Office
> Exel Workbook".
So... you want to save this info into a Microsoft Excel workbook? I
still don't quite understand.
=20
> Kindly need your help. Please send me the source code for this applicatio=
n.=20
> Do you Yahoo!?
No.
> New and Improved Yahoo! Mail - 1GB free storage!
gmail lookalike, no doubt... just admit it, gmail's better!
I know I just mocked a email signature, but it was so fun you'll have
to excuse my avid cynicysm. I hope you find a solution to your
problem!
|
|
From: Peter P. <pet...@ya...> - 2005-08-19 17:06:31
|
Hi This piece of code works in Dev-C++: int a[10],b[10]; a=b; /* array to array assignment */ Why does it work? I experimented a little bit and found out, that it really copies one array to another. I think ANSI C forbids this. And it doesn't work with other compilers I tried (MS VC++, Borland C++ for DOS). I was googling some our, but found nothing about this feature. Any explanation? Thx Peter __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |
|
From: Per W. <pw...@ia...> - 2005-08-19 16:12:46
|
It seems like you have a symbol hh defined as '\', resulting in 'hh.exe' being rewritten as '\.exe'. /Per W On Fri, 19 Aug 2005, Jimmy Lao wrote: > I have a project named "hh" in "E:\MyApp\hh\" with all default settings. > A month ago, it worked well. Now it doesn't work. > > When I compile it in Dev-Cpp, it doesn't create executable file "hh.exe" > in the project directory, while a month ago it did. However, it creates > an executable file named ".exe" in "E:\". Because of that, using "Compile > and run" or "debug" in Dev-Cpp always have a message box said "Project is > not compiled". > > If I execute > make -f Makefile.win all > in the command line, the result is still "E:\.exe". > > If I change > $(CC) $(LINKOBJ) -o "hh.exe" $(LIBS) > in the auto-generated "Makefile.win" to > $(CC) $(LINKOBJ) -o hh.exe $(LIBS) > I have "E:\MyApp\hh\hh.exe", through "make" or Dev-Cpp compilation. > > However, > gcc.exe main.o -o "hh.exe" > and > gcc.exe main.o -o hh.exe > both generate "E:\MyApp\hh\hh.exe". > > I have uninstalled Dev-Cpp and installed it again. The same thing happens. > My Dev-Cpp version is 4.9.9.0. > > I guess there's something to do with the environment variables or Windows > patches, but just guess. > > Would anybody help me? Thanks. |
|
From: Jimmy L. <jm...@ho...> - 2005-08-19 13:27:27
|
I have a project named "hh" in "E:\MyApp\hh\" with all default settings.
A month ago, it worked well. Now it doesn't work.
When I compile it in Dev-Cpp, it doesn't create executable file "hh.exe"
in the project directory, while a month ago it did. However, it creates
an executable file named ".exe" in "E:\". Because of that, using "Compile
and run" or "debug" in Dev-Cpp always have a message box said "Project is
not compiled".
If I execute
make -f Makefile.win all
in the command line, the result is still "E:\.exe".
If I change
$(CC) $(LINKOBJ) -o "hh.exe" $(LIBS)
in the auto-generated "Makefile.win" to
$(CC) $(LINKOBJ) -o hh.exe $(LIBS)
I have "E:\MyApp\hh\hh.exe", through "make" or Dev-Cpp compilation.
However,
gcc.exe main.o -o "hh.exe"
and
gcc.exe main.o -o hh.exe
both generate "E:\MyApp\hh\hh.exe".
I have uninstalled Dev-Cpp and installed it again. The same thing happens.
My Dev-Cpp version is 4.9.9.0.
I guess there's something to do with the environment variables or Windows
patches, but just guess.
Would anybody help me? Thanks.
_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar - get it now!
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
|
|
From: Noorez K. <lor...@ho...> - 2005-08-19 04:32:58
|
void TaskBarHandler(HWND main, WPARAM wParam, LPARAM lParam)
{
HMENU popupMenu, subMenu;
POINT curPos;
popupMenu = CreatePopupMenu();
AppendMenu(popupMenu, MF_STRING , (UINT)ID_TASKBAR_SHOW, "Show Window");
AppendMenu(popupMenu, MF_STRING, (UINT)ID_TASKBAR_HIDE, "Hide Window");
AppendMenu(popupMenu, MF_STRING, (UINT)ID_TASKBAR_EXIT, "Exit");
if(!popupMenu) cout << "INvalid HMENU!";
UINT uID = (UINT)wParam;
// Determine what the message was
switch(uID)
{
case TASKBAR_ICON: // Task bar icon
switch( LOWORD(lParam) )
{
case WM_RBUTTONUP: // Display the popup menu
GetCursorPos(&curPos);
TrackPopupMenuEx( popupMenu,TPM_RIGHTALIGN,curPos.x,curPos.y,main,
NULL );
break;
case WM_LBUTTONDBLCLK: // Do defalut menu item action and show
window
{
ShowWindow(main,SW_RESTORE);
SetFocus( GetDlgItem(main, IDC_MAIN_EDIT) );
}
break;
}
break;
}
}
This function is supposed to receive events from the icon in the task bar.
But it only reads the case TASKBAR_ICON, it never reads the two mouse
events, even if i click like crazy!
_________________________________________________________________
Scan and help eliminate destructive viruses from your inbound and outbound
e-mail and attachments.
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines
Start enjoying all the benefits of MSN® Premium right now and get the
first two months FREE*.
|
|
From: LETCHUMANAN S. <arl...@ya...> - 2005-08-19 03:20:43
|
Dear all,
I'm designing a program by using Dev C++ under MS Windows XP Pro. Currently I'm using MS Exel Pro 2003 to save my data.....
The source code I'm using for this application is:-
sp = fopen("utility.xls","a+");
fprintf(sp,"DATE \t MACHINE \t MACHINE HRS \t PT. NUM \t EMP.NAME\n");
fclose(sp);
When I view the data. The data has been saved in "Text(Tab delimited)" under Save as type. But I would like the data to be saved in "Microsoft Office Exel Workbook".
Kindly need your help. Please send me the source code for this application.
Thank you,
Letchu....
---------------------------------
Do you Yahoo!?
New and Improved Yahoo! Mail - 1GB free storage! |
|
From: Markella K. <chr...@fr...> - 2005-08-18 21:25:08
|
I have to do it in this way for the school. Can I use DOS interrupts to solve this problem? Krisztian ps.: This <http://www.ana.sudani.co.uk/Programming/mouse.htm> solution would be great too. >Sorry, the MinGW compiler used by Dev-C++ can't do MS-DOS applications. It >generates 32-bit Windows applications (command line, graphical or >servies). > >The djgpp port of gcc can be used to write 32-bit extended MS-DOS >applications but thease are also using protected mode where the >application can't directly access the hardware. > >For using 16-bit assembler access of the hardware you shouold continue >with old TurboC or similar. > >By the way - why do you want to access the mouse using assembler? The >mouse is a slow input device, so there are no speed issues requiring >assembler instructions. Optimized assember can result in a smaller memory >footprint but the world have since quite some time moved away from the >640kB restrictions of MS-DOS and the mouse handling isn't directly a large >part of the memory requirements for a 32-bit application. > >/Per W > > > > |
|
From: morgan b. <mor...@ho...> - 2005-08-18 20:37:49
|
<html><div style='background-color:'><DIV class=RTE>hello</DIV> <DIV class=RTE>i'm using dev c++ and QT4 to create an interface and I need to use a dll that describe a COM object. It is to acquire image from a "dental X-ray machine". </DIV> <DIV class=RTE>I don't have any header. How is it possible to access and use functions provided by this DLL?</DIV> <DIV class=RTE>I'd like to access the getImage() function that would return something I can manipulate.</DIV> <DIV class=RTE>I found #import directive for visual C++ but nothing for dev c++.</DIV> <DIV class=RTE>Can anyone help me please?</DIV> <DIV class=RTE>I hope I'm understandable.</DIV> <DIV class=RTE>Thanks.</DIV> <DIV class=RTE>Morgan.</DIV></div></html> |
|
From: carrard <ca...@un...> - 2005-08-18 19:24:39
|
Hi! Does anyone have a C++ code (structured or OO) to a multiorder B-Tree? Thanks, Marcos |
|
From: Per W. <pw...@ia...> - 2005-08-18 18:53:51
|
Sorry, the MinGW compiler used by Dev-C++ can't do MS-DOS applications. It generates 32-bit Windows applications (command line, graphical or servies). The djgpp port of gcc can be used to write 32-bit extended MS-DOS applications but thease are also using protected mode where the application can't directly access the hardware. For using 16-bit assembler access of the hardware you shouold continue with old TurboC or similar. By the way - why do you want to access the mouse using assembler? The mouse is a slow input device, so there are no speed issues requiring assembler instructions. Optimized assember can result in a smaller memory footprint but the world have since quite some time moved away from the 640kB restrictions of MS-DOS and the mouse handling isn't directly a large part of the memory requirements for a 32-bit application. /Per W On Thu, 18 Aug 2005, Markella Krisztian wrote: > Hi, > I've a code that is work with TurboC3.11 but I can not port to DevC++. > I want to program the mouse in assembly. > The TurboC code is here > <http://web.axelero.hu/makihu/mouse/useMouseInTurboC.c>. > My try is here <http://web.axelero.hu/makihu/mouse/myTryInDevCpp.c> with > the DevC++. > Krisztian > > |
|
From: Per W. <pw...@ia...> - 2005-08-18 18:53:33
|
One thing to note about the use of a number of Windows structures. The xx.cbSize =3D sizeof(xx) code is used to tell the OS which version of the header files and hence which version of the structure that was used when compiling the application. This allows M$ to later add more fields to the end of the structure and Windows can then support extended behaviour for newer applications that knows about these extra fields. However, if M$ do add more fields and you recompile your code using the newer header files, the chSize field will be set to the correspondingly larger value. Your code will NOT supply any value to these new fields, since you only assign values to fields you know about. In short, a later recompilation of the application after upgrading the compiler environments may result in a badly failing application. To make sure that the cbSize versioning method works, you should _allways_ perform a: memset(&l_Class,0,sizeof(l_Class)); or - since this is a Windows application - do a: ZeroMemory(&l_Class,sizeof(l_Class)); M$ will always make sure that when they add new fields to the structures, the behaviour of the application is unchanged if all the new fields are zeroed. If one or more of them are not zero, Windows will assume that you know about them and have specifically initialized them in preparation to get the benefits of the extended behaviour. Once more - never use a cbSize-type of structure without zeroing the structure first. See it as a breach of contract between the application and the OS. /Per W On Wed, 17 Aug 2005, ZATTI Alessio Consultant wrote: > I think that you have problems when you call RegisterClassEx, right? What= 's the error code that return from GetLastError? > Try to modify your code like below: > > l_Class.hInstance =3D GetModuleHandle(NULL); > l_Class.cbSize =09 =3D sizeof( WNDCLASSEX ); > l_Class.style =3D CS_HREDRAW | CS_VREDRAW; > l_Class.lpszClassName =3D "WindowsApp"; > l_Class.lpfnWndProc =3D WindowProcedure; > l_Class.hbrBackground =3D (HBRUSH) COLOR_BACKGROUND; > l_Class.hCursor =3D NULL; > l_Class.hIcon =3D NULL; > l_Class.hIconSm =3D NULL; > l_Class.lpszMenuName =3D NULL; > l_Class.cbClsExtra =3D 0; > l_Class.cbWndExtra =3D 0; > > > Regards, Ale > > -----Messaggio originale----- > Da: dev...@li... > [mailto:dev...@li...]Per conto di Noorez > Kassam > Inviato: mercoled=EC 17 agosto 2005 5.47 > A: dev...@li... > Oggetto: [Dev-C++] Window Class Error > > > WNDCLASSEX l_Class; > l_Class.cbSize =3D sizeof( WNDCLASSEX ); > l_Class.style =3D 0; > l_Class.lpszClassName =3D "WindowsApp"; > l_Class.lpfnWndProc =3D WindowProcedure; > l_Class.hbrBackground =3D NULL; > l_Class.hCursor =3D NULL; > l_Class.hIcon =3D NULL; > l_Class.hIconSm =3D NULL; > l_Class.lpszMenuName =3D NULL; > l_Class.cbClsExtra =3D 0; > l_Class.cbWndExtra =3D 0; > > This is not working, what am I doing wrong? > > _________________________________________________________________ |
|
From: Daniel K. O. <dan...@ya...> - 2005-08-18 18:39:46
|
Markella Krisztian wrote: > I've a code that is work with TurboC3.11 but I can not port to DevC++. > I want to program the mouse in assembly. Welcome to the real world, where we use operating systems, and everything is done through system calls. To handle the mouse directly you'll have to either do some low-level communication (using the PS/2, serial, USB ports), talk to the driver (maybe a VXD that exposes the mouse data to user-level applications), etc. If you want to just handle the cursor of a pointing device, you can do it in serveral ways, depending on what libraries you chose. With the Win32 API you can use these functions: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/resources/cursors.asp Other libraries may give you higher levels of abstraction. --- Daniel K. O. _______________________________________________________ Yahoo! Acesso Grátis - Internet rápida e grátis. Instale o discador agora! http://br.acesso.yahoo.com/ |
|
From: Markella K. <chr...@fr...> - 2005-08-18 18:02:12
|
Hi, I've a code that is work with TurboC3.11 but I can not port to DevC++. I want to program the mouse in assembly. The TurboC code is here <http://web.axelero.hu/makihu/mouse/useMouseInTurboC.c>. My try is here <http://web.axelero.hu/makihu/mouse/myTryInDevCpp.c> with the DevC++. Krisztian |
|
From: Lord S. <lor...@gm...> - 2005-08-18 17:06:00
|
I didn't know they had a 4.9.8.0. Anyways, upgrade to 4.9.9.2 (free download, as always) and see if the problem persists. Really, upgrade to the most recent release, which I think is 4.9.9.2, but things happen so fast... |
|
From: Alfred P. R. <al...@ya...> - 2005-08-17 22:13:12
|
Hi,
I'm using wxwidgets with Dev-C++, so this may not apply to your specific implementation, but what I do is:
In the header file place:
#include <wx/gauge.h>
...
wxGauge *progressWxGauge;
...
Then after you declare the main frame or widget you would use something like:
...
progressWxGauge = new wxGauge(this, ID_PROGRESSWXGAUGE,100 ,wxPoint(6,239),wxSize(359,20) , wxGA_SMOOTH );
progressWxGauge->SetToolTip(wxT(_("Shows the progress of the application in the files.")));
progressWxGauge->SetRange(100);
progressWxGauge->SetValue(0);
Then you update the value with the SetValue method as necessary. Different libraries will have different syntax and paramaters depending on whether you are using wxWidgets, FLTK, GTK, or other GUI library.
DJK SKY WALKER <ic3...@ho...> wrote:
Hello I wanna know if someone can help me, I want to put a progressbar into a ListView, but I dont any Idea, I am using controls and trying to insert into another controls to please if someone know how do it, tell me ok.
Bytes!!!!
Alfred P. Reaud
|
|
From: DJK S. W. <ic3...@ho...> - 2005-08-17 18:03:22
|
<html><div style='background-color:'><DIV class=RTE><PRE>Hello I wanna know if someone can help me, I want to put a progressbar into a ListView, but I dont any Idea, I am using controls and trying to insert into another controls to please if someone know how do it, tell me ok.</PRE><PRE>Bytes!!!!</PRE><PRE><FONT face="Geneva, Arial, Sans-serif"></FONT> </PRE></DIV></div><br clear=all><hr>Las mejores tiendas, los precios mas bajos, entregas en todo el mundo, YupimMSN Compras: <a href="http://g.msn.com/8HMAES/2731??PS=47575" target="_top">Haz clic aquí</a> </html> |