dev-cpp-users Mailing List for Dev-C++ (Page 642)
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: Jason <tux...@au...> - 2001-12-04 05:45:08
|
This solution might be more complicated than what you need but there is a very good graphical library called Allegro. If you follow these instructions you shouldn't have a problem: http://www.allegro.cc/ubb-bin/ultimatebb.cgi?ubb=get_topic&f=10&t=000083 Here is allegros other "main" page: http://www.talula.demon.co.uk/allegro/ Then once you get it working, this place might help: http://www.mindlick.com/programming/tutorials/vivace/vivace.htm It is a good tutorial. bana ----- Original Message ----- From: "http//:angelfire.com/dc/85 Sale's" <bc...@ms...> To: <tux...@au...> Sent: Monday, December 03, 2001 2:27 PM Subject: Re: [Dev-C++] [Dev-C++]Pictures??HELP!! > just displaying a bitmap on the screen. > Thank You > > > >From: "Jason" <tux...@au...> > >To: <dev...@li...> > >Subject: Re: [Dev-C++] [Dev-C++]Pictures??HELP!! > >Date: Sun, 2 Dec 2001 20:48:21 -0600 > > > >What exactly do you mean? Do you mean like displaying a bitmap to the > >screen? Or are you talking about the icon for your .exe? > > > >bana > > > >----- Original Message ----- > >From: "http//:angelfire.com/dc/85 Sale's" <bc...@ms...> > >To: <dev...@li...> > >Sent: Sunday, December 02, 2001 7:03 PM > >Subject: [Dev-C++] [Dev-C++]Pictures??HELP!! > > > > > > > Hi, > > > I need help with puttin pictures in a Program I'm making?Could you send > >me > > > an example.I went to winprog.com but that wound'nt work.Please help me! > > > Thank You in advance! > > > Please go to my website http://angelfire.com/dc/85 > > > http://geocities.com/bc8j > > > > > > > > > _________________________________________________________________ > > > Get your FREE download of MSN Explorer at > >http://explorer.msn.com/intl.asp > > > > > > > > > _______________________________________________ > > > Dev-cpp-users mailing list > > > Dev...@li... > > > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > > > >_______________________________________________ > >Dev-cpp-users mailing list > >Dev...@li... > >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > _________________________________________________________________ > Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp > |
|
From: freak901010 <fre...@ps...> - 2001-12-04 05:30:16
|
Thanks, but that site didn't really help. Thanks for trying though. Mike Shoup | Freak901010 | Fre...@ps... Julio Lajara wrote: > > http://www.gamedev.net has links to other websites and > tutorials on this; look for stuff on Win32. > > -----ORIGINAL MESSAGE------------------------------ > FROM: mike shoupDATE: 12/03/2001 12:48:39SUBJECT: > [Dev-C++] Windows apps? Hello. I just finished > learning the C programming language from a book. The > book did not include any idea as to how to write > Windows programs, just the > little text based ones. I am curious as to if someone > could point me to a > good book or online tutorial that describes how to do > this. > > Thanks > > Mike S. | Freak901010 | <EMAIL: PROTECTED> > > _________________________________________________________________ > Get your FREE download of MSN Explorer at > http://explorer.msn.com/intl.asp > > _______________________________________________ > Dev-cpp-users mailing list > <EMAIL: PROTECTED> > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > > ===== > Julio > > __________________________________________________ > Do You Yahoo!? > Buy the perfect holiday gifts at Yahoo! Shopping. > http://shopping.yahoo.com > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
|
From: graeme <gr...@dr...> - 2001-12-04 02:50:18
|
When you created the project did you select console? If you select a windows project then you will get the effect that you had described. Graeme. Julio Lajara wrote... > I did include stdlib.h. I recompiled and everything, > but it still had that weird problem... |
|
From: Julio L. <ju2...@ya...> - 2001-12-03 22:33:03
|
Does anyone know why the following code for writing
class data to a file does not work? Is there something
wrong with the way the book wrote the code???
-Book example prog for writing/reading from binary
file
-------------------------------------------------------
#include <fstream.h>
#include <stdlib.h>
class Animal
{
public:
Animal(int weight, long
days):itsWeight(weight),itsNumberDaysAlive(days){}
~Animal(){}
int GetWeight()const { return itsWeight; }
void SetWeight(int weight) { itsWeight = weight; }
long GetDaysAlive()const { return
itsNumberDaysAlive; }
void SetDaysAlive(long days) { itsNumberDaysAlive =
days; }
private:
int itsWeight;
long itsNumberDaysAlive;
};
int main(int argc, char *argv[]) // returns 1 on
error
{
if (argc != 2)
{
cout << "Usage: " << argv[0] << " <filename>" <<
endl;
return(1);
}
ofstream fout(argv[1],ios::binary);
if (!fout.good())
{
cout << "Unable to open " << argv[1] << " for
writing.\n";
return(1);
}
Animal Bear(50,100);
fout.write((char *)&Bear,sizeof(Bear));
fout.close();
ifstream fin(argv[1],ios::binary);
if (!fin.good())
{
cout << "Unable to open " << argv[1] << " for
reading.\n";
return(1);
}
Animal BearTwo(1,1);
cout << "BearTwo weight: " << BearTwo.GetWeight() <<
endl;
cout << "BearTwo days: " << BearTwo.GetDaysAlive() <<
endl;
fin.read((char *)&BearTwo, sizeof(BearTwo));
cout << "BearTwo weight: " << BearTwo.GetWeight() <<
endl;
cout << "BearTwo days: " << BearTwo.GetDaysAlive() <<
endl;
fin.close();
system("PAUSE");
return 0;
}
------------------------------------------------------
I would appreciate any help, I would like to get this
working so I can use it in one of my programs....
=====
Julio
__________________________________________________
Do You Yahoo!?
Buy the perfect holiday gifts at Yahoo! Shopping.
http://shopping.yahoo.com
|
|
From: Julio L. <ju2...@ya...> - 2001-12-03 22:29:02
|
http://www.gamedev.net has links to other websites and tutorials on this; look for stuff on Win32. -----ORIGINAL MESSAGE------------------------------ FROM: mike shoupDATE: 12/03/2001 12:48:39SUBJECT: [Dev-C++] Windows apps? Hello. I just finished learning the C programming language from a book. The book did not include any idea as to how to write Windows programs, just the little text based ones. I am curious as to if someone could point me to a good book or online tutorial that describes how to do this. Thanks Mike S. | Freak901010 | <EMAIL: PROTECTED> _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp _______________________________________________ Dev-cpp-users mailing list <EMAIL: PROTECTED> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users ===== Julio __________________________________________________ Do You Yahoo!? Buy the perfect holiday gifts at Yahoo! Shopping. http://shopping.yahoo.com |
|
From: Charles <cha...@at...> - 2001-12-03 21:34:24
|
André -
> I'am having some trouble with the portable solution Charles sent in
previous message. It workeb fine until I included one more printf() line
before it, like the following example. I had to replace it with the
system(pause) line.
...
printf("x value is: %d\n",som);
printf("Press ENTER to continue...");
fflush(stdout);
getchar();
> Note that I use stdio.h instead of cstdio, is it because of that?
Probably not.
Comment out the first printf. Does the program work now? If it does, look
in the first printf statement for a problem. What errors are the compiler
or the linker giving you? Did you define som?
I tried this program:
#include <cstdio>
int main(int argc, char *argv[]){
int som=100;
printf("x value is: %d\n",som);
printf("Press ENTER to continue...");
fflush(stdout);
getchar();
return 0;
}
and received this output:
x value is: 100
Press ENTER to continue...
By the way, #include <stdio.h> also works.
Chuck
|
|
From: mike s. <fre...@ho...> - 2001-12-03 20:48:56
|
Hello. I just finished learning the C programming language from a book. The book did not include any idea as to how to write Windows programs, just the little text based ones. I am curious as to if someone could point me to a good book or online tutorial that describes how to do this. Thanks Mike S. | Freak901010 | fre...@ps... _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp |
|
From: Ricardo R. <ri...@po...> - 2001-12-03 20:44:40
|
******************************************** Perhaps it is better if you replace the line: fflush(stdout); by fflush(stdin); good luck. **************************************** |
|
From: Mike M. <mc...@ms...> - 2001-12-03 14:50:57
|
I hate to be a neusance, but does anyone understand why this might be happening ? Is it possibly a bug, or am I using it incorrectly ? Mike >From: "Mike McCue" <mc...@ms...> >To: dev...@li... >Subject: [Dev-C++] not passing linking options when compiling dll ? >Date: Fri, 30 Nov 2001 12:19:41 -0500 > >I have finally accomplished compiling a dll and a project that uses it, >thanks to those that helped! > >My only problem now is that I cannot use iostream's cout within the DLL, I >get undefined reference errors... I've been working on this in the mingw >mailing list, and came across an interesting discovery today... > >I'm trying to include the libstdc++.a library into the dll project, but its >not getting passed on the command line at link time. Here is the compile >and Link command lines : > >---------- >Compiling files : >C:\OPENGL\DEV-C_~1\BIN\gcc -c -DBUILDING_DLL=1 -I. "c:\opengl\using a >dll\printdll\print.cpp" -s -mwindows -IC:\OPENGL\DEV-C_~1\INCLUDE\ >-IC:\OPENGL\DEV-C_~1\INCLUDE\G__~1 -IC:\OPENGL\DEV-C_~1\INCLUDE\ >-LC:\OPENGL\DEV-C_~1\LIB\ -BC:\OPENGL\DEV-C_~1\BIN\ >Linking files : >C:\OPENGL\DEV-C_~1\BIN\dllwrap --export-all --output-def >C:\OPENGL\USINGA~1\PRINTDLL\dll.def --implib >"C:\OPENGL\USINGA~1\PRINTDLL\libPrintdll.a" -o >c:\opengl\usinga~1\printdll\Printdll.dll "c:\opengl\using a >dll\printdll\print.o" >---------- > >If, in project options, I uncheck the box that says "Create a DLL" then I >will see "-lstdc++" on the link command line, but not if the "Create a DLL" >option is checked. Is this a bug within Dev-C++ ? I tried running the >linking command, with all the options, from a dos window but the command is >too long. > >Thanks for any help, >Mike > > >_________________________________________________________________ >Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp > > >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp |
|
From: <ad...@Ho...> - 2001-12-03 07:46:44
|
Hi!
I'm new with the C language programming.
I'am having some trouble with the portable solution Charles sent in
previous message. It workeb fine until I included one more printf() line
before it, like the following example. I had to replace it with the
system(pause) line.
...
printf("x value is: %d\n",som);
printf("Press ENTER to continue...");
fflush(stdout);
getchar();
Note that I use stdio.h instead of cstdio, is it because of that?
--
Andr=E9 Duc-Taffe ad...@ho...
:::::::::::::::::::::::::::::::::::::::::::::::::
http://www.lescastro.fr.st
http://www.exempligratia.net
|
|
From: Jason <tux...@au...> - 2001-12-03 02:47:32
|
What exactly do you mean? Do you mean like displaying a bitmap to the screen? Or are you talking about the icon for your .exe? bana ----- Original Message ----- From: "http//:angelfire.com/dc/85 Sale's" <bc...@ms...> To: <dev...@li...> Sent: Sunday, December 02, 2001 7:03 PM Subject: [Dev-C++] [Dev-C++]Pictures??HELP!! > Hi, > I need help with puttin pictures in a Program I'm making?Could you send me > an example.I went to winprog.com but that wound'nt work.Please help me! > Thank You in advance! > Please go to my website http://angelfire.com/dc/85 > http://geocities.com/bc8j > > > _________________________________________________________________ > Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp > > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
|
From: http//:angelfire.com/dc/85 Sale's <bc...@ms...> - 2001-12-03 01:14:48
|
Hi, I need help with puttin pictures in a Program I'm making?Could you send me an example.I went to winprog.com but that wound'nt work.Please help me! Thank You in advance! Please go to my website http://angelfire.com/dc/85 http://geocities.com/bc8j _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp |
|
From: Julio L. <ju2...@ya...> - 2001-12-02 23:25:14
|
I did include stdlib.h. I recompiled and everything, but it still had that weird problem... -----ORIGINAL MESSAGE----------------------- Message: 6 From: "Ioannis Vranos" <no...@ya...> To: "Dev-C++" <dev...@li...> Subject: RE: [Dev-C++] RE: Run Problem Date: Sun, 2 Dec 2001 09:48:36 +0200 You probably forgot to #include <stdlib.h>. Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.f2s.com * Alternative URL: http://run.to/noicys > -----Original Message----- > From: dev...@li... > [mailto:dev...@li...] On Behalf > Of Julio Lajara > Sent: Sunday, December 02, 2001 7:17 AM > To: dev...@li... > Subject: [Dev-C++] RE: Run Problem > > > I don't know what kind of problems you guys are having > with system("PAUSE"); but I just had a problem with it > today for the first time, and I have used > system("PAUSE"); many times before without a problem. > It was weird because even when I put a > system("PAUSE"); it would not output "Please press any > key to continue..." and it would only slow down for > like 4 seconds and continue the program as if I had > never put in a system("PAUSE"); . I realized that this > only happens if you execute your program by pressing > the Execute button in Dev-C++, but not when you > manually find the folder it is in and execute it by > double clicking it... might be a problem with Dev-C++ > but not sure. > > ===== > Julio > > __________________________________________________ > Do You Yahoo!? > Buy the perfect holiday gifts at Yahoo! Shopping. > http://shopping.yahoo.com ===== Julio __________________________________________________ Do You Yahoo!? Buy the perfect holiday gifts at Yahoo! Shopping. http://shopping.yahoo.com |
|
From: Ioannis V. <no...@ya...> - 2001-12-02 07:48:03
|
You probably forgot to #include <stdlib.h>. Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.f2s.com * Alternative URL: http://run.to/noicys > -----Original Message----- > From: dev...@li... > [mailto:dev...@li...] On Behalf > Of Julio Lajara > Sent: Sunday, December 02, 2001 7:17 AM > To: dev...@li... > Subject: [Dev-C++] RE: Run Problem > > > I don't know what kind of problems you guys are having > with system("PAUSE"); but I just had a problem with it > today for the first time, and I have used > system("PAUSE"); many times before without a problem. > It was weird because even when I put a > system("PAUSE"); it would not output "Please press any > key to continue..." and it would only slow down for > like 4 seconds and continue the program as if I had > never put in a system("PAUSE"); . I realized that this > only happens if you execute your program by pressing > the Execute button in Dev-C++, but not when you > manually find the folder it is in and execute it by > double clicking it... might be a problem with Dev-C++ > but not sure. > > ===== > Julio > > __________________________________________________ > Do You Yahoo!? > Buy the perfect holiday gifts at Yahoo! Shopping. > http://shopping.yahoo.com > > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |
|
From: Julio L. <ju2...@ya...> - 2001-12-02 05:16:38
|
I don't know what kind of problems you guys are having
with system("PAUSE"); but I just had a problem with it
today for the first time, and I have used
system("PAUSE"); many times before without a problem.
It was weird because even when I put a
system("PAUSE"); it would not output "Please press any
key to continue..." and it would only slow down for
like 4 seconds and continue the program as if I had
never put in a system("PAUSE"); . I realized that this
only happens if you execute your program by pressing
the Execute button in Dev-C++, but not when you
manually find the folder it is in and execute it by
double clicking it... might be a problem with Dev-C++
but not sure.
=====
Julio
__________________________________________________
Do You Yahoo!?
Buy the perfect holiday gifts at Yahoo! Shopping.
http://shopping.yahoo.com
|
|
From: Jason H. <jas...@bt...> - 2001-12-01 22:51:35
|
I only used it because it because it's quick, simple and gets the job done
with only one line of code. In other words I'm lazy. I agree it's not
portable, although it should work with your average Dev-C++ installation. In
most cases portability isn't an issue as I think most people use it only for
test programs.
Jason.
----- Original Message -----
From: "Charles" <cha...@at...>
To: "christiaan scholtz" <ck...@ia...>;
<dev...@li...>
Sent: Saturday, December 01, 2001 7:03 PM
Subject: Re: [Dev-C++] Run Problem
> Christiaan -
>
> > whats wrong with pause?
> >
> > > Note that Jason's solution,
> > > > If you add #include <cstdlib> at the top and the line:
system("PAUSE")
> > > is system-specific and therefore not portable.
> > >
> > > It is better to do this:
> > >
> > > #include <cstdio>
> > >
> > > printf("Press ENTER to continue");
> > > fflush(stdout);
> > > getchar();
>
> When I say that it is not portable I mean that "pause" will not work on
all
> systems. I found this out recently because I have used it too. I made
some
> changes to my computer (installed Windows 98SE, switched to the Cygwin
> compiler etc.). Now system("pause") will not work for me.
>
> Code portability is a good thing.
>
> Chuck
>
>
>
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
|
|
From: dx F. <vin...@ed...> - 2001-12-01 22:51:06
|
Does anyone know what is wrong here? Anyone knows where I can asks these questions?
Ok. now Ive done it... but still am getting a zero count on application windows. Anybody knows what Im doing wrong? the following is a test code. Note that the code wasnt optimized for speed for it still is a test.
#include <string>
#include <windows.h>
#include <iostream.h>
BOOL IsAPPWINDOW(HWND);
BOOL IsVISIBLE(HWND);
int i = 0;
BOOL CALLBACK AppGetWindows(HWND hwnd, LPARAM lParam) {
if (IsAPPWINDOW(hwnd)) {
// APPWINDOW...
cin >> str2;
if (IsVISIBLE(hwnd)) {
// VISIBLE. Adding...
i = i + 1;
}
}
return true;
}
BOOL IsAPPWINDOW(HWND hwnd) {
if ((GetWindowLong(hwnd,GWL_EXSTYLE) & WS_EX_APPWINDOW)==WS_EX_APPWINDOW) {
// the window referenced by the handle has a WS_EX_APPWINDOW style
return true;
} else {
// no it doesnt
return false;
}
}
BOOL IsVISIBLE(HWND hwnd) {
if ((GetWindowLong(hwnd,GWL_STYLE) & WS_VISIBLE)==WS_VISIBLE) {
// the window referenced by the handle has a WS_VISIBLE style
return true;
} else {
// no it doesnt
return false;
}
}
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int cmdShow) {
if (EnumWindows(*AppGetWindows, 0)) {
// print out the number of windows
cout << i;
} else {
cout << "EnumWindows Failed!";
}
string str;
cin >> str;
}
The program is suposed to detect the current windows with the WS_VISIBLE and WS_EX_APPWINDOW styles and then count them. The output is the number of windows that met the criteria. As one of you all said... the windows taskbar only enumerates windows with the afformentioned styles. Take note that the code is not yet optimized for it is still a test code. Any help on optimizing the code would be a great help.
Back to the problem... Did I do something wrong again??? I have other applications running and it is supposed to output the number of the windows available in the taskbar. Anybody! Help!
__________________________________
www.edsamail.com
|
|
From: Kevin W. <ke...@me...> - 2001-12-01 20:21:38
|
I don't think you are doing anything wrong. I have spent a few hours
experimenting with this and think that the problem is that most applications
don't set the WS_EX_APPWINDOW
extended style. Look at the Dev C++ template file - the parameter is set to
zero. If you set this parameter in your program code then print a list of
windows with that style, (using the code you have written) your program will
be listed.
Perhaps you could test the other styles and reject windows with the
WS_CHILD and WS_POPUP styles. However, this still leaves quite a few windows
that you can't switch to. Note that testing for the visible style leaves out
windows that are minimised to the task bar.
There must be another way!
Kev.
----- Original Message -----
From: dx FX <vin...@ed...>
To: Dev-C++ mailing list <dev...@li...>
Sent: Saturday, December 01, 2001 4:08 AM
Subject: [Dev-C++] Re: Re: Re: Win32 shell programming
> Ok. now Ive done it... but still am getting a zero count on application
windows. Anybody knows what Im doing wrong? the following is a test code.
Note that the code wasnt optimized for speed for it still is a test.
>
> #include <string>
> #include <windows.h>
> #include <iostream.h>
>
> BOOL IsAPPWINDOW(HWND);
> BOOL IsVISIBLE(HWND);
> int i = 0;
>
> BOOL CALLBACK AppGetWindows(HWND hwnd, LPARAM lParam) {
> if (IsAPPWINDOW(hwnd)) {
> // APPWINDOW...
> cin >> str2;
> if (IsVISIBLE(hwnd)) {
> // VISIBLE. Adding...
> i = i + 1;
> }
> }
> return true;
> }
>
> BOOL IsAPPWINDOW(HWND hwnd) {
> if ((GetWindowLong(hwnd,GWL_EXSTYLE) &
WS_EX_APPWINDOW)==WS_EX_APPWINDOW) {
> // the window referenced by the handle has a WS_EX_APPWINDOW style
> return true;
> } else {
> // no it doesnt
> return false;
> }
> }
>
> BOOL IsVISIBLE(HWND hwnd) {
> if ((GetWindowLong(hwnd,GWL_STYLE) & WS_VISIBLE)==WS_VISIBLE) {
> // the window referenced by the handle has a WS_VISIBLE style
> return true;
> } else {
> // no it doesnt
> return false;
> }
> }
>
> int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR
lpCmdLine, int cmdShow) {
> if (EnumWindows(*AppGetWindows, 0)) {
> // print out the number of windows
> cout << i;
> } else {
> cout << "EnumWindows Failed!";
> }
> string str;
> cin >> str;
> }
>
>
> The program is suposed to detect the current windows with the WS_VISIBLE
and WS_EX_APPWINDOW styles and then count them. The output is the number of
windows that met the criteria. As one of you all said... the windows taskbar
only enumerates windows with the afformentioned styles. Take note that the
code is not yet optimized for it is still a test code. Any help on
optimizing the code would be a great help.
>
> Back to the problem... Did I do something wrong again??? I have other
applications running and it is supposed to output the number of the windows
available in the taskbar. Anybody! Help!
>
>
> __________________________________
> www.edsamail.com
>
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|
|
From: http//:angelfire.com/dc/85 Sale's <bc...@ms...> - 2001-12-01 20:18:06
|
How do I make a .exe load,when my program loads?Allso how do I put a picture in my program? Thanks in advance. Please check out my website. http://angelfire.com/dc/85 _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp |
|
From: Charles <cha...@at...> - 2001-12-01 19:11:18
|
Christiaan -
> whats wrong with pause?
>
> > Note that Jason's solution,
> > > If you add #include <cstdlib> at the top and the line: system("PAUSE")
> > is system-specific and therefore not portable.
> >
> > It is better to do this:
> >
> > #include <cstdio>
> >
> > printf("Press ENTER to continue");
> > fflush(stdout);
> > getchar();
When I say that it is not portable I mean that "pause" will not work on all
systems. I found this out recently because I have used it too. I made some
changes to my computer (installed Windows 98SE, switched to the Cygwin
compiler etc.). Now system("pause") will not work for me.
Code portability is a good thing.
Chuck
|
|
From: Green, A. <JA...@GA...> - 2001-12-01 19:06:34
|
Is there an option so that my cursor automaticly sets at the tab position it should be in, no matter where I click on the line? Right now, when I click to start a new line, it sets the cursor where my mouse is. In other IDE's, the cursor will set where the beginning of your last line was. |
|
From: Ioannis V. <no...@ya...> - 2001-12-01 17:32:32
|
memset() and free() are defined in string.h the first, and stdlib.h the second Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.f2s.com * Alternative URL: http://run.to/noicys > -----Original Message----- > From: dev...@li... > [mailto:dev...@li...] On Behalf > Of Julio Lajara > Sent: Friday, November 30, 2001 9:22 PM > To: dev...@li... > Subject: [Dev-C++] MSVC++ function library... > > > is memset and free defined in a special MSVC++ header > file? I have a glut program made for MSVC++ and am > having a hard time using it on Dev-C++ because those > functions are not defined. Does anyone know if there > is a website that has the header file I need? > > ===== > Julio > > __________________________________________________ > Do You Yahoo!? > Yahoo! GeoCities - quick and easy web site hosting, just > $8.95/month. http://geocities.yahoo.com/ps/info1 > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |
|
From: christiaan s. <ck...@ia...> - 2001-12-01 14:04:42
|
It can be very difficult. A 3d engine is what handles all the 3d math involved in showing a 3d object on a 2d screen. It handles perspective, shading ect. ----- Original Message ----- From: "Max Palitza" <Max...@we...> To: "Dev-C++" <dev...@li...> Sent: Saturday, December 01, 2001 1:37 PM Subject: [Dev-C++] What exactly is a 3D engine? Hi guys! I've got a question some of you might laugh about. What exactly is a 3d engine? I always see people's pages presenting their 3d engines and think, it cant be so difficult. So what is it? I suppose it's a collection of often used commands tied up to make jobs often appearing in 3d projects quicker to handle (like tying together all the commands for a wall). Can somebody tell me what "in" a 3d engine is? cu Max ____________________________________________________ Berufsunfähigskeitversicherung von Mamax bei WEB.DE. Jetzt informieren! http://bu.web.de _______________________________________________ Dev-cpp-users mailing list Dev...@li... https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
|
From: christiaan s. <ck...@ia...> - 2001-12-01 13:22:46
|
whats wrong with pause?
----- Original Message -----
From: "Charles" <cha...@at...>
To: "Dev-C++" <dev...@li...>
Sent: Friday, November 30, 2001 1:27 AM
Subject: Re: [Dev-C++] Run Problem
> Jeff -
>
> > > I have installed Dev-C++, and have written a test program, the program
> compiles, but when running it, it only flashes quickly on the screen.
>
> Note that Jason's solution,
> > If you add #include <cstdlib> at the top and the line: system("PAUSE")
> is system-specific and therefore not portable.
>
> It is better to do this:
>
> #include <cstdio>
>
> printf("Press ENTER to continue");
> fflush(stdout);
> getchar();
>
>
> Chuck
>
>
>
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
|
|
From: christiaan s. <ck...@ia...> - 2001-12-01 13:22:40
|
just add #include <stdlib.h> i think its included by default in vc++ ----- Original Message ----- From: "Julio Lajara" <ju2...@ya...> To: <dev...@li...> Sent: Friday, November 30, 2001 9:22 PM Subject: [Dev-C++] MSVC++ function library... > is memset and free defined in a special MSVC++ header > file? I have a glut program made for MSVC++ and am > having a hard time using it on Dev-C++ because those > functions are not defined. Does anyone know if there > is a website that has the header file I need? > > ===== > Julio > > __________________________________________________ > Do You Yahoo!? > Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month. > http://geocities.yahoo.com/ps/info1 > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |