|
Hey Friends
I have a combo box on a dialog box
I have handle of Main Window & of Combo Box as well.
Now i need to send a Up Arrow Key / Down Arrow Key to the above combobox/main window
tried
SendMessage(cr_MainWindow,WM_KEYDOWN,VK_UP,0);
SendMessage(cr_Combo,WM_KEYDOWN,VK_UP,0);
However it seems i am missing something.
Need help.
Regards
|
|
|
|
|
What are trying to accomplish...? And what is missing?
- NS -
|
|
|
|
|
Hi
I am trying to change vista theme
I open Theme settings & then try to change the vista theme by clicking down arrow to go to some other theme
if i use ccombobox::selectstring
it does'nt works & it seems it needs down arrow key or up arrow key to change theme.
so i am trying to send up arrow or down arrow key to combo box in theme settings
Regards
|
|
|
|
|
vikrant kpr wrote: SendMessage(cr_MainWindow,WM_KEYDOWN,VK_UP,0);
SendMessage(cr_Combo,WM_KEYDOWN,VK_UP,0);
Are these messsages being received by the application?
"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
|
|
|
|
|
no idea whether it receives or not
do u think that the syntax/way is correct?
I am trying to change vista theme
I open Theme settings & then try to change the vista theme by clicking down arrow to go to some other theme
if i use ccombobox::selectstring
it does'nt works & it seems it needs down arrow key or up arrow key to change theme.
so i am trying to send up arrow or down arrow key to combo box in theme settings
Regards
|
|
|
|
|
vikrant kpr wrote: do u think that the syntax/way is correct?
No.
You've completely ignored the LPARAM when sendig the WM_KEYDOWN message.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
vikrant kpr wrote: no idea whether it receives or not
Then how do you know if the problem is with the way you are sending the message, or the way the message is being received? Knowing that much would eliminate 50% of the possibilities.
"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
|
|
|
|
|
How to programatically change the User Locale?
In the NLS documentation it is mentioned that it is not possible, is there any way around for this?
Thanks!
|
|
|
|
|
a.mulay wrote: How to programatically change the User Locale?
How about setlocale() ?
"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
|
|
|
|
|
Thanks but this is not enough.
setLocale() is specific to the current program, I need to modify User Local which we modify through the Control Panel --> Regional and Language Options --> Regional Settings.
One way I found out is modifying the registry at the following location HKEY_CURRENT_USER --> Control Panel --> International --> Locale
But I need an elegent solution.
|
|
|
|
|
a.mulay wrote: setLocale() is specific to the current program...
It helps to specify all of your requirements up front.
"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
|
|
|
|
|
|
hi,
I have a msflexgrid with 2 columns and 25 rows(all with data in it) in my dialog.i'm also having a edit box in the same dialog above the flex grid.now wat i want is..if i type a name or a letter in the edit box the mouse pointer should go to that row that contains the name.
for example if i hav 2 colums(name and rollno)in msflexgrid
if i type "A" in the edit box,thn the mouse cursor should go to the row where that name column contains first letter as "A".Is there any function for getting the mouse pointer to our flexgrid?
Anybody please help mi in this regard.
Thanks in advance,
Saravana..
|
|
|
|
|
iam not sure, weather you can take your mouse pointer or current focus to the required cell, but you can select the required cell and also set its color.
if you are stuck up in searching the item, then,
you have to initialise the loop and search every item, and see if any letter has the starting digit A (for example).
any more guidance required?
you are welcome.
good luck.
--------------------------------------------
Suggestion to the members:
Please prefix your main thread subject with [SOLVED] if it is solved.
thanks.
chandu.
|
|
|
|
|
How create MFC toolbar with png icons ?
|
|
|
|
|
There is no way other than loading the png s and then convert them to a (device-dependent) CBitmap, I fear.
Let's think the unthinkable, let's do the undoable, let's prepare to grapple with the ineffable itself, and see if we may not eff it after all. Douglas Adams, "Dirk Gently's Holistic Detective Agency"
|
|
|
|
|
Do you want to make a toolbar with image?
|
|
|
|
|
I want make toolbar with png image (with alpha transparency) on button's.
|
|
|
|
|
You can read png files and then convert to CBitmap for use on the toolbars.
|
|
|
|
|
_Tiranox_ wrote: toolbar with png image (with alpha transparency)
Thats probably not possible. At least not out of the box.
Here[^] are some buttons allowing transparency.
And here[^] is an example of a toolbar with background-bitmap.
Let's think the unthinkable, let's do the undoable, let's prepare to grapple with the ineffable itself, and see if we may not eff it after all. Douglas Adams, "Dirk Gently's Holistic Detective Agency"
|
|
|
|
|
|
Hello Friends,
I am using WIN32 Dialog based Application. And in that I am using combo box. But not able to add the string in the combo box.
the Code I use to set the text in dialog box in as follows
case WM_INITDIALOG:
TCHAR *ValueName = new TCHAR[20];
wcscpy(ValueName,L"Gaurang ");
hCombo = GetDlgItem(hWndDlg,IDC_COMBO1);
SendDlgItemMessage(hWndDlg,IDC_COMBO1,(UINT)CB_ADDSTRING,(WPARAM)0,(LPARAM)L"Gaurang");
dError = GetLastError();
LRESULT lr = SendMessage(hCombo,(UINT)CB_ADDSTRING,(WPARAM)0,(LPARAM)L"ValueName");
dError = GetLastError();
break;
When I use the above line of code to set the Text in combo box it gives me the 1460 error code which says "This operation returned because the timeout period expired"
-- modified at 6:55 Monday 29th October, 2007
|
|
|
|
|
Are you sure that combobox is created with the same ID?
Also can you do this from anyother event than WM_INITDIALOG? I mean any WM_LBUTTONDOWN?
- NS -
|
|
|
|
|
Hi,
When I use the above code in some Button even then I am getting Error code as 5.
I.e.
case WM_COMMAND:
if (LOWORD(wParam) == IDOK)
{
SendMessage(GetDlgItem(hWndDlg,IDC_COMBO1),(UINT)CB_ADDSTRING,(WPARAM)0,(LPARAM)L"ValueName");
dError = GetLastError(); //dError = 5; which mean Access denied
}
|
|
|
|
|
I have tried it.
It is working fine...
What is the return value of the SendMessage?
- NS -
|
|
|
|