dev-cpp-users Mailing List for Dev-C++ (Page 93)
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: Noorez K. <lor...@ho...> - 2006-01-03 06:06:34
|
Is there a way to prevent an HWND window from being resized? _________________________________________________________________ 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: Benjamin S. <B.S...@ar...> - 2006-01-02 23:16:28
|
Hi, i tried searching for it in the mailing, and there were many results but i couldnt find clear answer for my question. In the help file fer dev-cpp 4.9.9.2 a Resource Editor is mentioned(Step 6 i think) but i am unable to find it. Is it a bug at my side or isnt it there yet(or ever). Benjamin |
|
From: Francis B. <fb...@fr...> - 2006-01-02 19:33:12
|
Hi, How can I create a bundle my wxWidget application developped with Dev-C++ and wxWidgets Devpak, to install it on a Windows box? I'm a Windows newbie ;) and I don't know how to start my software out of Dev-C++ context and install my software on an other computer. Thanks Francis |
|
From: Tracid <tr...@za...> - 2006-01-02 14:05:02
|
Hello.
I've got a little problem. If I use the fdopen function, and then I use
fgets, the compiled program crashes*.
Example:
#include <stdio.h>
#include <winsock.h>
#include <windows.h>
#pragma comment (lib, "ws2_32")
int main(int argc, char *argv[])
{
WSADATA wsaData;
if (WSAStartup (MAKEWORD(1, 1), &wsaData) != 0) {
printf ("[-] WSAStartup failed.\n");
return (1);
}
int sockfd;
char buf[1024];
FILE *in;
/* some stuff here, connection to server is successfull */
in = fdopen (sockfd, "r"); /* in
while (fgets(buf, sizeof(buf), in) != NULL) { /* and here the
compiled program crashes* */
/* some other stuff */
------------------
Using cygwin, it works well.
*Crashes = Windows error reporting window appears, and program ends
suddenly.
Is this problem caused by Dev-Cpp or the Windows sockets?
Thank you.
PS: I admit that I am quite a newbie at C programming, but I've tried a
lot of different variations for this, but it still crashes....
|
|
From: Per W. <pw...@ia...> - 2006-01-02 00:53:56
|
No, I don't have the time to read through the code to look for errors -
it's about 2 am local time...
However, don't you think that you should describe your problem a little
bit more than: "There is a bug while trying to resize though."
When asking for help: Always describe what happens and what you expected
to happen.
/Per W
On Sun, 1 Jan 2006, Jason Benjamin wrote:
> Here is my best attempt at scrolling a bitmap. There
> is a bug while trying to resize though. Since a put
> this together from missing parts in about half an
> hour, that would make sense. Any ideas?
>
>
> //-------------------------------------------------------------
>
> #include <stdio.h>
> #include <string.h>
> #include <windows.h>
>
> /* Declare Windows procedure */
> LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM,
> LPARAM);
>
> /* Make the class name into a global variable */
> char szClassName[ ] = "WindowsApp";
>
> int w,h;
> HBITMAP bitmap;
> BITMAP bm;
> HDC hdc;
> HDC hdcmem;
> HINSTANCE hinst;
> PAINTSTRUCT ps;
> SCROLLINFO si;
>
> /* These variables are required by BitBlt.
> */
>
> static HDC hdcWin; /* window DC
> */
> static HDC hdcScreen; /* DC for entire screen
> */
> static HDC hdcScreenCompat; /* memory DC for screen
> */
> static HBITMAP hbmpCompat; /* bitmap handle for old
> DC */
> static BITMAP bmp; /* bitmap data structure
> */
> static BOOL fBlt; /* TRUE if BitBlt
> occurred */
>
> static BOOL fScroll; /* TRUE if scrolling
> occurred */
> static BOOL fSize; /* TRUE if fBlt & WM_SIZE
> */
>
> /* These variables are required for horizontal
> scrolling. */
>
> static int xMinScroll; /* minimum horizontal
> scroll value */
> static int xCurrentScroll; /* current horizontal
> scroll value */
> static int xMaxScroll; /* maximum horizontal
> scroll value */
>
> /* These variables are required for vertical
> scrolling. */
>
>
> static int yMinScroll; /* minimum vertical
> scroll value */
> static int yCurrentScroll; /* current vertical
> scroll value */
> static int yMaxScroll; /* maximum vertical
> scroll value */
>
>
> int WINAPI WinMain (HINSTANCE hThisInstance,
> HINSTANCE hPrevInstance,
> LPSTR lpszArgument,
> int nFunsterStil)
>
> {
> HWND hwnd; /* This is the handle for
> our window */
> MSG messages; /* Here messages to the
> application are saved */
> WNDCLASSEX wincl; /* Data structure for the
> windowclass */
>
>
> //replace with any bitmap
> bitmap = LoadImage(hinst, "C:\\atomic.bmp",
> IMAGE_BITMAP, 0,
> 0, LR_LOADFROMFILE);
> GetObject(bitmap, sizeof(bm), &bm);
>
>
> w = bm.bmWidth;
> h = bm.bmHeight;
>
> /* The Window structure */
> wincl.hInstance = hThisInstance;
> wincl.lpszClassName = szClassName;
> wincl.lpfnWndProc = WindowProcedure; /* This
> function is called by windows */
> wincl.style = CS_BYTEALIGNCLIENT;
> /* Catch double-clicks */
> wincl.cbSize = sizeof (WNDCLASSEX);
>
> /* Use default icon and mouse-pointer */
> wincl.hIcon = LoadIcon (NULL, IDI_APPLICATION);
> wincl.hIconSm = LoadIcon (NULL, IDI_APPLICATION);
> wincl.hCursor = LoadCursor (NULL, IDC_ARROW);
> wincl.lpszMenuName = NULL; /* No
> menu */
> wincl.cbClsExtra = 0; /* No
> extra bytes after the window class */
> wincl.cbWndExtra = 0; /*
> structure or the window instance */
> /* Use Windows's default color as the background
> of the window */
> wincl.hbrBackground = (HBRUSH) (COLOR_BTNFACE);
>
> /* Register the window class, and if it fails quit
> the program */
> if (!RegisterClassEx (&wincl))
> return 0;
>
> /* The class is registered, let's create the
> program*/
> hwnd = CreateWindowEx (
> WS_EX_TOPMOST, /*
> Extended possibilites for variation */
> szClassName, /* Classname */
> "Windows App", /* Title Text */
> WS_OVERLAPPEDWINDOW | WS_SYSMENU |
> WS_VSCROLL | WS_HSCROLL, /* default window */
> CW_USEDEFAULT, /* Windows decides the
> position */
> CW_USEDEFAULT, /* where the window
> ends up on the screen */
> w/2, /* The programs width
> */
> h/2, /* and height in
> pixels */
> NULL, /* The window is a
> child-window to desktop */
> NULL, /* No menu */
> hThisInstance, /* Program Instance
> handler */
> NULL /* No Window Creation
> data */
> );
>
> /* Make the window visible on the screen */
> ShowWindow (hwnd, nFunsterStil);
> /* Run the message loop. It will run until
> GetMessage() returns 0 */
> while (GetMessage (&messages, NULL, 0, 0))
> {
> /* Translate virtual-key messages into
> character messages */
> TranslateMessage(&messages);
> /* Send message to WindowProcedure */
> DispatchMessage(&messages);
>
>
> }
>
> /* The program return-value is 0 - The value that
> PostQuitMessage() gave */
> return messages.wParam;
>
> }
>
>
>
> /* This function is called by the Windows function
> DispatchMessage() */
>
> LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT
> message, WPARAM wParam, LPARAM lParam)
> {
> switch (message) /* handle the
> messages */
> {
> case WM_CREATE:
> hdc = BeginPaint(hwnd, &ps);
> hdcmem = CreateCompatibleDC(hdc);
> SelectObject(hdcmem, bitmap);
> EndPaint(hwnd, &ps);
> /* Initialize the flags. */
>
> fBlt = FALSE;
> fScroll = FALSE;
> fSize = FALSE;
>
> /* Initialize the horizontal scrolling
> variables. */
>
> xMinScroll = 0;
> xCurrentScroll = 0;
> xMaxScroll = 0;
>
> /* Initialize the vertical scrolling
> variables. */
>
> yMinScroll = 0;
> yCurrentScroll = 0;
> yMaxScroll = 0;
> break;
>
> case WM_PAINT:
> hdc = BeginPaint(hwnd, &ps);
> BitBlt(hdc, 0, 0, bm.bmWidth, bm.bmHeight, hdcmem,
> xCurrentScroll, yCurrentScroll, SRCCOPY);
> EndPaint(hwnd, &ps);
> break;
> case WM_SIZE: {
> int xNewSize;
> int yNewSize;
>
> xNewSize = LOWORD(lParam);
> yNewSize = HIWORD(lParam);
>
>
> if (fBlt)
> fSize = TRUE;
>
> /*
> * The horizontal scrolling range is defined
> by
> * (bitmap_width) - (client_width). The
> current horizontal
> * scroll value remains within the horizontal
> scrolling range.
> */
>
> xMaxScroll = max(bm.bmWidth-xNewSize, 0);
>
> xCurrentScroll = min(xCurrentScroll,
> xMaxScroll);
> si.cbSize = sizeof(si);
> si.fMask = SIF_RANGE | SIF_PAGE | SIF_POS;
> si.nMin = xMinScroll;
> si.nMax = bm.bmWidth;
> si.nPage = xNewSize;
> si.nPos = xCurrentScroll;
> SetScrollInfo(hwnd, SB_HORZ, &si, TRUE);
>
> /*
> * The vertical scrolling range is defined by
> * (bitmap_height) - (client_height). The
> current vertical
>
> * scroll value remains within the vertical
> scrolling range.
> */
>
> yMaxScroll = max(bm.bmHeight - yNewSize, 0);
> yCurrentScroll = min(yCurrentScroll,
> yMaxScroll);
> si.cbSize = sizeof(si);
> si.fMask = SIF_RANGE | SIF_PAGE | SIF_POS;
> si.nMin = yMinScroll;
> si.nMax = bm.bmHeight;
> si.nPage = yNewSize;
> si.nPos = yCurrentScroll;
> SetScrollInfo(hwnd, SB_VERT, &si, TRUE);
>
>
>
> UpdateWindow(hwnd);
>
>
> }
> break;
>
> case WM_HSCROLL: {
>
> int xDelta; /* xDelta = new_pos -
> current_pos */
> int xNewPos; /* new position */
> int yDelta = 0;
>
> switch (LOWORD(wParam)) {
>
> /* User clicked the shaft left of the
> scroll box. */
>
> case SB_PAGEUP:
> xNewPos = xCurrentScroll - 50;
>
> break;
>
> /* User clicked the shaft right of the
> scroll box. */
>
> case SB_PAGEDOWN:
> xNewPos = xCurrentScroll + 50;
> break;
>
> /* User clicked the left arrow. */
>
> case SB_LINEUP:
> xNewPos = xCurrentScroll - 5;
> break;
>
> /* User clicked the right arrow. */
>
> case SB_LINEDOWN:
> xNewPos = xCurrentScroll + 5;
>
> break;
>
> /* User dragged the scroll box. */
>
> case SB_THUMBPOSITION:
> xNewPos = HIWORD(wParam);
> break;
>
> default:
> xNewPos = xCurrentScroll;
> }
>
> /* New position must be between 0 and the
> screen width. */
>
> xNewPos = max(0, xNewPos);
> xNewPos = min(xMaxScroll, xNewPos);
>
> /* If the current position does not change, do
> not scroll.*/
>
>
> if (xNewPos == xCurrentScroll)
> break;
>
> /* Set the scroll flag to TRUE. */
>
> fScroll = TRUE;
>
> /* Determine the amount scrolled (in pixels).
> */
>
> xDelta = xNewPos - xCurrentScroll;
>
> /* Reset the current scroll position. */
>
> xCurrentScroll = xNewPos;
>
> /*
> * Scroll the window. (The system repaints
> most of the
> * client area when ScrollWindowEx is called;
> however, it is
>
> * necessary to call UpdateWindow in order to
> repaint the
> * rectangle of pixels that were invalidated.)
> */
>
> ScrollWindowEx(hwnd, -xDelta, -yDelta, (CONST
> RECT *) NULL,
> (CONST RECT *) NULL, (HRGN) NULL, (LPRECT)
> NULL,
> SW_INVALIDATE);
> UpdateWindow(hwnd);
>
> /* Reset the scroll bar. */
>
> si.cbSize = sizeof(si);
> si.fMask = SIF_POS;
> si.nPos = xCurrentScroll;
>
> SetScrollInfo(hwnd, SB_HORZ, &si, TRUE);
>
> }
> break;
>
> case WM_VSCROLL: {
>
> int xDelta = 0;
> int yDelta; /* yDelta = new_pos -
> current_pos */
> int yNewPos; /* new position */
>
> switch (LOWORD(wParam)) {
>
> /* User clicked the shaft above the scroll
> box. */
>
> case SB_PAGEUP:
> yNewPos = yCurrentScroll - 50;
> break;
>
> /* User clicked the shaft below the scroll
> box. */
>
>
> case SB_PAGEDOWN:
> yNewPos = yCurrentScroll + 50;
> break;
>
> /* User clicked the top arrow. */
>
> case SB_LINEUP:
> yNewPos = yCurrentScroll - 5;
> break;
>
> /* User clicked the bottom arrow. */
>
> case SB_LINEDOWN:
> yNewPos = yCurrentScroll + 5;
> break;
>
> /* User dragged the scroll box. */
>
>
> case SB_THUMBPOSITION:
> yNewPos = HIWORD(wParam);
> break;
>
> default:
> yNewPos = yCurrentScroll;
> }
>
> /* New position must be between 0 and the
> screen height. */
>
> yNewPos = max(0, yNewPos);
> yNewPos = min(yMaxScroll, yNewPos);
>
> /* If the current position does not change, do
> not scroll.*/
>
> if (yNewPos == yCurrentScroll)
> break;
>
>
> /* Set the scroll flag to TRUE. */
>
> fScroll = TRUE;
>
> /* Determine the amount scrolled (in pixels).
> */
>
> yDelta = yNewPos - yCurrentScroll;
>
> /* Reset the current scroll position. */
>
> yCurrentScroll = yNewPos;
>
> /*
> * Scroll the window. (The system repaints
> most of the
> * client area when ScrollWindowEx is called;
> however, it is
> * necessary to call UpdateWindow in order to
> repaint the
>
> * rectangle of pixels that were invalidated.)
> */
>
> ScrollWindowEx(hwnd, -xDelta, -yDelta, (CONST
> RECT *) NULL,
> (CONST RECT *) NULL, (HRGN) NULL, (LPRECT)
> NULL,
> SW_INVALIDATE);
> UpdateWindow(hwnd);
>
> /* Reset the scroll bar. */
>
> si.cbSize = sizeof(si);
> si.fMask = SIF_POS;
> si.nPos = yCurrentScroll;
> SetScrollInfo(hwnd, SB_VERT, &si, TRUE);
>
> }
> break;
> case WM_DESTROY:
> DeleteDC(hdc);
> KillTimer(hwnd, idTimer1);
> PostQuitMessage (0); /* send a
> WM_QUIT to the message queue */
> break;
> default: /* for messages
> that we don't deal with */
> return DefWindowProc (hwnd, message,
> wParam, lParam);
> }
>
> return 0;
> }
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> for problems? Stop! Download the new AJAX search engine that makes
> searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> _______________________________________________
> 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: Jason B. <red...@ya...> - 2006-01-01 21:52:37
|
Here is my best attempt at scrolling a bitmap. There
is a bug while trying to resize though. Since a put
this together from missing parts in about half an
hour, that would make sense. Any ideas?
//-------------------------------------------------------------
#include <stdio.h>
#include <string.h>
#include <windows.h>
/* Declare Windows procedure */
LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM,
LPARAM);
/* Make the class name into a global variable */
char szClassName[ ] = "WindowsApp";
int w,h;
HBITMAP bitmap;
BITMAP bm;
HDC hdc;
HDC hdcmem;
HINSTANCE hinst;
PAINTSTRUCT ps;
SCROLLINFO si;
/* These variables are required by BitBlt.
*/
static HDC hdcWin; /* window DC
*/
static HDC hdcScreen; /* DC for entire screen
*/
static HDC hdcScreenCompat; /* memory DC for screen
*/
static HBITMAP hbmpCompat; /* bitmap handle for old
DC */
static BITMAP bmp; /* bitmap data structure
*/
static BOOL fBlt; /* TRUE if BitBlt
occurred */
static BOOL fScroll; /* TRUE if scrolling
occurred */
static BOOL fSize; /* TRUE if fBlt & WM_SIZE
*/
/* These variables are required for horizontal
scrolling. */
static int xMinScroll; /* minimum horizontal
scroll value */
static int xCurrentScroll; /* current horizontal
scroll value */
static int xMaxScroll; /* maximum horizontal
scroll value */
/* These variables are required for vertical
scrolling. */
static int yMinScroll; /* minimum vertical
scroll value */
static int yCurrentScroll; /* current vertical
scroll value */
static int yMaxScroll; /* maximum vertical
scroll value */
int WINAPI WinMain (HINSTANCE hThisInstance,
HINSTANCE hPrevInstance,
LPSTR lpszArgument,
int nFunsterStil)
{
HWND hwnd; /* This is the handle for
our window */
MSG messages; /* Here messages to the
application are saved */
WNDCLASSEX wincl; /* Data structure for the
windowclass */
//replace with any bitmap
bitmap = LoadImage(hinst, "C:\\atomic.bmp",
IMAGE_BITMAP, 0,
0, LR_LOADFROMFILE);
GetObject(bitmap, sizeof(bm), &bm);
w = bm.bmWidth;
h = bm.bmHeight;
/* The Window structure */
wincl.hInstance = hThisInstance;
wincl.lpszClassName = szClassName;
wincl.lpfnWndProc = WindowProcedure; /* This
function is called by windows */
wincl.style = CS_BYTEALIGNCLIENT;
/* Catch double-clicks */
wincl.cbSize = sizeof (WNDCLASSEX);
/* Use default icon and mouse-pointer */
wincl.hIcon = LoadIcon (NULL, IDI_APPLICATION);
wincl.hIconSm = LoadIcon (NULL, IDI_APPLICATION);
wincl.hCursor = LoadCursor (NULL, IDC_ARROW);
wincl.lpszMenuName = NULL; /* No
menu */
wincl.cbClsExtra = 0; /* No
extra bytes after the window class */
wincl.cbWndExtra = 0; /*
structure or the window instance */
/* Use Windows's default color as the background
of the window */
wincl.hbrBackground = (HBRUSH) (COLOR_BTNFACE);
/* Register the window class, and if it fails quit
the program */
if (!RegisterClassEx (&wincl))
return 0;
/* The class is registered, let's create the
program*/
hwnd = CreateWindowEx (
WS_EX_TOPMOST, /*
Extended possibilites for variation */
szClassName, /* Classname */
"Windows App", /* Title Text */
WS_OVERLAPPEDWINDOW | WS_SYSMENU |
WS_VSCROLL | WS_HSCROLL, /* default window */
CW_USEDEFAULT, /* Windows decides the
position */
CW_USEDEFAULT, /* where the window
ends up on the screen */
w/2, /* The programs width
*/
h/2, /* and height in
pixels */
NULL, /* The window is a
child-window to desktop */
NULL, /* No menu */
hThisInstance, /* Program Instance
handler */
NULL /* No Window Creation
data */
);
/* Make the window visible on the screen */
ShowWindow (hwnd, nFunsterStil);
/* Run the message loop. It will run until
GetMessage() returns 0 */
while (GetMessage (&messages, NULL, 0, 0))
{
/* Translate virtual-key messages into
character messages */
TranslateMessage(&messages);
/* Send message to WindowProcedure */
DispatchMessage(&messages);
}
/* The program return-value is 0 - The value that
PostQuitMessage() gave */
return messages.wParam;
}
/* This function is called by the Windows function
DispatchMessage() */
LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT
message, WPARAM wParam, LPARAM lParam)
{
switch (message) /* handle the
messages */
{
case WM_CREATE:
hdc = BeginPaint(hwnd, &ps);
hdcmem = CreateCompatibleDC(hdc);
SelectObject(hdcmem, bitmap);
EndPaint(hwnd, &ps);
/* Initialize the flags. */
fBlt = FALSE;
fScroll = FALSE;
fSize = FALSE;
/* Initialize the horizontal scrolling
variables. */
xMinScroll = 0;
xCurrentScroll = 0;
xMaxScroll = 0;
/* Initialize the vertical scrolling
variables. */
yMinScroll = 0;
yCurrentScroll = 0;
yMaxScroll = 0;
break;
case WM_PAINT:
hdc = BeginPaint(hwnd, &ps);
BitBlt(hdc, 0, 0, bm.bmWidth, bm.bmHeight, hdcmem,
xCurrentScroll, yCurrentScroll, SRCCOPY);
EndPaint(hwnd, &ps);
break;
case WM_SIZE: {
int xNewSize;
int yNewSize;
xNewSize = LOWORD(lParam);
yNewSize = HIWORD(lParam);
if (fBlt)
fSize = TRUE;
/*
* The horizontal scrolling range is defined
by
* (bitmap_width) - (client_width). The
current horizontal
* scroll value remains within the horizontal
scrolling range.
*/
xMaxScroll = max(bm.bmWidth-xNewSize, 0);
xCurrentScroll = min(xCurrentScroll,
xMaxScroll);
si.cbSize = sizeof(si);
si.fMask = SIF_RANGE | SIF_PAGE | SIF_POS;
si.nMin = xMinScroll;
si.nMax = bm.bmWidth;
si.nPage = xNewSize;
si.nPos = xCurrentScroll;
SetScrollInfo(hwnd, SB_HORZ, &si, TRUE);
/*
* The vertical scrolling range is defined by
* (bitmap_height) - (client_height). The
current vertical
* scroll value remains within the vertical
scrolling range.
*/
yMaxScroll = max(bm.bmHeight - yNewSize, 0);
yCurrentScroll = min(yCurrentScroll,
yMaxScroll);
si.cbSize = sizeof(si);
si.fMask = SIF_RANGE | SIF_PAGE | SIF_POS;
si.nMin = yMinScroll;
si.nMax = bm.bmHeight;
si.nPage = yNewSize;
si.nPos = yCurrentScroll;
SetScrollInfo(hwnd, SB_VERT, &si, TRUE);
UpdateWindow(hwnd);
}
break;
case WM_HSCROLL: {
int xDelta; /* xDelta = new_pos -
current_pos */
int xNewPos; /* new position */
int yDelta = 0;
switch (LOWORD(wParam)) {
/* User clicked the shaft left of the
scroll box. */
case SB_PAGEUP:
xNewPos = xCurrentScroll - 50;
break;
/* User clicked the shaft right of the
scroll box. */
case SB_PAGEDOWN:
xNewPos = xCurrentScroll + 50;
break;
/* User clicked the left arrow. */
case SB_LINEUP:
xNewPos = xCurrentScroll - 5;
break;
/* User clicked the right arrow. */
case SB_LINEDOWN:
xNewPos = xCurrentScroll + 5;
break;
/* User dragged the scroll box. */
case SB_THUMBPOSITION:
xNewPos = HIWORD(wParam);
break;
default:
xNewPos = xCurrentScroll;
}
/* New position must be between 0 and the
screen width. */
xNewPos = max(0, xNewPos);
xNewPos = min(xMaxScroll, xNewPos);
/* If the current position does not change, do
not scroll.*/
if (xNewPos == xCurrentScroll)
break;
/* Set the scroll flag to TRUE. */
fScroll = TRUE;
/* Determine the amount scrolled (in pixels).
*/
xDelta = xNewPos - xCurrentScroll;
/* Reset the current scroll position. */
xCurrentScroll = xNewPos;
/*
* Scroll the window. (The system repaints
most of the
* client area when ScrollWindowEx is called;
however, it is
* necessary to call UpdateWindow in order to
repaint the
* rectangle of pixels that were invalidated.)
*/
ScrollWindowEx(hwnd, -xDelta, -yDelta, (CONST
RECT *) NULL,
(CONST RECT *) NULL, (HRGN) NULL, (LPRECT)
NULL,
SW_INVALIDATE);
UpdateWindow(hwnd);
/* Reset the scroll bar. */
si.cbSize = sizeof(si);
si.fMask = SIF_POS;
si.nPos = xCurrentScroll;
SetScrollInfo(hwnd, SB_HORZ, &si, TRUE);
}
break;
case WM_VSCROLL: {
int xDelta = 0;
int yDelta; /* yDelta = new_pos -
current_pos */
int yNewPos; /* new position */
switch (LOWORD(wParam)) {
/* User clicked the shaft above the scroll
box. */
case SB_PAGEUP:
yNewPos = yCurrentScroll - 50;
break;
/* User clicked the shaft below the scroll
box. */
case SB_PAGEDOWN:
yNewPos = yCurrentScroll + 50;
break;
/* User clicked the top arrow. */
case SB_LINEUP:
yNewPos = yCurrentScroll - 5;
break;
/* User clicked the bottom arrow. */
case SB_LINEDOWN:
yNewPos = yCurrentScroll + 5;
break;
/* User dragged the scroll box. */
case SB_THUMBPOSITION:
yNewPos = HIWORD(wParam);
break;
default:
yNewPos = yCurrentScroll;
}
/* New position must be between 0 and the
screen height. */
yNewPos = max(0, yNewPos);
yNewPos = min(yMaxScroll, yNewPos);
/* If the current position does not change, do
not scroll.*/
if (yNewPos == yCurrentScroll)
break;
/* Set the scroll flag to TRUE. */
fScroll = TRUE;
/* Determine the amount scrolled (in pixels).
*/
yDelta = yNewPos - yCurrentScroll;
/* Reset the current scroll position. */
yCurrentScroll = yNewPos;
/*
* Scroll the window. (The system repaints
most of the
* client area when ScrollWindowEx is called;
however, it is
* necessary to call UpdateWindow in order to
repaint the
* rectangle of pixels that were invalidated.)
*/
ScrollWindowEx(hwnd, -xDelta, -yDelta, (CONST
RECT *) NULL,
(CONST RECT *) NULL, (HRGN) NULL, (LPRECT)
NULL,
SW_INVALIDATE);
UpdateWindow(hwnd);
/* Reset the scroll bar. */
si.cbSize = sizeof(si);
si.fMask = SIF_POS;
si.nPos = yCurrentScroll;
SetScrollInfo(hwnd, SB_VERT, &si, TRUE);
}
break;
case WM_DESTROY:
DeleteDC(hdc);
KillTimer(hwnd, idTimer1);
PostQuitMessage (0); /* send a
WM_QUIT to the message queue */
break;
default: /* for messages
that we don't deal with */
return DefWindowProc (hwnd, message,
wParam, lParam);
}
return 0;
}
|
|
From: Luke F. <sky...@ca...> - 2005-12-30 21:43:28
|
Umm this is a phishing scam.... |
|
From: Noorez K. <lor...@ho...> - 2005-12-29 20:35:42
|
I dont know if i'm really understand the WSAAsyncSelect function after reading the MSDN. Ok...So lets say i receive a connection on a SOCKET. Could i then call the WSAAsyncSelect on the socket with FD_READ to know when i have to call the recv() to get the data from that SOCKET? And if I then wanted to echo the data back, would I have to call WSAAsyncSelect on the SOCKET with FD_WRITE before I call the send() function? _________________________________________________________________ Take advantage of powerful junk e-mail filters 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: Noorez K. <lor...@ho...> - 2005-12-29 01:02:46
|
I am having trouble using telnet with the recv socket method. If only one key on telnet is pushed, the recv() method returns on the server side. How could i make it so it will read until the newline character? _________________________________________________________________ Take advantage of powerful junk e-mail filters 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: Noorez K. <lor...@ho...> - 2005-12-28 23:09:21
|
Is it possible to have two threads... one that will read from a socket, and one that will write to the same socket at the same time? _________________________________________________________________ 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: Noorez K. <lor...@ho...> - 2005-12-28 04:49:21
|
I'm getting a Linker Error undefined reference to 'vtable for Chatter' but i don't have anything of that name anywhere in my program. What could cause it? _________________________________________________________________ Don't just Search. Find! http://search.sympatico.msn.ca/default.aspx The new MSN Search! Check it out! |
|
From: <fab...@gm...> - 2005-12-27 12:05:15
|
I'm running Dev-C++ , 4.9.9.2 under windows xp and I'm receiving an odd
error:
*** [Project1.exe] Error 1
and that's it! no reference to lines or files.
I will copy the code here:
/*TAplication.h*/
class TAplication{
public:
void Run();
};
/*TAplication.ccp*/
#include <iostream>
#include "TAplication.h"
void TAplication::Run(){
std::cout << "This is a test" << std::endl;
}
/*main.ccp*/
#include "TAplication.h"
int main(){
TAplication ap;
ap.Run();
return 0;
}
please help!
FF;
|
|
From: <cha...@21...> - 2005-12-24 19:45:42
|
贵公司经理/财务:
您好! 首先祝贵公司生意兴隆.业务蒸蒸日上。
我是深圳宏业发商贸有限公司。因本公司进项较多,为要冲减进项;
现有“增值税”(电脑)发票对外提供、缴款书。税率方面较低(6%)
左右的税点.其它“国税”普通商品销售。“地税”建筑安装、运输、
广告、服务业、咨询和定额发票等(1.5%)左右的税点优惠代开或合作。
还可以根据数目的大小来衡量优惠的多少。本公司郑重承诺所用票
据均可深圳国税网www.szgs.gov.cn;地税网www.szds.gov.cn查询或
到税务局抵扣验证。
彼此合作一次,必成永久朋友!欢迎来电垂询!此信息长期有效,
如须进一步洽商:顺祝商祺!
联系人:金先生 电话:13480930863
|
|
From: <cha...@21...> - 2005-12-24 19:10:42
|
贵公司经理/财务:
您好! 首先祝贵公司生意兴隆.业务蒸蒸日上。
我是深圳宏业发商贸有限公司。因本公司进项较多,为要冲减进项;
现有“增值税”(电脑)发票对外提供、缴款书。税率方面较低(6%)
左右的税点.其它“国税”普通商品销售。“地税”建筑安装、运输、
广告、服务业、咨询和定额发票等(1.5%)左右的税点优惠代开或合作。
还可以根据数目的大小来衡量优惠的多少。本公司郑重承诺所用票
据均可深圳国税网www.szgs.gov.cn;地税网www.szds.gov.cn查询或
到税务局抵扣验证。
彼此合作一次,必成永久朋友!欢迎来电垂询!此信息长期有效,
如须进一步洽商:顺祝商祺!
联系人:金先生 电话:13480930863
|
|
From: <ly...@ma...> - 2005-12-24 06:36:37
|
Dear all:
=20
Installing Dev-C++ for the first time, I mistakingly opt for =
language Chinese instead of Chinese[TW]; I try to uninstall and install =
again, but "Chinese" remains, anyone how to change it? Thks a lot.
=20
Lung-Yu Chang
02-26585801-2744
ly...@ma...
=20
|
|
From: Josh M. <mrl...@gm...> - 2005-12-23 22:08:09
|
Just comment out the line, it's not important at all. It's a file auto-generated by VC++ most of the time. On 12/23/05, Fibre Optic <fib...@go...> wrote: > > Hello all, > > i am trying to work with Fluid MM but during compilation i see such a > message: > > "mgr.cpp:77:20: stdafx.h: No such file or directory" > > Could some one of you tell me to which package stdfc.h is related to ? > How to fix this issue ? > > txh, > FO > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log > files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_id=3D7637&alloc_id=3D16865&op=3Dclick > _______________________________________________ > 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 > -- Cheers, Josh PGP: http://revvy.box43.net/Josh_Matthews.asc |
|
From: Rodrigo C. <rc...@gm...> - 2005-12-23 21:37:12
|
Hi C++ gurus: hope you have a nice Xmas! I want to convert a string that cointains numbers separated by spaces (or other characters) to a vector or array containing the numbers, like: "0 1 0 3 4 0 5 0" =3D> [0 1 0 3 4 0 5 0] or "0,1,2,4,6,7" =3D> [0 1 2 4 6 7] The number of colums (number of numbers) of each string is unknown. How can I do this using C++ strings? Thanks. Rodrigo F. Cadiz rc...@gm... |
|
From: Fibre O. <fib...@go...> - 2005-12-23 21:16:50
|
Hello all, i am trying to work with Fluid MM but during compilation i see such a message: "mgr.cpp:77:20: stdafx.h: No such file or directory" Could some one of you tell me to which package stdfc.h is related to ? How to fix this issue ? txh, FO |
|
From: Reid T. <rei...@at...> - 2005-12-23 02:15:05
|
Noorez Kassam wrote: > I need a way to do TCP/IP connections between computers to send > information down for a program that i'm making. I can't find a > tutorial on this. Does anyone know of any? > > _________________________________________________________________ see the top two responses from this query... The second response is extremely useful.. http://www.google.com/search?q=C+socket+programming+example&start=0&ie=utf-8&oe=utf-8&client=firefox-a&rls=org.mozilla:en-US:official |
|
From: Josh M. <mrl...@gm...> - 2005-12-23 01:59:45
|
http://beej.us/guide/bgnet/ Beej is the be-all and end-all. On 12/22/05, Noorez Kassam <lor...@ho...> wrote: > > I need a way to do TCP/IP connections between computers to send > information > down for a program that i'm making. I can't find a tutorial on this. Does > anyone know of any? > > _________________________________________________________________ > Take charge with a pop-up guard built on patented Microsoft(r) SmartScree= n > Technology. > > http://join.msn.com/?pgmarket=3Den-ca&page=3Dbyoa/prem&xAPID=3D1994&DI=3D= 1034&SU=3Dhttp://hotmail.com/enca&HL=3DMarket_MSNIS_Taglines > Start enjoying all the benefits of MSN(r) Premium right now and get the > first two months FREE*. > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log > files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_id=3D7637&alloc_id=3D16865&op=3Dclick > _______________________________________________ > 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 > -- Cheers, Josh PGP: http://revvy.box43.net/Josh_Matthews.asc |
|
From: Noorez K. <lor...@ho...> - 2005-12-23 01:48:50
|
I need a way to do TCP/IP connections between computers to send information down for a program that i'm making. I can't find a tutorial on this. Does anyone know of any? _________________________________________________________________ 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: Brett L. <qwn...@ci...> - 2005-12-22 13:50:08
|
Explosive St=ck Alert Doll Technology Group Inc. Global Manufacturer and Marketer of "Clean & Green" Products and Technology Solutions(Source: News 12/6/05) OTC: DTGP Price: .14 Huge PR Campaign Underway For Thursday's Trading **DTGP** Can You Make Some Fast Money On This One? RECENT NEWS: Go Read The Full Stories Right Nowii 1)Doll Technology Group Begins U.S. Trials of AquaBoost(TM) 2)Doll Technology Group Announces Strategic Partnership With Land and Sea Development to Market BlazeTamer(TM) Fire Retardant Product- Initial Purchase Order Valued at Over $1.1 Million RedBrooks Laboratory, a DTGP subsidiary, is a full service independent facility that tests, qualifies and certifies all Doll Technology Group's products and services. The laboratory is one of the few government certified facilities for the testing of fire suppression systems for the aerospace, maritime, and general industries. (Source: News 12/2/05) Watch This One Trade on Thursday Radar it Right Now.. information within this email contains 4rward l00king statements within the m eaning of Sect ion twenty seven A of the Securities Act of nin eteen thirty three and Section twenty oneB of the Secu rities Exch ange Act of nineteen thirty four. Any statements that expr ess or involve discuss ions with respect to predi ctions, exp ectations, belie fs, pl ans, proj ections, objectives, g oals, assumpt ions or future events or perf ormance are not stat ements of his torical fact and may be 4 rward 1o0king statem ents. 4 rward looking stat ements are based on e xpectations, estimates and proj ections at the time the stat ements are made that in volve a nu mber of ri sks and uncer tainties wh ich could cause actual res ults or eve nts to dif fer mate rially from those p resently anticipa ted.Today's fea tured Compa ny is not a repr ting compan y und er the SEC Act of ninteen thirty four and theref ore there is limi ted inform tion availab le on the com pany. As with many micr ocap st=cks, today's company has dis closable material items you need to consider in order to make an informed and intelligent in_vestment decision. These items include: A nominal cash position. it is an operating Company. The company is going to need financing. if that financing does not occur, the company may not be able to continue as a going concern in which case you could lose your entire in-vestment. The publisher of this newsletter does not represent that the informa tion contained in this message states all ma terial facts or does not omit a mat erial fact neces sary to make the state ments therein not misle ading. All in formation provided within this e_ mail perta ining to in- vesting, st=cks, securities must be understood as informat ion provi ded and not in vest ment advice. Remember a tho rough due dilige nce effort, inc luding a review of a comp any's filings when available, should be compl eted prior to in_ vesting. The pu blisher of this newsletter advises all read ers and subs cribers to seek adv ice from a reg istered profe ssional secu rities re presentative before deciding to trade in st=cks featured within this e_ mail. None of the mat erial within this repo rt shall be co nstrued as any kind of in_vestment advice or solicitation. Many of these companies are on the verge of bankruptcy. You can lose all your mony by inv esting in this st=ck. The publisher of this newsletter is not a regis tered in- vestment advis0r. Subscribers should not view information herein as legal, t x, account ing or in vestment advice. in comp liance with the Secur ities Act of nineteen thirty three, Section seventeen(b),The pu blisher of this newslet ter is cont racted to receive twel ve th0us and d0l lars from a third party, not an officer, director or affiliate shareh 0lder for the circul ation of this re port. Be aware of an inher ent conf lict of int erest resu lting from su ch compen sation due to the fact that this is a paid a vertisement and is not with out b ias.The pa rty that pa ys us has a pos ition in the st=ck they will sell at any time wi hout notice. This could have a nega tive im pact on the price of the st0ck, causing you to lose mony.Their intent ion is to sell now. All fa ctual inf ormation in this report was gathered from public sources,including but not limited to Company Press Releases. Use of the info rmation in this email cons titutes your accep tance of these terms. |
|
From: Per W. <pw...@ia...> - 2005-12-21 16:37:54
|
wc is easiest way to count # of lines in text files. /Per W On Wed, 21 Dec 2005, Murat AYIK wrote: > I like to see how many lines of code I wrote, but > the project properties shows them per file. Is > there a way to count the total number of lines in > the whole project? > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click > _______________________________________________ > 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:
<ind...@gm...> - 2005-12-21 13:09:39
|
Murat AYIK wrote: > I like to see how many lines of code I wrote, but > the project properties shows them per file. Is > there a way to count the total number of lines in > the whole project? > > I'm afraid Dev-C++ will not allow you to do that. I had been looking for something like that myself, until I found the freeware program "Source Monitor", which does not only count lines, but also provide other metrics (which can be very useful for monitoring a larger project). You can get it at http://www.campwoodsw.com/sm20.html I know, this is not what you asked for originally, but it may be helpful anyway ;) Yours, David. |
|
From: Murat A. <mur...@ya...> - 2005-12-21 12:17:01
|
I like to see how many lines of code I wrote, but the project properties shows them per file. Is there a way to count the total number of lines in the whole project? __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |