|
1) WS_CLIPCHILDREN appies mainly to OnEraseBkgnd(), so override it to return success.
2) Do all your drawing in OnPaint() or OnDraw().
3) Draw what you need and then exclude there regions or rects.
4) Draw background.
Beyond that, your question does not make much since.
INTP
"The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes."
Andrew W. Troelsen
|
|
|
|
|
How can I change the theme of my program? I want to change this classic gray theme and put something else...
|
|
|
|
|
Simple theme or visual style?
Don't try it, just do it!
|
|
|
|
|
I don't know, what's the difference? Tell me both if you know
|
|
|
|
|
Visual styles is the feature of xp, which enables you to change the complete design of the windows ui (e.g. the blue design or the silver design.. you know what I mean?). Themes are concerning just the color of controls and windows, sounds, icon spacings, text sizes, etc.
So if you just want to change the e.g. the title bar color to red, you can use SetSysColors.
For other settings use SystemParametersInfo.
Have a look here for more APIs: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/system_information_functions.asp[^]
Don't try it, just do it!
|
|
|
|
|
Can you please elaborate what exactly do you want to do.
What is theme?
Anil Kumar
|
|
|
|
|
How can I handle message of a class that drived from COleControl?
I added some function like WndProc(...), but program does NOT reach them!?
|
|
|
|
|
|
can anybody help!
i am creating check boxes at run time in the Statc group box.and i want if the no. of check boxes are upto 13 a scroll bar will added vertically on static group box and further check boxes will create in that group box.but i dont know how i do this
|
|
|
|
|
Use a checklist box. See CCheckListBox .
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
I have a dialog application that contains OnSize() to handle the resizing messages. I have a Window containing an activex control. When resizing the Window, the ActiveX Control fills the entire dialog Window. I dont want to fill the entire Window. Does anyone know how to control the sizing of the activex control??
Jerry
|
|
|
|
|
|
Handle WM_GETMINMAXINFO message
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
Hi everyone.
I'm coding a source filter and a demultiplexer filter for DirectShow.
When I add the filters to the graph, connect the pins and render the whole thing it still works.
But when I run the graph via IMediaControl::Run it returns S_FALSE.
The SDK says that I should use IMediaControl::GetState after Run() has failed, but GetState() does never return when I have INFINITE as timeout, else it returns an error (VFW_S_STATE_INTERMEDIATE), too.
The graph uses Push-Mode.
Is there a way I can find out what is going wrong?
Thanks for advice,
Alex
Don't try it, just do it!
|
|
|
|
|
Problem solved. It's a live source, so there are some things different from a normal pull source.
Don't try it, just do it!
|
|
|
|
|
What is the rigth method to add a Statusbar to a Dialog?
I had done this way.
CStatusBar m_StatusBar //Memeber variable
m_StatusBar->Create(this);
But whenever i call 'Invalidate' method the status bar also flickering
Is the GetClientRect retrieves the StatusBar area also?
Thanks in Advance
Ann
|
|
|
|
|
I think the status bar is flickering because it is a child of the dialog. If you invalidate the entire dialog, then the status bar comes along for the ride.
Some things I would try:
1. Invalidate only the specific client area of the dialog that does not include the status bar.
2. Adjust the client rect of your dialog to exclude the status bar.
3. Set the clip children style of the dialog, so it does not erase or repaint the area with the status bar or any other child controls.
|
|
|
|
|
Anyone knows a method which does hexadecimal to decimal conversion in the visual c++ library ??
Cheers
llp00na
|
|
|
|
|
|
Now I've checked it. Here it is:
int hexToInt(const char * hex)
{
// Expects to get ONE hex digit at the time
int result;
sscanf(hex, "%x", &result);
return result;
}
int main(int argc, char* argv[])
{
int i = hexToInt("FF"); // i becomes 255
i = hexToInt("80"); // i becomes 128
i = hexToInt("40"); // i becomes 64
i = hexToInt("0"); // i becomes 0
return 0;
}
|
|
|
|
|
thanx for the reply, i will test your suggestion and see the results.
I am trying to get colours from the html source code and convert them to RGB format.
using your method will make it easy to convert a string of the format #ffffff
as i will just devide the string into three parts where each part represents red, green, blue respectively.
My problem now is that people sometimes do not use conventional formats but instead use for example : #fff to refer to #0f0f0f, that should not be so hard to deal with. a more complicated case would be : #9999 !!! how do i now which part of the string refers to red, green, and blue !!!
llp00na
|
|
|
|
|
If you can format the string into a string containing 2+2+2 hex characters all the time, then you can use this way to get the values all at once:
int r,g,b;
// Create a test string:
char hex2[10];
strcpy(hex2, "0f05ff");
sscanf(hex2, "%02x%02x%02x", &r, &g, &b);
// Result: r == 15, g == 5, b == 255
It's tested and works.
Later
kakan
|
|
|
|
|
|
I have tested #999 and i found that IE treats it as #090909
Which is bad news for me
llp00na
|
|
|
|
|
not really.
6 hex digits : ok.
3 digits : ok (#fff = #0f0f0f)
anything else : add zeros to the right side to make 6 digits
word : use a map to find the RGB value
Cleek | Image Toolkits | Thumbnail maker
|
|
|
|