|
Ehsan-de-Burge wrote:
Simple TCP Client by Nishant but i dosen't help me out!
Could you explain how it does not help?
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
I've written an opengl program using mfc that works fine in winXP, but when I run it in win2000 it doesn't display anything in the viewport... not even the background.
I saw i glimpse of the display once when I had a MessageBox over it, so it may be a update problem!?
Anyone with good knowledge in opengl that can help me?
/PA
|
|
|
|
|
It can be many things. You should be more specific.
Try using glGetError (and gluErrorString) to isolate your problem. glGetError will work only if you made a mistake in your OpenGL calls, but your problem might be some OS issue.
Good luck.
Orhun Birsoy
|
|
|
|
|
Yeah I've checked the gl-calls with glGetError without finding any errors... no surprise really 'cos it works on one computer and opengl is platform indendent, right?
I've checked the return value of all strange operations like "wglMakeCurrent" and "SetPixelFormat" (it's all mumbojumbo to me), and all are OK except "wglCreateContext which returns TRUE but set the last error-variable to 8, which is "Not enough storage is available to process this command". This does not happen on the XP-machine.
As I mentioned I suspect it's a update problem. Is InvalidateRect(NULL, FALSE) enough to force a re-draw?
/PA
|
|
|
|
|
Is the operating system only changing factor here?
Is it possible that you are using some OpenGL extension(or feature) that Win2000 driver and/or video card of Win2000 machine does not support?
InvalidateRect should be enough. (If it is enough for XP it should be enough for Win2000 for such a basic function.)
Orhun Birsoy
|
|
|
|
|
It's solved now.
I found another sample code for the context creation which worked fine. I don't know what the problem was... nevermind.
Thanks anyway Orthun!
/PA
|
|
|
|
|
Hi,
some questions regarding GDI+ and general who to write code that demands high throughput.
1) I load an image with the image constructor of gdi. This takes about 20ms for an 720*565 RGB tiff image (1.6mb). This sounds eventually reseonable to me since random access of hdd should be about 8ms - 12ms. Question: could it be faster? Is 20ms to long? (I think about processing 30images per second and I want to do image processing. consequently i've just 10ms left for that. ) How can I process this huge amount of data faster (1.6mb*30 = 48mb/sec)? Since i load single images i dont know if its somehow possible to have a stream of data ... any comments?
2) I need to access the bitmap data of the image. Therefore i use the the LockBits method to receive the BitmapData. What I found very strange is that this method needs huge amount of time (20 - 100ms). This sounds very unreasonable to me since the data should already be in memory and all i want is a nice pointer to the data. The code I use is:
m_pBmSource->LockBits(&Rect(0,0,m_pBmSource->GetWidth(),m_pBmSource->GetHeight()),ImageLockModeRead | ImageLockModeWrite,PixelFormat24bppRGB,&m_pBmDataSource);
where m_pBmSource is the pointer to a Bitmap.
if you need more information to be able to help please let me know.
Many thanks
micheal
|
|
|
|
|
I can center text horizontally in a CEdit control,
but I can't figure out how to center text vertically
in a CEdit control. Any ideas?
Please, any response any one can give me will be
greatly appreciated.
Sincerely,
Danielle (an overworked graduate student)
|
|
|
|
|
DanYELL wrote:
Any ideas?
Add the ES_MULTILINE and ES_CENTER styles to the edit control. Now try the following:
m_edit.SetWindowText("H\r\ne\r\nl\r\nl\r\no\r\nW\r\no\r\nr\r\nl\r\nd\r\n!");
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Does anyone know how to get the position of the mouse with regard to the sceen instead of the application? For example if the window was located in the middle of the window and the cursor was over the upper left corner i would like to get something like (250, 250) instead of (0,0). Any ideas?
|
|
|
|
|
|
Awesome, thanks a bunch....
|
|
|
|
|
GetCursorPos() always returns the mouse position in screen coordinates.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Anybody knows how can i have a dialog always visible on screen, fixed even when other applications are the active ones?
|
|
|
|
|
One possible solution is topmost style.
Kuphryn
|
|
|
|
|
Is it possible to lift a dialog from one application and copy it into another (diaDlg.cpp and diaDlg.h). Its for a MFC Dialog based application, the dialogs are Modeless ones.
My new applications wishes to make use of one or two dialogs (out off about 8).
I would want the new application have complete control of the inserted dialogs.
For the resources, do you have to go into the resource.h file and lift them out, and renumber? Sounds bad if you do.
Or is it best to start from scratch again.
Regards,
Sweep
|
|
|
|
|
Try exporting the resource and then simply import the resource and .h and .cpp files into the new project.
Kuphryn
|
|
|
|
|
Thanks, but could you provide a bit more information.
If I select the dialog I wish to use in another program, the Export option is greyed out in the 'Resource View'
Also how do you import the Resources.
Sorry but at my limit of the IDE.
|
|
|
|
|
You mean that you didn't have source code available of application where the source dialogs are?
In any case, always it's possible to edit resources and copy and paste the dialogs you want in other application.
Jaime
|
|
|
|
|
:(Both programs are on my hard drive.
Its just I always worried about screwing up the IDE by
cutting/paste between applications.
But I would like to reuse a couple of modeless dialogs in another program.
Its just how to 'export' the resources from one into the other. I know
I can copy over the abcDlg.cpp and abcDlg.h files.
Any info would be useful.
Graham
grahamfff
|
|
|
|
|
Just open the EXE with VC++ resource editor.. copy and paste the dialog into your application.
You may need, however, to add manually IDC_ #defines to the controls.
Jaime
|
|
|
|
|
The safest way to copy resources from one project to another is by editing the .RC file and the resource.h file in the text editor. You can copy/paste the .RC text from one file to another, and do the same with the identifiers used by the dialog in the resource.h. You may need to renumber the identifiers after you paste them into the new resource.h.
Software Zen: delete this;
|
|
|
|
|
OK thanks your suggestion seems the best to date.
|
|
|
|
|
hi,
what can I use FileChannel(valid in JAVA) in C++.
|
|
|
|
|
Hi there,
Can anyone tell me how can I track other application window handle and automate/simulate the object evens on that application window like button press etc..
Application will be running on the same PC, just like an .exe application.
Regards
|
|
|
|