|
I am sorry I really down understand ??? I think I have title bar set in in resource of the DialogBox templete
of which this edit control is a part of
|
|
|
|
|
Edit controls render the text themselves.
You don't draw the text on top of an edit control.
"The SetWindowText function changes the text of the specified
window's title bar (if it has one). If the specified window is
a control, the text of the control is changed."
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi,
My plan was to make Certin parts of the Text Highlighted/Colored
that why I went into GDI/HDC mode
Can you do Device Context e.g. GDI stuff with a Multi Line edit control ?????
or am I totally way off base
BTW ipc communication via named pipes I finally got that to work
Can I buy you dinner sometimes
Thankx for your help
|
|
|
|
|
ForNow wrote: Can you do Device Context e.g. GDI stuff with a Multi Line edit control ?????
You can, but you'll be fighting the control's drawing implementation.
ForNow wrote: My plan was to make Certin parts of the Text Highlighted/Colored
Using a Rich Edit control would make that much simpler!
ForNow wrote: BTW ipc communication via named pipes I finally got that to work
Cool!
ForNow wrote: Can I buy you dinner sometimes
Of course! I never turn down a free meal
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
ok I see it much simpler the n WM_PAINT or WM_CTLCOLOREDIT
one last question I implemented multiline edit control via DialogTemplete
can I still use that interface for Rich Edit ???
BTW as far free meal I am on the easT cost specfically White Plains NY
|
|
|
|
|
Sure, you can use a Rich Edit control on a dialog.
By default, it looks/acts like a regular edit control, and supports most,
if not all, of the functionality of a standard edit control plus lots more...
Rich Edit Controls[^]
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I am A Assembler internals MainFrame Programmer by trade BTW
SO all that WM_CTLCOLOREDIT and WM_PAINT
SelctObject stuff is out the door is this now they way to Paint MultiLine Edit Controls
As Mentinoed I Dont do this for a Living so.... sometimes I am not sure how to go about things
thankx so much
|
|
|
|
|
Hi, my main program is being monitored by a manager type program via a heart beat. How do I use the manager type program to force close the application. Using WM_CLOSE or WM_DESTROY is useless because the message pump is not running anymore. Thank you.
|
|
|
|
|
You can Kill process using TerminateProcess API
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|
|
I was out of state for a while and did not get a chance to respond. It works. Thank you.
|
|
|
|
|
Any tips on doing GDI rendering on top of OpenGL?
We're doing our OpenGL rendering, then calling SwapBuffers, then doing GDI rendering on the same DC. This works fine with SW rendering pixel formats. When using HW accelerated pixel formats the window update/clipping/refresh is different the GDI rendering doesn't always update if you obscure the window with a dialog for example.
So I thought I'd ask in case we're going about it the wrong way.
|
|
|
|
|
Well I found one solution to this. We've overridden OnEraseBkgnd in our view window and we just return TRUE. I added a call to Invalidate(FALSE) and that cleared up the GDI rendering. It looks like the GDI rendering was getting called, but the only region being allowed to update was the obscured region.
|
|
|
|
|
You could also try rendering onto a memory bitmap, then use GDI on that and blit that onto your window. Because of the blit this could be a bit slower though. I see you already solved your problem but i thought i mention this possibility too.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
|
|
|
|
|
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++
|
|
|
|