|
Blitting a bitmap may hide some part of the OpenGL rendered scene. Otherwise has to go for Transperant blitting.
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|
|
What do you mean? What i meant is not to draw GDI things onto a bitmap and then blit that onto the surface OpenGL rendered to, i mean, make OpenGL render onto a bitmap, use GDI on that and then display it on the window. See this.[^]
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
|
|
|
|
|
We do render OpenGL to an offscreen bitmap in some places, but not for our main rendering.
If you render OpenGL to an offscreen bitmap are you still able to take advantage of hardware accelerated pixel formats? We've seen issues with trying to do that.
|
|
|
|
|
I'm not sure...that might vary dependant on drivers and hardware i guess.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
|
|
|
|
|
Hi there,
I have an application that sits between mobile devices and another application.
I use UDP socket from mobile devices (GPRS network the device uses a modem and SIM card) to my application and TCP from my application to the second application. the mobile device is supposed to send a message to my app and from my app to the 2nd application and the second application sends a response back to that specific device via my application. So I record mobile id and IP and port that I got the message from and save it in a memory to use it for response back to the device. the problem is when my application crashes, I lose all the IP and port information and the message that should go to the mobile device would not get it there until I get a message from the mobile and save the info. I tried to save all the info in a file and read it back in start up but I noticed that when I restart my application the port number for the specified device will change and the information that I saved is useless (i.e. I am sending a message to an IP (which is correct) and a port (that has changed)). My question is like this: is there anyway to use UDP sockets and send/ receive messages but just use a specific IP for each device and do not use any PORT? and if there is, I'll be appreciated if somebody get me a clue.
here is what happens for me now:
Device to App:
got a message:
look for device ID and save the IP and PORT for that:
Mobile# Z, IP: xxx.xxx.xxx.xxx port: xxxx
App to Device
Message is supposed to go to device Z --> get the IP and Port
send message to xxx.xxx.xxx.xxx port xxxx
if My app restarts and I get a message to send to device Z, the port is changed and the message never gets to that unless I get a message from the device and update my information.
Due to data usage and as we use VPN tunnel we send heartbeat message every 40 minutes, so the information might not be very updated.
Best
Nahitan
modified on Wednesday, December 10, 2008 3:53 PM
|
|
|
|
|
nahitan wrote: the problem is when my application crashes
Fix the crash.
led mike
|
|
|
|
|
Good point, but what if the PC restarts for any reason (windows crash, power...)
|
|
|
|
|
Maybe try running a port scan on the IP if possible. Just an idea, i wouldn't know how...
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
|
|
|
|
|
I'm hoping someone can help, I'm using a visual studio MSI file to deploy an applicaton that was written purely in C some time ago. I need to deploy the application without using the .Net framework in any way as it has to be deployed on a corporate XP build that doesn't have .net installed. I can get the application to install ok but when it comes to the reinstall I need to delete the previously installed directory along with its contents before the application can be reinstalled. I've created a custom action and will be placing the cleanup code inside a dll.
My current thinking is centered around:
1. Calling the dll cleanup function from a custom action (got this working)
2. Getting the OSVersion and current user's username (the install dir resides in the user's documents folder, don't know how to do this)
3. Using a switch case to delete the application folder and its contents (as it will be installed on XP and Vista)
I've been coding in C# for the last 3 years and haven't had much exposure to C/C++. If anyone can help me (suggestions or code )I'd be most grateful.
Cheers,
Drew
|
|
|
|
|
1) OS Version - You could get operation system version by using the api - GetVersionEx()[^]. You could get a lot of article about detecting operating system version in codeproject[^] itself.
2) You could get the current username by calling - GetUserName()[^] or GetUserNameEx()[^] functions.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Hi all,
I have a speed problem In the drawing frame of my graphic MDI application. The problem is that the refresh is very very slow. If i try to drag some menus passing from the drawing frame also them are very slow to refresh (it shows On the screen a visualisation queue(I hope that the concept is clear I don't know the exact word to explain that)).
What are the tipical problem that causes an MDI application to go slow as I described? I think that I'm making some gross error....
Thank you in advance for your suggestion
|
|
|
|
|
What's going on in the drawing code?
Single threaded app? Any drawing from multiple threads?
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Laan82 wrote: my graphic MDI application.
Not near enough detail.
Laan82 wrote: I think that I'm making some gross error
That is certainly possible, however, a computer system has finite resources. Strain them and things slow down.
led mike
|
|
|
|
|
Resist the temptation to redraw your entire client area when processing a paint message. You should get the invalid rectangle and only draw the contents that fall within it.
CDC::GetClipBox
The situation works best (looks professional) if you create an offscreen buffer(memDC) that is the size of the rectangle returned from CDC::GetClipBox and draw to it then blit it to the original dc when you are done drawing.
|
|
|
|
|
|
Thank you all for your help. Excuse me If I don't reply before but my pc crush in the last night. For the offscreen drawing I'm also now using it. But I have a doubt... In same part of my application I draw some of the object that I initialize (CLine,CRectangle and other object that I have created with their own Draw method) without use the offscreen buffer tecnique. How Can I use the offscreen buffer without use the OnDraw method? In other word how can I paint in some location of my code without use the central OnDraw method using double buffering? Another problem happens when I call InvalidateRect this function seems to be very very slow how could I replace It? Another question is: Will the program be faster if I use an SDI interface(I create an MDI application but now I have understood that I don't really need it)? Al least for multithreading I'm now using only two thread, the secondary thread is a working thread made in the "old way" (I have made a new class in order to make an efficient thread) and this thread doesn't interfere with the draw.
|
|
|
|
|
hello friends
i want coding for my problem.i have some file say text ,pdf or any type of file whatever size it have ,i want coding how to hide the size of that file or make a fake size of that file or convert it into a 0 byte.please help me in full coding in c++.
|
|
|
|
|
indiraagandhi wrote: ...or convert it into a 0 byte.
See here.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Do You really want to trick the file attributes to make explorer showing a fake size? Why?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
because i am working on concealed msg system & i do not want to show the size of hide file to an unauthorised user , for that i want this code
|
|
|
|
|
Well, I think NTFS - Alternative Data Streams[^] will be a perfect solution for you.
First open a new stream for your file. The normal file api's will be enough. Then Save your data into the new stream and truncate the main stream. So in explorer it seems the file is empty as you wish and in the mean time, you have the hidden data under it as well. And obviously it needs NTFS file system.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
How to append a new menu item to global system menu. I.e. to system menu of all applications. Well, for a single application it can be done easly by using GetSystemMenu() . But how to do it system wide?
I saw one application doing the same. When i checked the dlls, of the application I could see the MouseHookProc() in exported functions and I guess that its doing it by a global mouse hook. But after long R&D I couldn't figure out how. Any hints guys?
Thanks & Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Well, even Jijo raj wasn't able to do that, so far...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I did expect you'll reply with some funny quotes.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
This time I have no technical answer, unfortunately...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|