|
_AnShUmAn_ wrote: Thanks for the updation....
do you really need updation?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
codes:
CDlgBrower *dlg=new CDlgBrower;
dlg->Create(IDD_DLG_FILE);
dlg->ShowWindow(SW_SHOW);
how to judge that the dlg is destoryed?
if it didn't destroyed , show it!
else new a dialog and show it !
what to do?
Just my interest for these common things
|
|
|
|
|
Try this:
if(dlg)
{
dlg->ShowWindow (SW_SHOW);
}
else
{
dlg=new CDlgBrower();
dlg->Create(IDD_DLG_FILE,this);
dlg->ShowWindow (SW_SHOW);
}
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
u can use the IsWindow function to check whether a handle is a valid window handle.
if( IsWindow( dlg->m_hWnd ))
{
// Window exists
}
else
{
// Invalid handle
}
nave
|
|
|
|
|
xuwenq88 wrote: CDlgBrower *dlg=new CDlgBrower;
dlg->Create(IDD_DLG_FILE);
dlg->ShowWindow(SW_SHOW);
When ever your Dialog is destoyed or closed are you calling Delete on Object?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
dlg is created dynamic
Destroy it by click the close title
I dont know it was destroyed or still existed!
so I search a way to solve this problem!
Just my interest for these common things
|
|
|
|
|
Do we have any good effective WIN32 API which can tell whether my application is running on a system with a color v/s monochrome monitor attached.
A sample code snippet will be helpful.
Am using the following sample and apparently its not giving correct results always.
bool bColorMonitor = false;
// Get the display information
DEVMODE devmode;
if (::EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &devmode))
{
//If dmDisplayFlags is set to zero then monitor is colored otherwise GrayScaled.
bColorMonitor = !(0x01 & devmode.dmDisplayFlags);
}
else
{
dirTrace.Error(_T("EnumDisplaySettings() failed"));
}
|
|
|
|
|
Hello,
I need to draw 1 line and 1 bar chart on 1 plot.
I can't find a way how to do that.
I tried the following:
<br />
1 - VtChChartType2dBar<br />
3 - VtChChartType2dLine <br />
<br />
MSChart1.SetColumnCount(2);<br />
MSChart1.SetColumn(1);<br />
MSChart1.SetChartType(1);<br />
...<br />
<br />
MSChart1.SetColumn(2);<br />
MSChart1.SetChartType(3); <br />
Didn't work, it affects both series. So, both of them become lines.
I also tried this:
<br />
1 - VtChSeriesType2dBar<br />
6 - VtChSeriesType2dLine <br />
<br />
MSChart1.SetColumnCount(2);<br />
MSChart1.SetColumn(1);<br />
MSChart1.SetSeriesColumn(1);<br />
MSChart1.SetSeriesType(1);<br />
MSChart1.GetPlot().GetSeriesCollection().GetItem(1).SetSeriesType(1);<br />
...<br />
<br />
MSChart1.SetColumn(2);<br />
MSChart1.SetSeriesColumn(2);<br />
MSChart1.SetSeriesType(6);<br />
MSChart1.GetPlot().GetSeriesCollection().GetItem(2).SetSeriesType(6); <br />
No effect at all. Did I miss something or it's not possible at all?
I apprciate your help.
Regards,
Martin.
|
|
|
|
|
I have been exploring MSChart for sometime now and I have never come across the ability to have some of the chart bar and some of the chart line. I don’t think it is possible at all.
Let me know if you find differently....
Chris
|
|
|
|
|
I am an avid Visual Basic programmer and I would like to know what the advantages of using Visual C++/MFC are over Visual Basic.
For what kinds of scenarios can you not use Visual Basic?
|
|
|
|
|
gongchengshi wrote: the advantages of using Visual C++/MFC are over Visual Basic
The performance of a program in C++ code is better than in VB.
The API of Platform SDK is in C.
Visual BASIC code is sort of managed one, not able to do too much lower level tasks.
Etc ...
Maxwell Chen
|
|
|
|
|
Individual Opinion:
Visual Basic is very weak compared to VC++ in terms of functionality and interaction with the hardware. Here are a few things you can't do in VB.
Pointers = NO(C++ has this), Run on Linux/Unix = NO(C++ Runs), Talk to Hardware = NO(C++ is very rich with hardware interaction).
But if you are to create simple windows application and you need to do it fast, use VB otherwise VC++.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
gongchengshi wrote: I would like to know what the advantages of using Visual C++/MFC are over Visual Basic.
different between VB and VC is different between bottled Food and SelfMade food
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
is there a function that I can use on CString that's the same as sscanf?
I tried to:
int numArgs;
CString userInput("device, cmd, in1, in2");
CString device, cmd, input1, input2;
numArgs = sscanf(userInput,"%s %s %s %s", &device, &cmd, &input1, &input2);
i could have sworn this was possible but i get:
c:\...cpp(73) : error C2664: 'sscanf' : cannot convert parameter 1 from 'CString' to 'const char *'
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
thanks,
Kitty5
|
|
|
|
|
|
Hmmm.. _stscanf() would probably be a better idea..?
--
100% natural. No superstitious additives.
|
|
|
|
|
Michael Dunn wrote: Your build settings are set to unicode,
What are the advantages and disadvantages of using unicode settings?
Kitty5
|
|
|
|
|
Pros: you can support more languages, runs faster on NT and upwards (native strings are unicode)
Cons: Strings are represented using 16 bit characters - eats up twice as much memory as ordinary ascii strings, requires conversions back and forth if you need to read/write text files from/to other (non-unicode) apps, runs slower on win9x (you need the unicode layer).
--
100% natural. No superstitious additives.
|
|
|
|
|
This CDialog is launched from a dll called by another app. After the app is done I hide it, and the dialog stays up. Now if some other windows happen to obscure this CDialog, there is no icon in the task bar with which I can bring it up again. I have to minimize the windows that obscured it and then I can see it again. I gave the CDialog minimize/maximize buttons (though that would fix it). Any way to get around this?
thanks,
sb
|
|
|
|
|
modeless?
GetDesktopWindow()
Kuphryn
|
|
|
|
|
Hi
I need to hide some windows using ShowWindow API using 0x0 flag. Then I should show them again. But the problem is that I when I set the flag to show windows, I should set it to SW_MINIMIZE, SW_NORMAL, SW_MAXIMIZE but this causes all the windows to show in the i.e. NORMAL mode, since when I did hide them, some where Maximized and some Minimized...
What I need is to show them in the window state that they were before hiding.
Thanks
|
|
|
|
|
MohammadAmiry wrote: I need to hide some windows using ShowWindow API using 0x0 flag.
Why are you not using SW_HIDE ?
MohammadAmiry wrote: But the problem is
that I when I set the flag to show windows, I should set it to SW_MINIMIZE, SW_NORMAL, SW_MAXIMIZE...
How do you propose to set a window to both minimized and maximized?
MohammadAmiry wrote: What I need is to show them in the window state that they were before hiding.
Use IsIconic() and IsZoomed() .
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
MohammadAmiry wrote: What I need is to show them in the window state that they were before hiding.
ShowWindow(SW_SHOW);
should do.
- It's easier to make than to correct a mistake.
|
|
|
|
|
Thank you!
Worked perfect...
|
|
|
|
|
Dear all,
I'm using some GDI+ functions in my project. Is there any way to let my program start peacefully if file gdiplus.dll is not available (of course, some functionalities should be disabled)?
By other words, I want to load this dll dynamically. If file gdiplus.dll is unavailable, some functionalities will be disabled and the program should start normally.
Thanks in advance.
Regards,
|
|
|
|