|
how to set the color of theme bar?in addition,how to simply set the button color?is there a simple way to know the practical display color that RGB represents?
|
|
|
|
|
Hi friends,
Currently i am developing one graphical application. The drawing tools like Rectangle, Ellipse, Freehand are kept in a toolbar. My intention is to display the toolbar whenever the user move the mouse to top zone of the client area and hide the toolbar whenever the user move the mouse away from the topzone. I constructed toolbar using Dialog Bar. But i don't know how to place the Dialog Bar in the view window.
Please help me regarding this.
Regards,
Prakash
A Journey of thousand miles must begin with a single step.
|
|
|
|
|
How can i get & set folder acess permission under NTFS file system?
Hello World
|
|
|
|
|
Try
http://www.sysinternals.com/ntw2k/source/accessenum.shtml
Sonork 100.41263:Anthony_Yio
Life is about experiencing ...
|
|
|
|
|
Pls Explain what are network patches?
How do they occur?
Explain this with agood example.
|
|
|
|
|
Pls Explain what are network patches?
How do they occur?
Explain this with agood example.
AND 3 WORKER THREADS.PLS LET ME HOW TO EXCHANGE THE DATA BETWEEN THESE 3 WORKER THREADS.
FOR EX:THE FIRST THREAD WILL GIVE THE SECOND THREAD THE 2 NUMBERS AS ARGUEMENTS.the second thread should return the first thread the sum.
Pls help
|
|
|
|
|
ykutanoor wrote:
Pls Explain what are network patches?
I've never heard the term network patches before. In the general sense, a patch is a piece of code added to software in order to fix a bug (between two releases). You've no doubt heard of an OS patch, which could include, among other things, fixes for network-related components.
ykutanoor wrote:
AND 3 WORKER THREADS.PLS LET ME HOW TO EXCHANGE THE DATA BETWEEN THESE 3 WORKER THREADS.
FOR EX:THE FIRST THREAD WILL GIVE THE SECOND THREAD THE 2 NUMBERS AS ARGUEMENTS.the second thread should return the first thread the sum.
So what does the third thread do? In any case, I would be inclined to use PostMessage() for communication between them.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
I have a dialog with about 15 edit controls.
The controls are a subclass I've made of CEdit , CMyEdit for the matter.
2 out of the 15 CMyEdit controls don't have their OnNcPaint override called, for no apparent reason. all edit-boxes are declared the same way in the resource-editor, no special handling of any of them not in resources nor in code.
I've tried overriding OnCreate , OnNcCreate (added ON_WM_XXX ofcourse) and Create itself but none of them are ever called.
What am I missing out ?
p.s. - what I need is a 'point of intervention' during the creation/post-creation of the edit-control during which the control is already sized and positioned correctly.
|
|
|
|
|
ohadp wrote:
2 out of the 15 CMyEdit controls don't have their OnNcPaint override called, for no
You have most probably made some silly error. Check and recheck! You will want to make sure they are attached to the correct kind of variable in the h-file, and that the resource IDs don't clash.
ohadp wrote:
p.s. - what I need is a 'point of intervention' during the creation/post-creation of the edit-control during which the control is already sized and positioned correctly.
Perhaps PreSubclassWindow ?
|
|
|
|
|
I've checked all the resource-ids/etc, all looks ok.
PreSubclassWindow is interesting but problematic. The reason is that if I do my things inside
PreSubclassWindow<code> my control isn't subclassed yet, and so it's message-handlers aren't called when messages arrive :-)<br />
<br />
So I'll a little condition to the situation I was persuing earlier. What I need is an intervention-point during which the control is sized, and subclassed. Something like <code>PostSubclass , or PostCreate , or anything of that kind
|
|
|
|
|
ohadp wrote:
I've checked all the resource-ids/etc, all looks ok.
Then, you might want to tear down the project, perhaps by removing all the controls that works. Set a breakpoint in some function you know will be called in the class of the offending controls (such as PreSubclassWindow ) and verify that the controls are really subclassed.
ohadp wrote:
PreSubclassWindow is interesting but problematic. The reason is that if I do my things inside PreSubclassWindow my control isn't subclassed yet, and so it's message-handlers aren't called when messages arrive
To be sure I've not gone completely crazy (which I still won't outrule, however), I tested with a subclassed CEdit , instantiated from a resource template, mapped to a control variable of my class.
As expected, PreSubclassWindow is called after the control is created, and so you do have access to the control size and position. Of course, the handlers of the subclass aren't called before or during this call, thus the name PreSubclassWindow
Now, as PreSubclassWindow is a member of your class, you have full access to all other class members of the instance at this time of the execution, so I'm slightly baffled as to why you would need to know that the subclassing is finished - for all practical purposes, it is at this stage.
|
|
|
|
|
The deal is that during initialization, I want to trigger my version of OnWindowPosChanging .
I can fake a direct call to it from PreSubclassWindow , yes, but it's a little unorthodox so I was looking for a cleaner way to do it.
I guess that's just what I'll do then, thanks for the tips.
|
|
|
|
|
If you want a slightly cleaner architecture, put the code in a separate function and call it from both OnWindowPosChanging and PreSubclassWindow .
|
|
|
|
|
Hello Guy's,
I have in great trouble, i'm working for a image procssing project and i want to increase a pixel intensity if a perticular condition satisfies..
I have to copies of a same image only the RGB values as an BYTE array and the BITMAPINFO structure corresponding to that image. Then take each pixel of both image and compare the blue component and if the difference of the blue component is > some constant say 25 i have to increase the intensity of the new image: ... problem is i have only RGB values ... 3-BYTE for represent the pixel...
Any idea to do this.
pls help me
Thanks in advance.
Anurag Velekkattu
|
|
|
|
|
BYTE GetBValue(
DWORD rgb // RGB value
);
Hope this will help you.
|
|
|
|
|
read the iamge processing for dummis in code project about HSL color space;)
Kamyar Souri
Booria CAD/CAM Systems
www.booria.com
|
|
|
|
|
Here are one my solution about it. If you wont to get lighter color put white color otherwise black.
white -> RGB(255, 255, 255) // full light
black -> RGB(0, 0, 0) // light off
1) Make function like this:
a) For increase intensity:
int FindMax(int a, int b, int c)
{
if((double)a > (a+b+c)/3) return a;
if((double)b > (a+b+c)/3) return b;
if((double)c > (a+b+c)/3) return c;
if((double)a == (a+b+c)/3) return a; // for same color
return 255;
}
b) For decrease intensity:
int FindMin(int a, int b, int c)
{
if((double)a < (a+b+c)/3) return a;
if((double)b < (a+b+c)/3) return b;
if((double)c < (a+b+c)/3) return c;
if((double)a == (a+b+c)/3) return a;
return 0;
}
2) Make some variable int intensity = 0; // plus or minus
3) In your function put this code:
int dif;
if(intensity < 0)
{
dif = FindMin(myRGB[j][i].R, myRGB[j][i].G, myRGB[j][i].B);
if(dif > -intensity)
dif = intensity;
else
dif = -dif;
}
else
{
dif = FindMax(myRGB[j][i].R, myRGB[j][i].G, myRGB[j][i].B);
dif -= 255;
if(dif > intensity)
dif = intensity;
}
SetPixel(dc, x+j, y+i, RGB(myRGB[j][i].R+dif, myRGB[j][i].G+dif, myRGB[j][i].B+dif));
|
|
|
|
|
Hi,All. How to get Windows system Service Pack information using VC++? Thanks!
|
|
|
|
|
GetVersionEx()
OSVERSIONINFO structure will contain member szCSDVersion that indicates the latest Service Pack installed on the system.
SimasT.
|
|
|
|
|
Hi,
I am having more than one Network adapter in my machine, thru MFC Program how could i select the best adapter (highest Bandwidth) to bind?
Thanks in Advance
Rams
|
|
|
|
|
Does GetBestInterface() help? If not, there are other IP Helper functions available that may.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
I do some drawing on client area of main window, but some controls on main window covered the drawing. I have tried to use non-clipchildren style, but it doesn't work. Does anyone know how to solve the problem?
Thanks
|
|
|
|
|
I don't think this is possible in any dependable way. If you want parts of the controls transparent, you might want to investigate SetWindowRgn . Hiding the controls under some circumstances might perhaps be another alternative?
|
|
|
|
|
Hello
I write an application (MFC Dialog), when i call GetTitleBarInfo, the compiler alway error: undeclare identifier
i know this function declare in winuser.h, and i already check,
i use VC6++, SP5, instal Platform SDK
Any one can help me.
Thanks alot
|
|
|
|
|