|
Thanks for all the responses. They were very helpful!
:->
|
|
|
|
|
I use Visual 2005 Studio. I want to find a (very basic) simple Server/Client program that transfer my data (UDP). Please show me some code in Windows C++ SDK...THANKS.
|
|
|
|
|
Have you checked out any of these[^].
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
|
When creating a CBrush object, there are limited colors that can be chosen. I need Red and Red is not one of those available.
i have tried this
CBrush Brushred(RGB(255,0,0));
Then i do a SelectObject on Brushred through the dc.
This gives me white no matter what RGB values i enter.
How can i get a red Brush?
|
|
|
|
|
Can you show snippet code
|
|
|
|
|
This is what i use...
//Set pRect Values here
RECT* pRect = new RECT;
this->GetClientRect (pRect);
//Create and select a red brush
CBrush BrushRed(RGB(255,0,0));
CBrush *pOldBrush = dc.SelectObject(&BrushRed);
//Draw Rectangle Frame
dc.FrameRect(pRect, pOldBrush);
|
|
|
|
|
You can use dc.FrameRect(pRect,&BrushRed)
|
|
|
|
|
That did it.
Thanks much.
Do you happen to know much about DrawDragRect function? I posted this question as well a few threads down
|
|
|
|
|
Did you see link in my reply?
|
|
|
|
|
LCI wrote: dc.FrameRect(pRect, pOldBrush);
You're passing the wrong brush to FrameRect()
|
|
|
|
|
Hello gurus,
Using the SetThreadAfinity and SetThreadIdealProcessor APIs allow you to tell on wich CPU the thread will run.
Is there is a way to exploit all available CPU time from other CPUs?
I mean by that when I have a big thread is running and the CPU is full (100%), this same thread consume the other free CPU time in order to accelerate the proccessing.
I know that a thread initially runs on 1 CPU. But maybe it is possible to a thread to use other CPU time.
Thanks for the help.
There is no spoon.
|
|
|
|
|
bouli wrote: I know that a thread initially runs on 1 CPU. But maybe it is possible to a thread to use other CPU time.
A thread can be scheduled to run on different CPUs, but since we are talking about a single thread here, it can only be running on one CPU at a time. If you want to use two (or more) CPUs at once, you will need a thread on each one.
Adjusting the thread priority can get you scheduled more often, but this can adversely affect other processes, and is generally not a great idea for long running threads.
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
Hi Friends,
I am facing couple of problems while compiling the code, and this is the first time I am facing this kind of problem so I don't understand how to resolve this, Please help me out.
The problems are as follows:
1. When I am compiling a code I am getting message saying " The source file XXX and YYY are both configured to produce the output file XXX.obj This project cannot be build.
2. After every modification I am getting mesage saying " XXX.clw, This file has been modified outside of the source editor. Do you want to relode it?" I am getting this message so much time that I am unable to work.
3. Some times my code is getting compiled and some time it is giving error saying undeclaired member variable even though the variable is declaired. some times same code is getting compiled withot any error.
Thanks & Regards,
-Dinesh.
|
|
|
|
|
do you have two files with the same name at two different locations with the same name ?
|
|
|
|
|
You are right.....
Project names are different but both the projects are having one "xxx.cpp" file comman and both the projects are stored at different location
|
|
|
|
|
so you have to rename one of the two...
|
|
|
|
|
This is fine for the point 1. but point 2 and 3 are the different projects which are also troubling me lot. do you have any suggestion for these....
|
|
|
|
|
are they generating their .obj intermediate files at the same place ? if so, change this
|
|
|
|
|
I am trying to figure out how to use the CDC method called DrawDragRect. I am hoping that this will be a good solution for me because i am attempting to Draw a Rectange A, then draw a smaller rectange B inside A. The option is to be able to move the smaller rectangle B with the mouse, anywhere inside the bigger rectangle A. Cannot reposition outside rectange A.
I looked at DrawDragRect's functionality and am confused with how how to start implementing this especially with using the mouse .
Does anyone have some direction or samples that i can get a clearer picture in my mind..
Thanks.
|
|
|
|
|
See here[^] for DrawDragRect
|
|
|
|
|
Hi,
I would like to block the user from moving and sizing a SDI frameWnd.
I use some MSDN recommandations, but do not work.
Thanks
Routh
|
|
|
|
|
Routh wrote:
I would like to block the user from moving and sizing a SDI frameWnd.
For starters, look at the WM_SIZE , WM_SIZING , and WM_GETMINMAXINFO messages. You also might want to remove the WS_THICKFRAME style.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi !
When my app is installed on a user's computer, the install is made in Admin mode. Some settings are stored in the registry in the LOCAL_MACHINE keys.
Users then use it, the app stores their settings in the registry (in the CURRENT_USER keys).
Later on, the admin wants to uninstall my app. I need to clear each users's registry to get rid of their settings. I didn't find a way, when logged as an admin, how to reach each local user of the machine and get rid of keys.
Could anyone help me regarding this issue ?
Thanks !
Jerome
|
|
|
|
|
Iterate nodes of HKEY_USERS and access your specific application keys.
This will get you to each user's "current user" keys.
Any sufficiently gross incompetence is nearly indistinguishable from malice.
|
|
|
|