|
Assing an accelerator key to VL_ESCAPE, and handle (eg) IDM_VIEW_CANCELFULLSCREEN.
Or hook up WM_KEYDOWN/VK_ESCAPE...
Basically, the same way as you'd handle someone pressing the 'A' key.
Enjoy,
Iain.
ps, I'm not touching the fullscreen bit, as I know you did all that yesterday. If you can switch into fullscreen, you can switch out.
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need contract work done, give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
So how would that look like with in code.
Andrew McIntyre
|
|
|
|
|
MrMcIntyre wrote: So how would that look like with in code.
Well now that you know what the code looks like to maximize the window you should be able to figure out how to get it back to normal size.
|
|
|
|
|
Manage the use of electricity in a village (or ward)
1. Managing households in each village (data including: household owner, address, schools needed)
2. Manage the use of electricity in a month
3. Calculate the monthly electricity use of each household
4. Report payment of monthly electricity use
5. Handling violations (Interrupter, electric discharge back)

|
|
|
|
|
Uh, what a interesting project: good luck!
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
*click*
Bad Question.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
If you do get help doing this, I trust you'll make a nice donation to a programming related charity?
Iain.
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need contract work done, give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
thank you! forward to help!
|
|
|
|
|
dinh_vu_vt2005 wrote: Manage the use of electricity in a village (or ward)
I'd like the code for a program that did that. Then I could sell it to the government of Vietnam and make my fortune. 
|
|
|
|
|
Do you want any fries with that?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
In my MFC program the int 10 (ten) is treated as binary 10 (one & zero) i.e. == 2.
So when I insert any item at 10th position then it is inserted at 2nd position.
Similarly for 100th item it is inserted at 4th position.
My program is a Dialog Based Application.
m_ctlDeviceList is control variable for ListCtrl and it is set in Report View.
void CIPMDlg::OnBnClickedBrefreshdevices()
{
int field0 = 0, field1 = 0, field2 = 0, field3 = 0;
int c=0, nIndex=0;
CString ips = _T("");
for (field0 = 192; field0 <= 192; field0++)
{
for (field1 = 168; field1 <= 168; field1++)
{
for (field2 = 0; field2 <= 255; field2++)
{
for (field3 = 0; field3 <= 255; field3++)
{
ips.Format(_T("192.168.%u.%u"), field2, field3);
nIndex = m_ctlDeviceList.InsertItem(c, ips);
m_ctlDeviceList.SetItemText(nIndex, 1, _T("Testing"));
c++;
}
}
}
}
}
Why is this happening?
Future Lies in Present.
Manmohan Bishnoi
|
|
|
|
|
Manmohan29 wrote: In my MFC program the int 10 (ten) is treated as binary 10 (one & zero) i.e. == 2.
This is definitely not true.
I think the problem may be that your ListCtrl is automatically sorting the entries as you add them. So you add "192.168.0.0", "192.168.0.1" etc. Then when you insert "192.168.0.10" it will be inserted in position 2 between "192.168.0.1" and "192.168.0.2". It may be better to ensure that you format the numbers with 3 digits in every case, or turn off the auto sort feature of the ListCtrl.
|
|
|
|
|
Bull's Eye.
Thanks Richard.
can I get your email ID so that I can ask for programming help.
Future Lies in Present.
Manmohan Bishnoi
|
|
|
|
|
Manmohan29 wrote: can I get your email ID so that I can ask for programming help.
This may seem a bit radical, but you could try posting your requests for help on a forum... That way more people will see them.
Unless you're offering him money? That'd be different!
Iain.
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need contract work done, give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
Future Lies in Present.
Manmohan Bishnoi
|
|
|
|
|
Manmohan29 wrote: can I get your email ID so that I can ask for programming help.
Sorry but
1. I like to decide which questions I answer
2. You will get better and faster help through the forums
3. You could not afford my fees
good luck!
|
|
|
|
|
Thanks Richard.
Can I get your bank ID so that I can ask for financial help?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I cannot believe that is happening with this code.
You should put a breakpoint at the line with InsertItem and check the value of c .
By the way, you need to get rid of the first 2 for statements.
|
|
|
|
|
Richard MacCutchan solved my problem.
The ListCtrl was sorting the items in ascending order. I have set the Sort field to None.
Now the program just runs fine.
Future Lies in Present.
Manmohan Bishnoi
|
|
|
|
|
By the way, you need to get rid of the first 2 for statements.
My program(ping application) is just at initial stage.
The for loop initializations will be replaced when the values will be taken from the user itself.
Future Lies in Present.
Manmohan Bishnoi
|
|
|
|
|
Question :
The “Dating Game” is an IPC problem which illustrates the sorts of problems that processes
might face if they must try to blindly locate one another. The model uses two sets of processes: males
and females, and the objective is to arrange couples of one male and one female each.
It is guaranteed that:
• each process knows their own sex;
• each process knows their own process ID;
• each process cannot tell the sex of a process simply by examining its process ID; and
• there may be an arbitrary number of males and females in the system at any given moment.
A process has found a mate if they know (by say, storing it in their memory space) the process ID of
a process of the opposite sex, but also if the same condition holds for the opposing process as well.
In other words, m is the mate of f when f knows m and m knows f. At this point, they can start
chatting, sending love letters, buying each other gifts and doing all the things that couples tend to do.
All of this cannot come about without the special intervention of the dating server. The purpose of the
dating server is to find mates for the many fish in the sea. The dating server [process] is well known
by all of the processes in the system, and so consider its process ID to be a universal system constant.
Your primary job in this question will be to solve the dating game using the family of message-passing
IPC primitives: nonblocking send and blocking receive.
(a) Using the messaging system calls, you will simulate the interaction described above.
They are:
• msgget(...) which either: creates a message queue in the case of the dating server; or
identifies a queue, in the case of a male process or a female process.
• msgrcv(...), which will be used as a blocking call for this implementation. All messages will
have a nonzero message type: the unique number associated with each receiver. Messages to
be sent to the dating server will be of type 1; messages to be sent to a process with process
ID n will be of type n.
• msgsnd(...), which will be used as a nonblocking call for this implementation. All messages
sent will have a nonzero message type.
• msgctl(...), which will be used to dismantle the queue.
Your job will be to write the programs for dserver.c, male.c, and female.c, using the message-
passing primitives described above. Mated couples should pass some messages back and forth
before exiting.
Messages are sent to and received from a single queue whose key is the last 5 digits of your student
number. Be sure to update global.h before you begin!
The program dispatcher.c will create males and females at some arbitrary times. You may
modify dispatcher.c, within reason. When testing your code, we will replace dispatcher.c with
our own custom-built version that creates males and females according to our favorite distribution.
In all other aspects, dispatcher.c will be the same as the sample.
(b) [10 marks] Draw a process diagram that illustrates the interaction between the dating server, male
processes, female processes, and the dispatcher. Show any process creation, send or receive.
(c) [5 marks] An analog to the dating server exists in most systems. It is called a nameserver. Explain
what might happen in a client-server system in which there was no nameserver.
(d) [15 marks] It is possible to solve the dating game problem without messages and a dating server.
Instead, we used a shared memory space, some semaphores and two global variables. Write some
pseudocode for functions male() and female() that accomplishes this.
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
Dear Friends
I have to answer all these a,b,c,d answers can you tell how can I develop sucha IPC application.
Some hints: If anybody has come across such IPC development can you give me some hints to develop an IPC program in VC++ in C language !
Any help would be appreciated
Thanks
|
|
|
|
|
My hint: read the documentation [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi All,
I am having a requirement to set a different Color for Different Colmn for a CListCtrl. For Example.
//Insert the Columns
ptr->InsertColumn(0,L"Name",LVCFMT_LEFT,100);
ptr->InsertColumn(1,L"Age",LVCFMT_LEFT,100);
ptr->InsertColumn(2,L"Address",LVCFMT_LEFT,100);
The First Colum must be Entire Blue,
Second Column must be Red,
Thrid Column must be Green.
How can we achieve this.
please help me out.
Uday.
|
|
|
|
|
|
I want to add a splitter bar to divide the dockable pane window into 2 parts. Any idea on how to achieve this?
Actually somewhat similar to VS2008 style class view.
|
|
|
|