User Profile
Collapse
-
Hitting the P key will make the current tool being used the Pencil tool. While pixeling, you have to constanly move your mouse from the left of the screen to select the pencil, eyedropper, rectangle selection, circle, etc. it just takes forever and I'm trying to write a program that will map hotkeys to the keyboard so that if you press P the pencil will become your current tool and if you press E the eyedropper will become the current tool. It just... -
-
Microsoft Paint Simulated Mouse Click
Hello everyone
I'm trying to write a program in native c++ code that will do this:
When drawing in MS Paint and I press the P key on the keyboard, the Pencil tool will become the current tool.
I really want to stay away from installing drivers, injecting dlls, reverse engineering, and many other complex things to do such an easy task.
Normally, this would be easy but the Pencil tool in MS... -
Handling keyboard input
Hi everyone.
For the past day I've been trying to find a good way to handle keyboard input.
Naturally, I wanted to just use WM_KEYDOWN and WM_KEYUP to handle my events, but they proven to have limitations. In my game there was a keyboard delay. If you pressed and held down the right arrow key, the character would move one pixel to the right, stop, then continue moving. I wanted the character to immediately start moving... -
Passing variable to the WindowProcedure
Without creating global variables, is there a way to pass variables to the WindowProcedure that handles the messages?
For example, if I create a variable and initialize it in WinMain, is there any way to use it in my WindowProcedure ?
What I am doing is this. I have a class called Map. I also have a class called Texture and Window.
When I create Texture and Window, certain variables are created such as... -
The best way to render in Direct3D 9
I've been working on this for a couple days now. I'm really looking for the best way to render. Nothing too complicated but something that is fast, reliable, and powerful. I've seen many websites and about each one shows a different way. I've probably gone through about 5 different ways so far. But I'm really looking for a good, reliable one and I don't think I have found it yet.
I'm looking for a way that if the game is minimized,... -
Bump
It might help if I give you my code so here: My entire source:
http://rafb.net/p/OAkQDj57.htmlLeave a comment:
-
SendKeys in C++
Hello everyone,
Is there an equivalent to SendKeys.Send in C++? I have looked into keybd_event and SendInput, but to my knowledge you can only send one key at a time with those functions.
Thanks for any help.
Edit: I'm not using the .Net Framework so I can't use any of that stuff. -
C++ Direct3D in the taskbar
If I launch my DirectX program, full-screen initializes. If I alt tab out of it, it alt-tabs as normal. However, if I then maximize it so it has the focus of my computer again and then alt-tab for the second time, the window doesn't minimize. The taskbar shows up but the program doesn't minimize. It's like, the first time I alt tab it works perfectly normal but then second time I do it, it doesn't work. Anyone know why? I would really like to fix... -
HDC's
Hello everyone,
I have this code:
Code:Image* newImage = Image::FromFile(szFileName); Bitmap image(50, 50); Graphics graphics(&image); HDC gfxHDC = graphics.GetHDC(); graphics.DrawImage(newImage, 0, 0); int pixel, row; for (pixel = 1, row = 1; row <= 50; pixel++) if (GetPixel(gfxHDC, pixel, row) != RGB(255, 255, 255))
-
GetTextExtentPoint32 API
--------------------------------------------------------------------------------
When using this with the DrawText API, I make the rectangle that the text is contained in the width of the return value of GetTextExtentPo int32
I know I am using the right parameters, but sometimes the rectangle is way too big (over 15 pixels wider than the actual width of the text) and sometimes the rectangle is too small.
... -
Saving an image file to a directory with GDI+
Hello everyone and thank you for taking the time to read my post
I am running Visual C++ 2005 and I'm having some trouble with GDI+.
I have two bitmaps:
Code:Bitmap* pngFrame; Bitmap* pngEmblem;
Code:PAINTSTRUCT ps; BeginPaint(hwnd, &ps); Gdiplus::Graphics*
-
Loading PNG Files
All week now I have been searching for a good way to load and display PNG files. Every solution I try never works.
So now I am posting on the forums. I am not looking for a huge library. In fact, I'm not looking for a library at all. All I want to do is do easily be able to load and display PNG files.
I'm using Visual C++ 2005 Win32 API. -
GDI+ with Win32 API Dev-C++
I have Windows XP with Dev-C++. I created a Windows Application and added #include <gdiplus.h> to the top of the file. I made sure I had gdiplus.h and all the files it required in my include folder. However, when I try to run the application. I get these errors: http://rafb.net/p/wD4DPa78.html The last two errors repeat over and over again around 250 times. I checked the GdiplusEnums.h file and see this: http://rafb.net/p/ncqJg732.html As I... -
Using resources in your application
How come, whenever I use a resource, I have to define it as an integral and call the integer's value to use it?
For example, I have this:
Code:CONTROL "",IDC_COMBOBOX,"ComboBox",0x50010003,8,90,62,111
Code:#define IDC_COMBOBOX 30000
Code:MAKEINTRESOURCE(30000)
-
-
ComboBox Notification Problems
Hello everyone and thank you for taking the time to read my post,
I have this code:
Code:case WM_COMMAND: { switch(LOWORD(wParam)) { case hwndCombo: { switch(HIWORD(wParam)) { case CBN_DROPDOWN:
-
Creating a button from a resource file
Hello everyone,
I know how to create a Button using CreateWindow() and then passing in the correct arguements, but I want to create a button from a resource file.
Inside my resource file there is this:
Code:CONTROL "Select Emblem",IDC_TXTEMBLEM,"Static",0x50000000,6,59,48,8
Code:#define IDC_EMBLEMR 20000
-
-
BitBlt with PNG Files
Can I do this? I'm importing the PNG files this way:
Code:IDI_MYLOGIN PNG "myFile.png"
p1z g1v gud c0d :P
No activity results to display
Show More
Leave a comment: