|
Hi All,
I have a SDI application with multiple interchange-able CFormView's. My app does not disappear from the task panel when no dialogs are opened, but when I open a dialog and switch to another app in the task panel (with Alt + Tab of course) and then switch back to my app the opened dialog doesn't have the focus any more and my app's icon from the task panel simply disappears! So I can not longer switch to my app with Alt + Tab!
I don't have this problem when opening a standard MFC dialog like CFileDialog. So the problem is with my dialogs.
I managed to set the focus on the opened dialog when switching in task panel by handling ON_ACTIVATEAPP into the dialog's window but the icon in the task panel is nowhere to be seen!
Any ideas? Thanks!
Regards,
Cosmin Unguru
|
|
|
|
|
When you create the dialogs, try to make sure they have the main application window as their parent. If they do not, they are getting the desktop as their parent, explaining perhaps your strange behavior.
|
|
|
|
|
Is it a Modal dialog box or Modeless?
Cheers,
Suresh
|
|
|
|
|
They are all modal dialog boxes
Regards,
Cosmin Unguru
|
|
|
|
|
I am looking for help how to output a chart into the arrays, all i was given was that i need to put a loop inside of a loop. The chart given is:
0 0 0 0
0 1 2 3
0 2 4 6
0 3 6 9
This is what I have so far:
<br />
#include "stdafx.h"<br />
#include "pattern.h"<br />
#include <br />
#include <br />
#include <br />
#include <br />
#include <br />
<br />
using namespace std;<br />
CWinApp TheApp;<br />
<br />
<br />
<br />
int main()<br />
{<br />
int j;<br />
int i;<br />
int test_score[4][4];<br />
<br />
for(i = 0; i < 4; i++)<br />
{<br />
for(j= 0; j < 4; j++)<br />
{<br />
test_score[i][j] = 0;<br />
cout<< test_score[i][j];<br />
}<br />
<br />
cout<<endl;<br />
}<br />
<br />
<br />
return 0;<br />
} <br />
|
|
|
|
|
Well, you have put zero in all of the array values. What do you need now?
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.
|
|
|
|
|
klutez123 wrote: all i was given was that i need to put a loop inside of a loop.
I agree.
klutez123 wrote: test_score[i][j] = 0;
cout<< test_score[i][j];
Study these two statements carefully. What does it look like they are doing? Do you see anything that would look like it would produce the "chart" you are after?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Give this a try
int test_score[4][4] = {
{0, 0, 0, 0},
{0, 1, 2, 3},
{0, 2, 4, 6},
{0, 3, 6, 9} };
...
cout << test_score[i][j] << ' ';
...
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
you need to replace the line
test_score[i][j] = 0;
with a formula that will give the chart in the answer
for example test_score[i][j] = i + j;
would give
0 1 2 3
1 2 3 4
2 3 4 5
3 4 5 6
think about it.
|
|
|
|
|
Hello, i have a problem to set new font for that list control!
I use SetFont(newfont); and the execution go to
OnSetFont(WPARAM, wParam, LPARAM lParam)
{
...
SendMessage(WM_WINDOWPOSCHANGED, 0, reinterpret_cast<lparam> (&wp));
...
}
after this execution should call
MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct)
but program newer go to MeasureItem!
Any idea how to solve this?
regards
termal
|
|
|
|
|
WM_WINDOWPOSCHANGED is a notification message sent by the system. It is unrelated to setting
the font and you shouldn't be sending the message yourself.
Why do you think MeasureItem should be called? And more importantly, WHOs MeasureItem()?
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
|
termal wrote: MeasureItem() is function to set row height in CListCtrl
Right. But this has nothing to do with setting the font and you shouldn't be posting that system
message.
If you want to redraw the control with the new font then you should invalidate it.
MeasureItem will be called automatically by the system when it needs sizes for the redraw.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
hi
I am just trying out some socket programs in Win32
I copied the code on the msdn page:
http://msdn2.microsoft.com/en-us/library/ms737593.aspx
But it is giving error: addrinfo struct is not defined.
Pls give a help.
Thanks in advance.
SYAMLAL
|
|
|
|
|
You need to include "ws2tcpip.h" (this is stated in the documentation).
|
|
|
|
|
We make future? Your answer becomes a good seed...
|
|
|
|
|
ws2tcpip.h is already included in that code.
Pls check the link in my message
Is there any .lib files that I need to link in project settings??
SYAMLAL
|
|
|
|
|
Hi syamlal.....
Try to include ws2_32.lib.......
syam
|
|
|
|
|
hi,
ws2_32.lib is already added to my project.
I think there is some other issue.
Thanks and Regards,
SYAMLAL
|
|
|
|
|
Hi All,
I have developed an HTTPS request DLL. I want to return the headers and message body to the calling application. The prototype of my DLL function is int. How can I pass the returned headers and message body ?
Please help me.
Thanks for your prompt reply.
Nikhs
Nikhil Trivedi
|
|
|
|
|
Usually it's not a big problem, just return char pointers.
Nikhil Trivedi wrote: The prototype of my DLL function is int
What do you mean? Cannot you change the function prototype, can you?
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.
|
|
|
|
|
Is there any other way except changing the function prototype ?
Thanks for your reply.
Nikhs
Nikhil Trivedi
|
|
|
|
|
Oh yes, a bit contrived yet. If you function returns a 32-bit integer then you can interpeter it as a pointer (at least on 32-bit systems...). That stated, you may arrange the two buffer pointers in a struct and return the struct address to the caller.
However, IMHO it's better to change the function prototype.
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.
|
|
|
|
|
Hi
All
i can change font of menu item but the font of Top menu items like File,Edit,Help etc is unchanged.So is there any function in which we can set font of Top menu.
Thanks and Regards
Atul Mahajan
|
|
|
|
|
Does someone nows something about how to run a program in Cygwin?
I need to study a program, but i can run it only from cygwin.
|
|
|
|