|
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.
|
|
|
|
|
Have any poker playing developers got anywhere with online screen scraping methods to read card / bot / player position from poker rooms? I want to write a semi auto super system - which gives me playing tips while i play - based on my own rules and poker thinking. but screen scraping, I got no idea where to start, it sounds extremely ugly and unreliable. Anyone that has got somewhere in this area I love to hear from
"Life begins at 140"
|
|
|
|
|
Sure! I did this with an online version of the Diamond Mine game to automatically solve the mine puzzles. It could scrape a bitmap and decode object positions and build an internal table and then calculate the best move to make.
You can download the source code at:
http:
<code>NO CARRIER</code>
-=- 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!)
|
|
|
|
|
Thanks for response but your link is incorrect.
I tried searching on filetransit.com but could not find it.
"Life begins at 140"
|
|
|
|
|
georgekjolly wrote: How can I get it .
Try looking in the C++/MFC articles here on Code Project. I know there are some there, also msdn.microsoft.com has them.
led mike
|
|
|
|
|
I have a button on a dialog and i would like to place an image on that button.
How is that done?
|
|
|
|
|
LCI wrote: How is that done?
By reading this.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi,
You can also use BS_BITMAP style for the button and set bitmap by sending BM_SETIMAGE message.
example:
result = SendMessage(hWnd, BM_SETIMAGE, IMAGE_BITMAP, (LPARAM)(HBITMAP)hBitmap);
Hope that helps...
Regards
|
|
|
|