|
The WM_CTLCOLOR message is used in 16-bit versions of Windows to change the color scheme of list boxes, the list boxes of combo boxes, button controls, edit controls, static controls, message boxes, and dialog boxes.
If an application processes this message, it returns a handle to a brush. The system uses the brush to paint the background of the control
=WM_CTLCOLOR
In classwizard WM_CTLCOLOR will appear as "=WM_CTLCOLOR"
|
|
|
|
|
This has to do with subclassing of controls. I really can't elaborate that much on the topic because I have used it only once and I hardly remember it, but go to MSDN and search for subclassing.
// Afterall, I realized that even my comment lines have bugs
|
|
|
|
|
WM_CTLCOLOR is the Windows message sent to the parent of a control.
MFC allows the control itself to handle some messages that are actually sent to its parent. This is called message reflection, and WM_CTLCOLOR is one of these messages. If you handle WM_CTLCOLOR in a particular window (eg. myWindow ), then you handle a message sent from one of myWindow 's children. If you handle =WM_CTLCOLOR , you handle a message that was sent from myWindow to its parent.
I hope this is clear enough to understand
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
your descprition is clear enough for me to understand.thank you!
gucy
|
|
|
|
|
You're welcome
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
my regular dll is dynamicly linked to my application.the regular dll is built using the dynamic_link library version of mfc while the application is built using the static_link library version of mfc.
when i call AfxGetInstanceHandle() in my regular dll.it caused severe error.
then i rebuild my application using dynamic_link library version of mfc.it is ok.
i wonder if i must use dynamic_link library of mfc in my application when the
application calls a regular dll.
gucy
|
|
|
|
|
not necessarily. It could be std itself. Check /MD, /MT compiler flags.
|
|
|
|
|
hi everybody
i used int system("...") function to execute a command .now i don't know if it is possible to read the result of the command and store it somewhere.
reading the line using cin is impossible before that execution terminated.
if it is possible using ShellExecute please help me.
thank you.
|
|
|
|
|
The output in command prompt can be redirected to a file this way:
app.exe > outfile.txt
Parse the file to get the output. I hope this helps.
// Afterall, I realized that even my comment lines have bugs
|
|
|
|
|
simple and complete !
thank you .
i always said ,you codeproject guys rock!
|
|
|
|
|
Hi folks,
I have a problem with my application.
I'd like to debug a program with an Graphical User Interface with some buttons,Edit bix etc...
This project call a Dll, where inside it there is a COM object with its methods and interface, it's placed in another project.
so,I register this component with Component Service (Control Panel/dministrator tools/Component Service.
When I tried to debug my GUI, happens that the new Visual Studio application is loaded but unfortunatly appear only an assembly windows and in a workspace windows only a DllHost.exe.
After that the VS assembly windows is complete blocked and the complete application crashed.
Someone,do you know how to debug component out of process or can tell me where I make a mistake?
Thanks in advance for your answers..
Andrea
|
|
|
|
|
Hi !
I got the problem with subject:
For document backup application there is a driver i use,
this is a virtual printer. When a user prints to this printer,
it must see a window with some information. All work well if this is a single user environment, but in Terminal Services user don't see a window,
because a driver has a SYSTEM user, not that user on some terminal session,
that's why window is always shown on server.
How i can fix this problem ?
Best regards, Stas
|
|
|
|
|
I have a development question. Does anyone know how can we read and retrieve the data from the History.dat file by using a dll. I am sure everyone knows that History.dat is the file where Netscape stores the URL History. The problem is I don't know the exact format of History.dat .
Quick response is highly appriciated.
|
|
|
|
|
Hi Friends
I m facing some problem in VC++ .
1. When I click first time tree node and press show graph button than its ok as and when I select another node from the tree it clear the graphs.
2 My project is like this ...
.........................|
CLEFTVIEW..........| CTEXTVIEW derived from CVIEW
Derived from.........|_____________________________________
CTREEVIEW..........|
.........................| CCOLORVIEW derived from CVIEW
.........................|
I want the dc.TextOut ( name of the tree node ) on the CTEXTVIEW while selecting any node of the TREE VIEW
if any one wants that code i will send to his/her mail id
I m very much confused.....
Regds
Vipin Bokariya
|
|
|
|
|
I know the simple and easy way on how to create a context help file. For each dialog resource I just have to add the ID of the dialog (actually the ID created by makehelp) to the rtf file. The problem is that I have a dialog which I use over and over but its contents are different depending on the menu (or the button) that calls it. Therefore, I have different help topics that need to be associated with the dialog. The problem is that the dialog has only one ID and I don't know how to associate it with different topics.
For example I have a button called "Category" and when I click it a dialog pops up with a bunch of data in it. The idea is that if I hit F1, the "Category" help topic will appear on the screen.
I have another button called "Items" and when I click it the same dialog that I used for "Category" pops up but this time it contains another set of data. Therefore, F1 should display the "Items" help topic.
The problem is that the dialog has a unique ID which I can't pass to the help file because I can associate this ID only with one topic. Any suggestions please?
// Afterall I realized that even my comment lines have bugs
|
|
|
|
|
Use CDialog::SetHelpID() to set different help IDs based on the data you are showing.
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
Interesting! I missed that. Thank you very much, I will try that.
// Afterall, I realized that even my comment lines have bugs
|
|
|
|
|
I am trying to develop an FTP Explorer but i am getting problems while setting the current directory on FTP. I m using MFC's classes for this.
CFtpConnection, CFtpFileFind etc. The function which i am using for setting directory is in CFtpFileFind. Can any one figure out whats the problem.
Thanks in Advance
|
|
|
|
|
|
|
Thanks
|
|
|
|
|
I have windows XP and I cannot call BIOS to control the cursors X and Y position in text mode. Is there any other way I can conrol the X and Y without calling BIOS?
|
|
|
|
|
|
Hi all, I need some help. I'm trying to draw to a device that does not really have a device. The resolution for this device is 204x196. An application that someone else did takes all the positions of the objects/texts and multiplies them by a factor. Unfortunatly, with this factor, I cannot get text to line up as I can on the screen and the printer. He is using a factor of 2.12, but this does not equate to one inch on the screen to one inch on the new device and to one inch on the printer. Actually, 2.18 equates to one inch. (This factor does create fonts in the correct position.)
What I was thinking was to do one of the following:
- Use the SetWindowExt/SetViewportExt -- didn't work...
- Create a expansion of one above that will allow perfact scaling then get the bit map and shrink it down.
- Use the ScaleViewportExtEx and just magnify it up to the proper scale. I cannot seem to get this to work as advertised.
So, any help that you guys can give would be greatly appericated.
Thanks
Larry
|
|
|
|
|
Some thoughts would be to do one of the following:
Figure out why the ScaleViewportExt is not working.
Do double buffer drawing and simply do a StretchBlt rather than a BitBlt when drawing to your scaled device. This approach doesn't always look very good, though.
onwards and upwards...
|
|
|
|