I've managed to actually add tooltips to my controls now. Any ideas how i tie these to keyboard keypresses? I can't find any information on this.
There are inbuilt dialogs in MFC that do what I'm trying to achieve, but are added as a property on the resource. For example if you set a field to "Password: True" whenever you press Caps Lock within the field a tooltip (balloon style) appears at the caret position, rather than at the mouse position.
I wrote a c++ ATL dll, and now want to call it from another c++ app. What exactly do I need to do be able to call it?
In the h file for the ATL dll
STDMETHOD(MyFunction)(BSTR OutputDirectory, BSTR DlgTitle, BSTR BatchFileName, BSTR ResultsFileName, int ObjectStartNumber);
plus other functions
I tried to include this h file but got these errors:
error C2079: 'CSFilter' uses undefined class 'ATL_NO_VTABLE'
error C2239: unexpected token ':' following declaration of 'CSFilter'
error C2059: syntax error : 'public'
error C2448: '<unknown>' : function-style initializer appears to be a function definition
fatal error C1004: unexpected end of file found
Error executing cl.exe.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
Many thanks you all helped me on this thread
Everything seem that is difficulty
Let me describe again
Assume you create new Win32 Application project with select "a typical Hello Word ! application ". When you execute this project, system will show a window contain "Hello Word !" string.
I expect to replace string "Hello Word!" with value of cammand "netstat -n"
Example: replace "Hello Word !" with
"Proto Local Address Foreign Address State
TCP 127.0.0.1:1148 127.0.0.1:1149 ESTABLISHED
TCP 127.0.0.1:1149 127.0.0.1:1148 ESTABLISHED
TCP 127.0.0.1:1150 127.0.0.1:1151 ESTABLISHED"
// "/c" option - Do the command then terminate the command window
strcat(Args, " /c ");
//the application you would like to run from the command window
strcat(Args, " ");
//the parameters passed to the application being run from the command window.
Hi, i'm trying to draw EMF or WMF files in an antialiased way.
I tried GDI+, AA drawing is ok when using DrawLine or other primitives but the DrawImage doesnt produce
AA output when beeing passed a Metafile object containing a WMF or EMF
So is there a way to draw EMF/WMF files with antialias ? (with or without gdi+)
Maybe something exists in order to convert EMF/WMF to EMF+ ? (it seems gdi+ can only AA on EMF+ files)
i have five list control in report mode on my single dialog when i click one and go to second,third,fourth and five by clicking the cell of list control i want to change the color of cell of list control only where i click the particular cell of list controls,
how can i do this,reply please i will be so greatful
thank u in advance
Anything in Windows that there's not a documented interface for, you can usually accomplish through Windows subclassing.
In your case, to sketch out a solution, you would subclass the list control window, and then handle in all liklihood WM_PAINT. On that message, you would send LVM_GETITEMRECT to the list control window, and get the bounding rect of the list control cell you were interested in. Then just BitBlt whatever color you want to the hdc of the window, using the dimensions of the rect you retrieved (possibly using PATBLT for a ROP code, first setting the hdc brush to the appropriate color.) So that's the basic idea.
Actually, although I'm not sure I entirely understood you, the above solution might not work if you BitBlt to the cell and then the original WinProc writes text over it, as the textbackground color may be wrong, unless its being drawn transparent. Of course, there's SetBkMode to make the text background transparent, but I don't know how you get this to work for the hdc the original WndProc is writing to. It looks like you've got some work to do on your own, but its certainly not impossible. Also there's LVM_SETTEXTBKCOLOR, FWIW.