|
That's more than a little vague - or a bunch of questions.
The open other applications for example...
Do you mean bring running applications to the foreground?
Do you mean run new programs? If so, read up on ShellExecute, or CreateProcess.
How will this be presented to the user?
A few buttons on a dialog that run hard coded programs?
Read a list of programs from shortcuts in a directory?
An editable list?
Will you extract the appropriate Icon from the executable so you can show a pretty pic to the user?
As you can see, this is multiple tasks. If you can more clearly define them, you may get help with individual ones. At the moment it looks like: "I have to write something, and I'm not even sure what it needs to do. Can you do it for me?". And that's a rapid road to being ignored.
You've asked many questions here on quite complex subjects, and even answered some. So none of the above should stretch you too far.
Good luck!
Iain.
|
|
|
|
|
Iain Clarke wrote: Do you mean run new programs? If so, read up on ShellExecute, or CreateProcess.
No
Iain Clarke wrote: Do you mean bring running applications to the foreground?
See the thing is ... lets take Control panel as an example. It has a number of program right. So when you click on any one of them, the open a specific application. Something like that.
Iain Clarke wrote: How will this be presented to the user?
I have seen this before and it looks like a SDI window with a white background and there is a number of icons within it and click on any of the icons will open the application.
Iain Clarke wrote: Read a list of programs from shortcuts in a directory?
Something like that ...
Does this help ??
Thanks for the response
Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
OK, so what's stopping you?
Using MFC, you can make an SDI application, and make the view descend from a CListCtrlView. Set it to large icon view, and you're part of the way there.
Choosing the text / icons is another challenge. Pick a directory, and use FindFirstFile etc to get all the *.exe files there? Extract the icons from each of them?
Then handle the double click / enter events to say "aha, the user has chosen one!". Then launch the application. As you say you don't want to a run a program, then I don't know what you mean by it. But I'm sure it's explainable.
Basically, just break this down into smaller parts.
First, the listview SDI app, and fill it with a couple of hardwired words / icons.
Second, get a list of the programs / thingies you care about.
Third, give them appropriate pics.
Fourth, work out how to handle enter key / double clicking on one.
Lastly, lauch the application the use picked.
Iain.
|
|
|
|
|
|
Better u use the List Control for that. That will give u a look like Desktop. And Simple use the Createprocess to create the Open the Application u want.
|
|
|
|
|
Thanks for the help / info GauranG033
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
I have a menu with a combo box as one of its item. The combo box has 4 entries. When I compile and run my application I find that the each entry in the combo box gets repeated. So my menu shows 8 combo box entries instead of 4. Why is it so?
Also while running the application in debug mode, the combo box is blank when I launch the menu. But in release mode, the first combo box entry appears as default value. I want to avoid this.
Please suggest me a solution for the above 2 problems.
|
|
|
|
|
koumodaki wrote: ...8 combo box entries instead of 4. Why is it so?
How are you adding said items? Do you happen to have any persistent data (DLGINIT ) for that combobox control in the project's .rc file?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
No I do not have DLGINIT in my .rc file.
|
|
|
|
|
I am using Win32 Dialog based Application. And I want to use the Java like Card Layout for this. How can I use this.
If you dont know about Card Layout sorry for that. Its just like playing cards. When a event is generated a new card is displayed. And one can see only one card at a time.
I.e. I Have a Dialog Box and a Menu. I want When somebody click on the menu Item, a Dialog box should appear with some new Buttons and edit box according to the Menu Item Clicked. :->
Is it possible in Win32 Dialog based application . If yes please tell me how.
Thnx in advance.
|
|
|
|
|
GauranG033 wrote: Is it possible in Win32 Dialog based application
Do Java applications running in Windows that use the card layout use Dialogs as you described? If so then it must be possible yes?
|
|
|
|
|
yes.In java you can use cardlayout in Farame or In Dialog.
In my application I just want that when user clicks on menu Item the Dialog Box should appear with Components according to the Item clicked.
|
|
|
|
|
GauranG033 wrote: I just want that when user clicks on menu Item the Dialog Box should appear with Components according to the Item clicked.
So in a menu item click event handler show the dialog. I must be missing something.
|
|
|
|
|
I have created a custom control to diaplay a rather compilcated bitmap on the main window. Now I can trap every message I need except for the WM_EXITSIZEMOVE, and this is probably the most important of them all.
I only want to resize the bitmap after the user has finished resizing the main window. I can re-create the effect by sending a message to the control from the main window, but this defeats the purpose of having a custom control in the first place.
Is there any way to detect when the parent window has completed a resize?
Waldermort
|
|
|
|
|
i've done this by waiting for a mouse button Up message. if you've received a bunch of WM_SIZE messages, then a WM_LBUTTONUP, you can assume the resize is done.
or, if you haven't received a WM_SIZE msg in X seconds, you can assume the resize has stopped.
|
|
|
|
|
Could the solution have come any easier? What can I say, it's been a long day...
Thanks for the answer
Waldermort
|
|
|
|
|
I'm probably missing something stupid, but I'm not getting any mouse messages whatsoever.
I added the window using the resource editor specifying the 'custom' window and my own registered class. The 'enabled' and 'visible' flags are both set, so why can't I recieve any input?
Waldermort
|
|
|
|
|
is any other control/window in your app doing a SetCapture ?
|
|
|
|
|
No, so far I only have a main window which does nothing except display my new custom control.
I'm currently reading the articles on "custom controls" hoping to spot something I have missed, but they are all geared towards MFC which I'm not using.
Waldermort
|
|
|
|
|
Do you have a WM_NCHITTEST handler that's indicating the cursor is in the NC area of the window?
IOW, is it a client area/non-client area issue?
WM_EXITSIZEMOVE should be sufficient if using the system resizing loop.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Yes, it was a NCHITTEST issue, I was returning the wrong value.
Nomatter what I tried, I just cannot trap the WM_EXITSIZEMOVE.
I am going to have to take Chris' approach and set a flag on a WM_SIZE event. But since I will only recieve mouse messages when the mouse is over the window I will have to use some type of timer. Luckily for me though, I have a thread running to monitor any changes required in the bitmap.
Waldermort
|
|
|
|
|
WalderMort wrote: I will have to use some type of timer.
A timer? Really? Hmmm, ok. This doesn't seem like it should be necessary if all the hittest
messages are handled properly.
Between SetCapture(), TrackMouseEvent(), and WM_MOUSELEAVE there shouldn't be issues
with the cursor moving outside the window.
Are you doing your own modal resize loop or relying on the system one?
It probably bugs you too, but timers in these situations are an extreme, last-resort,
cheesy solution IMO
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
How can i add thousand separator using CString.Format function in string ????
CString str;
str.Format("%##,##,###d",1234567} //not working in CString
result should be
12,34,567
|
|
|
|
|
Bhavesh Bagadiya wrote: How can i add thousand separator
By using GetNumberFormat() .
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
can u please give me example ??
|
|
|
|