|
Use CBS_DROPDOWNLIST style
Manish Rastogi
|
|
|
|
|
manish rastogi wrote:
Use CBS_DROPDOWNLIST style
What does this style have to do with the subject?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
|
|
|
|
|
hi,
i've got a pretty simple question about comboboxes. i want to make the combobox 'read only' so that my code can still add items to it, but the user can't add his/her own things to it. does anyone know how i can do this?
thanks in advance,
sam kline
|
|
|
|
|
It's actually one of the comobo box styles, I think it's called 'Simple dropdown'. Depending on your IDE version, there is a property somewhere for this.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
oh yeah, i see that.
thanks,
sam kline
|
|
|
|
|
Drop list is what you're looking for.
-- modified at 15:54 Sunday 19th February, 2006
|
|
|
|
|
Use CBS_DROPDOWNLIST style.
Manish Rastogi
|
|
|
|
|
hi every one,
i've been asking a question about Chris Maunder's CGridCtrl about displaying it which remains unanswered : here[^]
i hope that one of you could help me in this direction.
thanks...
TOXCCT >>> GEII power [toxcct][VisualCalc 2.24][3.0 soon...]
|
|
|
|
|
I use CButtonST Class to enhance checkbox in Dialog.
but according to the example of CButtonST ,I can't success.
who know why? thanks.forgive my poor english.
//dlg.h
CButtonST m_chkCheckbox;
//dlg.cpp
DDX_Control(pDX, IDC_CHECK, m_chkCheckbox);
BOOL CDlgDisk::OnInitDialog()
{
CDialog::OnInitDialog();
m_chkCheckbox.SetIcon(IDI_LEDON,IDI_LEDOFF);
return TRUE;
}
|
|
|
|
|
|
Hi,
How can i create a Right-Align Tree Control ?!!!
I checked Right Align Text and Right to Left Reading properties but it doesn't work and the items still insert from Left ...
Regards,
Hadi
|
|
|
|
|
I have a dialog/tree based application (VC++ 6.0 MFC) and have implemented a System Tray icon with a context menu. The main application gets all the correct notifications and does all the right things.
Now I want to change the context menu depending what the user does within the main dialog application e.g. when they select an entry from the tree displayed in the dialog, I want to add details of that entry to a popup menu off of the system tray context menu.
e.g. if the system tray menu looks something like:
Lock
Recent Entries -> Clear Entries
Minimize
Restore
Exit
when they click on "entry1", the next time they get the contect menu from the system tray, it would look like:
Lock
Recent Entries -> Clear Entries
entry1
Minimize
Restore
Exit
and so on for every item selected in the tree up to a predefined maximum.
Similarly, I want to be able to clear all these entries from the main application (just as if the user had selected the "Clear Entries" memu item above using the actual context menu).
My problem:
I can't get to this menu from the main dialog application to be able to use AppendMenu and RemoveMenu calls!
GetMenu only gets the menu associated with the main dialog application.
All help gratefully received.
|
|
|
|
|
I would have the tray menu handler construct the menu dynamically from information it retrieved from the dialog, rather than the other way around as you've described.
Software Zen: delete this;
|
|
|
|
|
I agree and I thought of doing it about 20 minutes after posting my question.
But thank you anyway for confirming what I eventually worked out and thank you for responding.
|
|
|
|
|
You're welcome .
Software Zen: delete this;
|
|
|
|
|
This now works but I have a different but related problem.
In my example above, how can I detect a left and a right mouse click on the menu item "entry1" and process them differently?
Lock
Recent Entries -> Clear Entries
entry1
Minimize
Restore
Exit
I can use flags "TPM_LEFTBUTTON | TPM_RIGHTBUTTON" in the call to TrackPopupMenu so that both left and right mouse clicks are accepted and I have used Spy++ to prove that the Windows message for WM_LBUTTONUP and WM_RBUTTONUP are generated - but I need to get the information on which button has been pressed on the menu item to the routine in my dialog application that is notified of a click on that menu item via the:
"ON_COMMAND( id, memberFxn )" and "afx_msg void memberFxn( );" statements.
Again all help gratefully received.
|
|
|
|
|
|
Is there any way to select a file in the listview in Explorer? ShellExecute seems to only work with folders...
- thanks
|
|
|
|
|
Yes, but you'll need a few calls to FindWindowEx() to find the correct SysListView32 control. Once you have a handle to the control's window, you can just send it a LVM_SETITEMSTATE message.
"The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli
|
|
|
|
|
how do i protect an activex not to replace?
|
|
|
|
|
how do i protect an activex not to replace?
|
|
|
|
|
Hello All,
I have 2 question
1-How to convert cm to pixel
2-How to convert inch to cm
Thank you
|
|
|
|
|
1 inch == 2,54 cm
number of pixels per inch depends on DPI (dots per inch)
96 DPI = 37,795275590551 pixel per cm
|
|
|
|
|
Hello Visible_Info,
To get value of picxel per inch use this function
GetDeviceCaps(hdc, LOGPIXELSX);
Number of pixels per logical inch along the screen width. In a system with multiple display monitors, this value is the same for all monitors.
GetDeviceCaps(hdc, LOGPIXELSY);
Number of pixels per logical inch along the screen height. In a system with multiple display monitors, this value is the same for all monitors.
For getting more help click here[^]
|
|
|
|
|
Hello. I was just wondering if anyone knew a simple way to find the colour of a specific pixel displayed on the screen by ANY program.
I used this program called "Macro Scheduler" which had a very simple GPC (Get Pixel Colour) command to use which returned the colour in a number of a specific pixel displayed on screen regardless of which program displayed it. Is their something similar in C++?
I'm very new to C++ but if I could get around this problem I could start on my project and learn along the way.
I also don't really care about the specific colour, like if 256 colours or whatever, I just need to find a value to distinguish between pixels displayed on MY screen.
Any help is greatly appeciated.
-- modified at 0:54 Sunday 19th February, 2006
|
|
|
|