Ah right, I forgot about status bars (I was drawing a filled RECT). I found this function, which does exactly what I want (and is easily adaptable to string tables!)
Thanks for the help!
Type: Posts; User: Darklighter
Ah right, I forgot about status bars (I was drawing a filled RECT). I found this function, which does exactly what I want (and is easily adaptable to string tables!)
Thanks for the help!
Hello,
In Solitaire, when you hover over the menu items, a string is displayed at the bottom of the window. I'm trying to recreate this feature in a similar card game of mine, but I can't seem to...
Alright, thanks. I just used this instead:
case WM_COMMAND:
PostMessage(NULL, WM_COMMAND, wParam, lParam);
break;
Hello,
In a small Win32 game of mine, I am passing Windows messages to functions instead of handling them in my WndProc, and it works fine with messages like WM_MOUSEMOVE, but WM_COMMAND doesn't...
It works! I had to delete the HRGN using DeleteObject() after using it, as specified in the MSDN.
Thanks for all the help. :)
Time to texture the ship! :D
Alright, here's the updated code:
In Globals:
HGDIOBJ memoryBmp = NULL;
In Game Initialization Function:
Thanks. I'm not too familiar with clipping and regions, but here's what I came up with:
In Globals:
HDC memoryDC = NULL;
HBITMAP asteroidBitmap = LoadBitmap ( GetModuleHandle (...
Hello.
I'm writing a basic Asteroid game in GDI using double buffering. The ship, the background and the asteroids (which are drawn using Polygon()) were initially colored with a solid color...
Or you can use...
system ( "color 0C" );
...with the corresponding digit values:
h_howee is right. sizeof ( filename ) would be a better choice.
Or you could do:
const int size = 80;
char filename [ size ];
Hello.
I'm currently in the process of designing a website about Direct3D and OpenGL for a school project, but I need a short interview from someone with experience in that domain, so I decided to...
Ah, thanks. I wasn't aware of that.
All of my code is in the same file. I searched my file, and there's no redefinitions or other variables and functions that have the same name.
I tried the preprocessor option, but the generated...
Why isn't this working?
Macros:
#define KEYDOWN ( vKey ) ( ( GetAsyncKeyState ( vKey ) & 0x8000 ) ? TRUE : FALSE )
#define KEYUP ( vKey ) ( ( GetAsyncKeyState ( vKey ) & 0x8000 ) ?...
Ah, passing NULL fixed it.
Thanks. :)
So I started DirectX programming, and I've learned to use PeekMessage instead of GetMessage, but for some reason the program keeps running in the background when I close it. I have searched the...
Welcome. :)
Haha, cool.
I can spin pens, but I can't transfer them from one finger to another. I got used to it spinning drumsticks (I'm a drummer).
Create a header file 'resource.h' and include it in main.cpp like so:
#include "resource.h"
Then, in your header, #define IDD_ABOUT and ID_HELP_ABOUT like so:
That worked fine. Thanks!
This is my code (I found this clearer than InflateRect):
RECT rc;
HBRUSH fillColor = CreateSolidBrush ( RGB ( 0, 255, 0 ) );
GetClientRect ( hWnd, &rc );
So I started messing around with GDI, and I created this magnificent piece of art. The green rectangle is supposed to be located at 10 pixels from the borders at all sides. Here's my code for the...
Indentation means proper alignment and spacing, as so:
#include <iostream>
using namespace std;
int main ()
{
bool x;
I find the Win32 API interesting and gratifying. I'm far from having mastered C++, but I feel like learning Win32 at the same time is a good change from the not-pretty-looking console programs.
Cable, 11 Mbps.
I changed the value of DbgJITDebugLaunchSetting to 1, but the JIT debugger still pops up whenever I open IE7. Would it be possible to uninstall the JIT debugger instead?
Why would the browser...