|
Ok. Then I got the reference wrong. Thanks for your help.
|
|
|
|
|
Jun_Misugi wrote:
Then I got the reference wrong.
What reference?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Can anybody tell me how to place an icon in status bar and replace it with a new one at runtime?
|
|
|
|
|
|
Hi Masters,
I am trying to specify the output tray (output bin) for specific printer. It is quite easy to specify the input tray but I couldn't find the way to specify the output tray.
I have already look at the documentation of the printer. It says nothing about choosing the output tray programmatically. I know that I can choose the printer output tray via PCL. However, in my case, I need to use Win32 API since not all printer support PCL.
Thank you for any helps in advance
Cheers...
|
|
|
|
|
I have a program that is CAtlExeModuleT - derived. It is a dialog app, that is, it creates a dialog from CAtlExeModuleT<cmymodule>::Run() that does everything.
When I Alt+Tab through the task list, my app has a null icon (I have set the icon for the dialog). I would like to set that icon.
My first attempt was to use EnumWindows() and SetClassLongPtr() in the startup code, but that failed because my app does not have a window, only a dialog.
How can I set that icon?
Thanks very much.
N-o-R
riley dot dewiley at gmail dot com
|
|
|
|
|
This should be a general question like " how to create dialog item dynamically?" but since i am currently working with radio buttons, i choose to make specific.
The context that i am in is that i have defined a combo box with different types of information, and the combo box selection is dynamically calculated. For example, if "name" is selected, i need to draw an edit control beside the combo box.while if "sick?" is selected, two radio buttons are required to answer yes or no.
I hope i have explained it clearly. Can anybody help me to solve this problem?
Any help will be greatly appreciated.
|
|
|
|
|
If you know how many radio buttons will be needed, why not put them on the form, and show/hide them with ShowWindow ? Otherwise, you can create a new RadioButton using it's constructor.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thanks...
I have considered the idea of hiding, but it may not be suitable for this problem since the combo box will have a lot of types that require large number of radio buttons or check boxes.
Anyway, i will try the hiding method first. Thanks again~
By the way, do you know how to set cursor position in an Edit control? I tried using setsel() function, but nothing appears...
|
|
|
|
|
You need to have the number of characters before you can set the position ( i.e. if the edit box is empty, then the cursor has nowhere to go ). I'm pretty sure that setsel is the way to go.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
About the original topic again...
if i use showwindow(),how can i hide them later?
and for Edit control, which method should be used to hide them~
|
|
|
|
|
I have found the method already...thanks~
|
|
|
|
|
Sorry, I was in a meeting
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian Graus wrote:
If you know how many radio buttons will be needed, why not put them on the form, and show/hide them with ShowWindow ?
I agree. One of my applications does this, and trying to create/manage the controls at runtime would be a nightmare.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
how can I remove a button's edge...my button is flat and I want to remove the white edges around it.
|
|
|
|
|
You'll need to subclass CButton and handle its drawing.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
I'm tryingt to automate some things and I want control of another program from within my program. For example, I want my C++ program to be able to open Microsoft Excel and print some data into a cell. Or I want my program to open a database application we use and export a query into a text file. Does anyone know how to gain this kind of control of another application from within my C++ program?
Yesterday is history
Tomorrow's a mystery
Today is a gift
That's why they call it the present
Danny
|
|
|
|
|
bugDanny wrote:
I want my C++ program to be able to open Microsoft Excel and print some data into a cell.
You can do this easily with Excel Automation. See MSDN article Q178749 for an example.
bugDanny wrote:
Or I want my program to open a database application we use and export a query into a text file.
I would use ODBC (or ADO) for this. Check out these two MFC classes: CDatabase and CRecordset .
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
I am building a simple dialog box based program in Visual C++. I want to allow the user to open a picture in a picture control. If the user clicks inside the picture box, I want it to draw a small circle on the picture where the user clicked.
One problem I am having is that picture controls don't handle mouse events... that is, there are no control events listed for the picture control. How do I add a mousedown event? As you may have noticed, I am a beginner, so please give as much detail as possible.
Thanks!
|
|
|
|
|
Have you used Spy++ to verify that no messages are sent to the picture control?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
I don't have Spy++.
Isn't there some way to just add a mouse handling event to the picture control?
|
|
|
|
|
MALDATA wrote:
I don't have Spy++.
How do you know?
MALDATA wrote:
Isn't there some way to just add a mouse handling event to the picture control?
Sure, but if you don't know what messages, if any, are being sent to the control, what's the point? Even if you did add a mouse-handling function, what if it does not work?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Spy++ is not listed in the Visual Studio Tools menu, and I have to assume that's where it would live. If it's somewhere else, please let me know.
I'll see if I can wrangle a copy of spy++... outside of that, what should I do?
|
|
|
|
|
MALDATA wrote:
Spy++ is not listed in the Visual Studio Tools menu, and I have to assume that's where it would live. If it's somewhere else, please let me know.
Could it have been overlooked during installation?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
I have an old copy of VC++ 6 somewhere... I know that had Spy++ with it, I'll see if I can find that. Assuming I do, what should I do to make this work?
|
|
|
|