|
Thank you
Very informative and encouraging.
At least I learned something,. Much better than those 'mad' and 'unwell' smilies(!) from others.
Thank you
//This is not a signature
while (I'm_alive) {
printf("I Love Programming");
}
|
|
|
|
|
|
|
As far as a tutorial goes, there is not much difference. Instead of using depth in perspective, you use layers for 2D games and build up from there. Your background layer is a long multi-texture graphic, usually sectioned for culling efficiency. You build on top of that your objects. In an orthographic projection, covered in most 3D tutorials all layers are equisized, no perspective shrinking, so you use the depth buffer only for layering. But all in all it is really not that different from 3D games, consider it a top down only view of a 3D game, and all the tutorials will pretty much work even if they are in 3D.
Some 2D engines to make your life easier:
http://www.phelios.com/ptk/[^]
http://goldenstudios.or.id/products/GTGE/index.php[^]
otherwise, as I said, put the projection in orthographic, and use a 3D engine/tutorial.
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
|
Kixdemp wrote: Oh... alright... but do you know of a short, simple tutorial? http://www.gamedev.net/nehe[^] seems far too long... Thanks!
Actually, Nehe is the best tutorial I know of. You can skip those items that seem obvious, or go it one step at a time as needed.
But maybe one of these will be more what you want: http://www.opengl.org/resources/tutorials/[^]
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
Hi,
I am working on a property page that holds 2 edit controls and a confirm button.
These controls are programmed to enter data quit fast by the user, eg
I overwrote PreTranslateMessage of the property page, so that when the user hits the enter key in one of these 3 controls, it shifts the focus to the next of these 3 controls and that in a circular way. My problem is that when one of the edit controls gets the focus the OK button on the property sheet gets highlighted indicating that it is the default button which it is not at that point, since the enter key will result in shift to one of my controls. How can I prevent this from happening ?
Thx
|
|
|
|
|
I am drawing some realtime graph using a Dialog based application, which I'm building using MFC. I'm using CDC function Moveto()/LineTo() to draw the graph and Grids. I am directly drwing to the DC of a Picture control in the Dialog. I am using Invalidate() - with both true/false option - to refresh the screen. Then I've used CToolTipCtrl class to show the value of the graph when a user place the mouse at a perticular position. To implement this I have divided the graph area in several rectangle along the x-axis, and added those using AddTool() function.
Now the tool tips are coming for each pixel - but when I move the mouse from one pixel to anther I am faceing lots of 'flickerings' in the screen. What is the reason for that. What is the way to reduce the screen flickerings.
One of my colleagues said that if I'd better draw to a Memory DC, and then use BitBlt() to draw in the screen, then I'd get no screen flickerings, - is it true ? - if yes then why???
Please help,
Sanjoy Sinharoy
Software Enggineer
HCL Technologies
India
|
|
|
|
|
Have you tried WS_CLIPCHILDREN (Clip Children property in the designer)?
When I draw something that needs to be flicker free, I usually use a backbuffer bitmap, to which I connect a memory dc. I then paint to the memory dc, and blit it wherever I want it shown. I also make sure I don't let the background in the picture area to be redrawn, because that's the root of all evil flickering.
The general solution I apply is to create a new window class, and call it Canvas or something like that. In its WM_ERASEBKGND handler, I don't do anything. I just return TRUE to signal that the background has been erased. I then set the WS_CLIPCHILDREN style on its parent. The window class maintain the backbuffer bitmap and memory dc, which is used for drawing operations. Whenever the control needs to redraw itself in the WM_PAINT handler, I just blit the bitmap to the window dc. No flickering... (and also reusable!)
--
Pictures[^] from my Japan trip.
|
|
|
|
|
Hi,
Does the CString has a max character limit ? Because i can not save to the member variables of CString type very big SQL queries (about 500 characters long).
Any suggestion ?
sdancer
|
|
|
|
|
sdancer75 wrote: Does the CString has a max character limit ? Because i can not save to the member variables of CString type very big SQL queries (about 500 characters long).
Any suggestion ?
CString has limits but it certainly isn't limited to 500 characters. How are you saving your query into the CString?
Michael
CP Blog [^] Development Blog [^]
|
|
|
|
|
sdancer75 wrote: Does the CString has a max character limit ?
Yes, something on the order of 231 bytes, give or take a few.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
CString doesn't have limits, your code does.
Before blaming someone elses code for an error, first try to find the bug in your code. CString does not have a limit of 500 characters. You are wasting your time looking for your problem in CString.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
"A CString object can store up to INT_MAX (2,147,483,647) characters."
That is what it says in the MSDN libraray.
|
|
|
|
|
Hey guys,
Thank you for your replies. It was my mistake. I confused since the debugger shows only a small part of the CString Variable and with my error in the code i had problems.
I solved. Thank you to All !
Regards,
sdancer
|
|
|
|
|
Hi,
I want to show a client desktop on server (like remote desktop in windows)
what is the best way for doing this?
cheers,
thanks.
Every new thing you learn,Gives you a new personality.
|
|
|
|
|
Create a screenshot of the desktop and send it to the server. That's how all remote desktop proggies work anyway.
|
|
|
|
|
You can try looking at the source code for TightVNC for some clues on how to do this.
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
Hi,
How can a button press be simulated, so when you do the call you can see the button going down and up again, and the corresponding button handler gets called.
I use the following code now.
((CButton *) GetDlgItem(IDC_MOD))->SendMessage(BM_CLICK);
The button handler gets called, but the button doesn't go down and up again.
Is there any other way to achief this ?
Thx
|
|
|
|
|
Have you tried sending WM_LBUTTONDOWN+WM_LBUTTONUP (with proper point) ?
I haven't tried it, but it seems to be the starting point of a button press...
HTH
squidev
|
|
|
|
|
According to the MSDN documentation the BM_CLICK message generates a WM_LBUTTONDOWN and a WM_LBUTTONUP message.
See :
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/buttons/buttonreference/buttonmessages/bm_click.asp
I figured out that when I shift the focus to a button on a regular dialog and I hit the <enter> key no down and up movement is seen. Could it be possible that everything goes so fast that you cann't see it ?
|
|
|
|
|
Why not just use Spy++ to see what messages are sent to the control and dialog? Once found, then it's just a matter of repeating them via code.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
try something like WM_GETDLGCODE , that might prevent the dialog from taking the focus from the controls ,and if it doesn't work then at design-time set the TAB order.
Regards
Farpointer
|
|
|
|
|
Dear All,
Programmatically I want to find the actual physical path of running process.
With Regards
Manoj Kumar Batra
|
|
|
|
|
Really easy. CreateToolhelp32Snapshot is your friend. Pass TH32CS_SNAPPROCESS, and use szExeFile of PROCESSENTRY32 structure.
|
|
|
|