|
Have you looked at GetSysColor() ?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Thank you for the reply.
I called GetSysColor(); It run good.
-Freehawk
|
|
|
|
|
Great! What COLOR_xxx value did you end up using?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hi
I did as the following:
GetSysColor (COLOR_3DFACE)
I hope it can be useful for you.
-Freehawk
|
|
|
|
|
Question: It's required to make the simplified window
of preview goods. The window is consisted
of two parts - on the left it's the tree
of good's categories( only one level),on
the right side it's the list of goods co-
rresponding category.Attached to
the definite category in the tree in the list
on the right side the goods of this
category have been appeared.The window of
adding of goods is called by right click
of mouse in the right window and the window
of adding of category is called
by right click of mouse in the left window.
It's required to make the sql-scripts of
making of structure of database and for
inputing of data into database.
Igor Sidorov - 22th june 2004
|
|
|
|
|
Ok, so which part specifically of this overall design are you having trouble with?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hello,
I created a class inherited from CBitmap to add some functionality like rotation, blur and so one.
Now I need to create a function that changes the color depth of the bitmap.
I need to convert the 24 bpp color bitmap into B/W, 8, 16, 256 Colors and 16 bpp I also need a function that converts from all the above color's depths to 24 bpp bitmap, the function perform save directly.
Any ideas
thanx in advance
Enjoy.
Ouss.
|
|
|
|
|
HI,
I wana to add tool bar , i not want to design then in Editor .. bcoz its diffcult .
I wanaa use BMP. how can i use BMP image on toolbar.
thanx
n if i wanna import A Toolbar .. wt extension it has ..
it only shows icon files to import.
thanx
|
|
|
|
|
That u fnd dsgning toolbrs in th rsrc-edtr 2 dffclt & instd wanna do it mnlly snds lke a bad wy of lrning.
The toolbar is a bitmap and a part in the resorce file (*.rc). If you want to see how it works, create a simple project with a toolbar. Then open the rc-file as text (it is a textfile) and search for your toolbar ID - if you have changed it, or just the word "toolbar". You'll see that it is composed of a bmp (that you can edit with another paint application), and a TOOLBAR -resource. You'll immediately understand the syntax
|
|
|
|
|
Johan Rosengren wrote:
That u fnd dsgning toolbrs in th rsrc-edtr 2 dffclt & instd wanna do it mnlly snds lke a bad wy of lrning.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
maybe it's an option to create one in the resources and customize it later? You can add-remove buttons, set a location, change the bmp's ......
using BMP's or ICON's is easy, you can use a CImageList.
Good luck.
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
Can anyone please tell me why "C" and "C++" does not support nested functions?
|
|
|
|
|
Haven't you asked this before? What is a "nested function" -do you mean where you define a function inside a function, givinge the inner function access to the outer function local variables? Have you ever maintained such code? Then you don't need to ask
|
|
|
|
|
I have not used such a code defining function inside function. but i am eager to know why such a thing cannot be done. wht r the problems tht we come accross. does ur statement "givinge the inner function access to the outer function local variables" hold true?? I may sound silly, but i want to get it clarified.
|
|
|
|
|
Anonymous wrote:
i am eager to know why such a thing cannot be done
Of course it can be done, you just redefine the language
Anonymous wrote:
does ur statement "givinge the inner function access to the outer function local variables" hold true??
It is you asking about nested functions, I have no idea if you mean the Pascal flavour of this (slightly bizarre) concept. They give access to the local variables in the "function parent".
Why isn't this included in the C++ language definition? Who knows, I wasn't consulted - and if I had been, I had most certainly advocated against it
It leads to long and difficult-do-read functions, giving functionality that can be replaced by other constructs.
|
|
|
|
|
It does. Just put a class within another class, and hey presto - instant nested functions.
|
|
|
|
|
Probably because it is never necessary to have such a construct in C++.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fuity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
In MFC,can somebody explain me how the mapping takes place.I mean where does the info comes -list of messages?
Does it come from a database?
I know that DECLARE_MESSAGE_MAP() creates 3 entries.
One of which is structure of array which consists of eventsid and functions call.
|
|
|
|
|
hello blacktiger
mapping of messages happens in the message map (im not trying to be smart it really does )
DECLARE_MESSAGE_MAP is only half the story
in your cpp file there is something like this
BEGIN_MESSAGE_MAP(FxMarginsDlg, VDialog)
//{{AFX_MSG_MAP(FxMarginsDlg)
ON_BN_CLICKED(IDC_BUTTON_CLOSE, OnButtonClose)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
this is the message map. Entries are added by the Wizard in Visual Studio or you can edit it manually.
In this example the control with ID IDC_BUTTON_CLOSE is mapped to function OnButtonClose
Your best bet in understading how this works is to insert a command in an empty app, add a handler as above and set a breakpoint in the handler function. When the code hits the breakpoint you can look at the call stack and trace into the MFC code.
Hope this helps
|
|
|
|
|
How should I map my own events and notifications in MFC?
In my app I created a Dialog box in a SDI app where I have events in one Combo Box and Notifications in another Combo Box?
Now I wish to map events and notifications,
How should I proceed?
|
|
|
|
|
Events and notifications are really different names for the same thing. I would recomend you spend some time reading MSDN and online tutorials or a good Win32 programming book.
|
|
|
|
|
Check out this place. This might probably give some ideas.
http://www.codersource.net/mfc_tutorial_Part2.html
Thanks
Muthu
Muthukumar.V
|
|
|
|
|
hi
Wix XP SP2 brings new window's firewall and turns it on automatically. It blocks all the ports (which are not in common use like 80 and 21) and unsolicited traffic.
My software is wokring on some different port and connets to the serveral computer over the local network as well to the web server. So if either the source machine or the destination machine is XP SP2 it prompts the user for allowing the traffic.
I dont want this dialog box. In some cases software is required to do the work silently without any user interaction. But this XP SP2 does not denys to do so.
In the tech articles its mentioned that one can add the name of the application or the port it is using in the exception list which firewall ingnores during the traffic control if the the "Dont' Allow Exception" on the General tab is not checked.
So now I want to add my application name programmatically in this exception list. And when my work is over I would like to delete it from the list.
Can some one tell me the APIs to achieve this?
__________________
Vaibhav...
|
|
|
|
|
What's the use of a firewall if it can be bypassed programmatically? Can't you instuct your users that they must allow the traffic explicitly. I for one would be very, very... annoyed is a too weak word - by a program that silently circumvented my firewall...
|
|
|
|
|
Actually the scenario is some thing like this...
A user will run my software to migrate some settings of his PC to the other PC he has. He will be the Adminstrator for that other PC. Software pushes some destination agent to accomplish the work. The destination agen runs on the destination machine and migrates the necessary settings.
Again let me tell you that the user context in which this agent will run on the destination machine would be the Administrator of that destination machine. And I belive an adminstrator can change the firewall settings programmatically also.
I dont want the user to go explicitely on the remote destination machine and set the firewall settings.
I guess now the picutre is pretty clear..
--------------
Vaibhav...
|
|
|
|