|
i have parent window (CDlg-derived) and 2 child windows, that hold same position inside parent dialog. i need programmaticaly activate one or another child window.
i used BringWindowToTop - to change z-order of child windows, but it doesnt work.
what should i do?
|
|
|
|
|
Use
LRESULT Dlg::OnActivateWindow1(WPARAM, LPARAM)
{
Window1.ShowWindow(SW_SHOW);
Window2.ShowWindow(SW_HIDE);
return 0;
}
LRESULT Dlg::OnActivateWindow2(WPARAM, LPARAM)
{
Window2.ShowWindow(SW_SHOW);
Window1.ShowWindow(SW_HIDE);
return 0;
}
|
|
|
|
|
this wont work, because i need both child windows visible at the same time - they have different HRGN.
|
|
|
|
|
Overlapping Windows is not a good idea. You could use one big window and set later
the region which includes the shapes of both windows. This approach will give
You full freedom over the shape.
|
|
|
|
|
i think its too complicated, because this region are already combined from others regions
and that other regions are made from bitmap with transparency zones.
maybe anyone knows how this algorithm realized in CTabCtrl?
i need almost the same behavior (please, dont suggest to derive my class from CTabCtrl )
|
|
|
|
|
Have you tried SetWindowPos ?
modified 12-Sep-18 21:01pm.
|
|
|
|
|
yes, i've tried - doesnt work too
|
|
|
|
|
After re-installation of Win NT on my PC,I noted that there are 4 options.
System start-up
1) Normal set-up
2) VGA Mode
3) Normal set-up
4) VGA Mode
I know there is a file to change n delete the start-up options, what is the filename and where ??
pls help
|
|
|
|
|
Should be in your boot.ini off of your system drive.
Rob
|
|
|
|
|
Sorry everyone this project is just really getting to me... I have to compute the check book and keep updating the charges....and then apply the charges at the end... What is the best way to do this? I'm just confused and where I'm supposed ot put it?
Thanks in advanced!!
GetSingleTransInfo (transCode, transAmount);
newBalance = 0.0;
while (transCode != 'E')
{
if (transCode == 'C')
{
ProcessCheck(transAmount, balance, currentBalance, charge);
GetSingleTransInfo (transCode, transAmount);
}
if (transCode == 'D')
{
ProcessDeposit(transAmount, balance, currentBalance);
newBalance = currentBalance + newBalance;
GetSingleTransInfo (transCode, transAmount);
}
}
PrintFinalTotals (month, newBalance);
return 0;
}
oid ProcessCheck(/*in*/ float amount, /*in*/ float balance,
/*out*/ float& currBalance, /*out*/ float& charge)
// Purpose: Deduct amount of check from balance....apply charges if balance falls below zero by
// cause of check. Apply charge if balance falls below $500.00.
// Pre:
// Post:
{
bool below500;
currBalance = balance - amount;
below500 = (currBalance < 500.00);
cout << " Check Transaction\n\n\n";
cout << fixed << setprecision (2) << endl;
cout << "Check Amount: " << amount << endl;
cout << "Current Balance: " << currBalance << endl;
cout << "Check Charge: " << CHECK_CHARGE << endl;
if (below500)
{
charge = ONE_TIME_CHARGE;
cout << "One Time Below $500.00 charge: " << charge << endl;
}
currBalance = balance - amount;
system ("pause");
system ("cls");
}
//***************************************************************************************************************
void ProcessDeposit (/*in*/ float amount, /*in*/ float balance,
/*out*/ float& currBalance)
{
currBalance = balance + amount;
cout << " Deposit Transaction\n\n\n";
cout << fixed << setprecision (2) << endl;
cout << "Deposit Amount: " << amount << endl;
cout << "Current Balance: " << currBalance << endl;
cout << "Deposit Charge: " << DEPOSIT_CHARGE << endl;
system ("pause");
system ("cls");
currBalance =
}
Autumn
|
|
|
|
|
Hi,
I want to develop an application which transfer data through telephone lines, using TAPI. Pls help. Is there any article published or a tool(with sourcecode) already available on this. If so, can anyone give me the link to it.
Kindly help.. Thanks in advance.
Regards..........
|
|
|
|
|
|
I'd like to programmatically minimize my app. while displaying a modal dialog box, without the dialog box being closed. All attempts to do this cause the modal box to be force-closed. However, the "Show Desktop" button (which calls IShellDispatch4.ToggleDesktop) can do it! How does ToggleDesktop do what it does ?
From an analysis of the messages that are sent to my main window by ToggleDesktop, I'd say it is calling ShowWindow with the SW_SHOWMINNOACTIVE parameter. So I wrote a little stand-alone app. to do exactly this. It finds the main window in my proper app., and calls ShowWindow (hWnd, SW_SHOWMINNOACTIVE), passing in the main window's HWND.
When minimized either way (ToggleDesktop or my little app.), the messages that are received by my main window are identical. The messages themselves, the order, the parameters... all is identical. And yet the behaviour is different: ToggleDesktop manages to minimze an app. without it exiting a modal state.
How ?!
TIA
|
|
|
|
|
Hi,
I am updating a content of a image control.
After setting the image if i say Invalidate() it works in 2k.But in 98 background is not been redrawn for this i have to call SetRedraw(TRUE).If i use this in 2k it doesn't work properly.
|
|
|
|
|
Have you tried Invalidate followed by UpdateWindow!
SetRedraw switches redraw on and off UpdateWindow forces a redraw
|
|
|
|
|
Yes,i had tried ,but no use...
|
|
|
|
|
as far as I'm aware the Invalidate(); ShowWindow(); combo should do it
so the only other thing i suggest is to look at their placement, if your running through code it may be somthing is causing the display to invalidate and not redraw after these calls.
This is the best I can do without seeing your code
|
|
|
|
|
If i use that combination,In 98 it erases the background.In win2k it gives some refresh problem.
|
|
|
|
|
I'm trying to launch an executable from a service using CreateProcess() but the executable never runs.
The service is running in an user account (and needs to) so can't use the LocalSystem and therefore have the 'Allow service to interact with desktop' flag set. (this solves the problem but like I said can't be used).
Help.
|
|
|
|
|
hi,
i do it like this and this works fine....
look at code snippet:
MyApp = another application name to like start
in .h
HANDLE m_hMyAppThread, m_hMyAppProcess;
in .cpp
STARTUPINFO si;
PROCESS_INFORMATION pi;
ZeroMemory(&si, sizeof(STARTUPINFO));
ZeroMemory(&pi, sizeof(PROCESS_INFORMATION));
CString strName;
strName = "C:\Progam Files\myApp.exe";
TCHAR Name[1024];
_tcscpy(Name, strName);
if(CreateProcess(NULL, Name, NULL, NULL, FALSE, ORMAL_PRIORITY_CLASS,
NULL, NULL, &si, &pi))
{
m_hMyAppThread = pi.hThread; //keep this handles for closing
m_hMyAppProcess = pi.hProcess;
}
//another function for closing
FILETIME ftCreationTime;
FILETIME ftExitTime;
FILETIME ftKernelTime;
FILETIME ftUserTime;
//GetThreadTimes not supported with win98
GetThreadTimes(m_hMyAppThread, &ftCreationTime, &ftExitTime,
&ftKernelTime, &ftUserTime);
if( ftExitTime.dwHighDateTime == 0 && ftExitTime.dwLowDateTime == 0 &&
ftCreationTime.dwHighDateTime > 0 && ftCreationTime.dwLowDateTime > 0)
{
TerminateProcess(m_hMyAppProcess, 0);
WaitForSingleObject(m_hMyAppProcess, INFINITE);
CloseHandle(m_hMyAppProcess);
CloseHandle(m_hMyAppThread);
}
Hope it helps,
Dan
|
|
|
|
|
How to create window which has context help button in title bar ? Context help style in resource editor works only on windows which has only close button. When i have window with minimize or maximize button set, this style does not display context help button Is this by design, or there is some way how to add help button to any window ?
Thanks
rrrado
|
|
|
|
|
rrrado wrote:
Is this by design, or there is some way how to add help button to any window ?
This is by design, there isn't help button in title bar if there's still minimize and close buttons.
The only case where I've seen them all together as with a dialog-based application on W2K, but the "?" button did not work.
I suppose if you want this functionality, you'll have to code it.
I hurt so bad inside
I wish you could see the world through my eyes
It stays the same
I just wanna laugh again
|
|
|
|
|
Dear MFC and .Net Gurus,
for a new project we want to make use of whatever hot technology there is around, as long as it allows us to make a sexier user interface, program faster, and be future-proof.
We have several alternatives: using MFC, using .NET or using both (is that possible?).
According to what I read here on CP, MFC is used by most of the programmers, but is there still a future for MFC, now that MS promotes .NET ?
.NET surely seems a hot new technology, but does it force you to use Managed C++ or not? Does .NET force you to wrap everything in components, DLL's, COM objects, ...?
If we now start with MFC, is it difficult to move to .NET in, let's say, 2 years? Has anyone done that already?
Is there an advantage is using both MFC and .NET at the same time (using the best of both technologies)?
And, last question, does anyone has experience with writing software that runs on both Windows and Linux? Not that it is important at this moment, but there is a slim chance that this could the case in 1 or 2 years.
Thanks anyway,
your humble developer.
Enjoy life, this is not a rehearsal !!!
|
|
|
|
|
Patje wrote:
but does it force you to use Managed C++ or not?
Yes, if you use C++. If you want to use .NET, I'd consider C# first.
Patje wrote:
And, last question, does anyone has experience with writing software that runs on both Windows and Linux? Not that it is important at this moment, but there is a slim chance that this could the case in 1 or 2 years.
You need to look into wxWindows, and forget about .NET, if not MFC.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
Christian Graus wrote:
You need to look into wxWindows, and forget about .NET, if not MFC.
Did you have a look at mono, the last time I checked they were able to do both ASP.NET and ADO.NET, what do you think of doing cross platform in .net, particularly for desktop apps, I think you have worked on some cross platform stuff sometime back.
I somehow feel that the mono effort would be much more successful than any of the earlier efforts by other vendors.
there is even a vb.net thingy in mono
regards
Kannan
|
|
|
|
|