|
Tab order is the Z order of the controls. From memory, I think items that appear earlier in the Z order (i.e. 'beneath' other controls) are earlier in the tab order.
You can adjust the Z order with the SetWindowPos function.
|
|
|
|
|
Yes. The tab order in the resource editor simply becomes the order in which the controls are
created. The order in which they are created is reflected in the Z order of the child windows.
So:
void CMyDialog::OnChangeTabOrder ()
{
CWnd *pWnd1 = GetDlgItem (IDC_EDIT1);
CWnd *pWnd2 = GetDlgItem (IDC_EDIT2);
pWnd1->SetWindowPos (pWnd2, 0,0,0,0, SWP_NOMOVE | SWPNOSIZE);
}
would put IDC_EDIT1 immediately after IDC_EDIT2 in the tab order. This assumes they each have the
WS_TABSTOP style set, else TAB would skip over them. WS_GROUP is something else to be careful about.
Clear?
Iain.
|
|
|
|
|
Hello, I am just wondering if Visual Studio.NET will work with Windows XP Home Edition
Thanks,
-Mike
|
|
|
|
|
|
hello,
Do you think MS released VS.NET back in 1995 ?
Ask whether it runs on win98.
Hari Krishnan
|
|
|
|
|
It won't let you do asp.net pages if you need to on home, as it can't run IIS.
|
|
|
|
|
jspano wrote:
It won't let you do asp.net pages if you need to on home
Thank Goat! How can I disable all of its other useless crap?
|
|
|
|
|
Mike Nordell wrote:
Thank Goat! How can I disable all of its other useless crap?
Like what? Vb.net?
|
|
|
|
|
Hi,
I still can not figure this out, was wondering if anyone had suggestions.
I have a modeless window and a modal window, each having their own window option that when selected bring up the corresonding window. The modal window has radio buttons on it, so when a specific reaio button is selected and ok is entered, it will display the modless window.
When I select the menu to bring up the modeless window it works fine, only opens one window or sets focus to it if it has not been created. When I select the modal window and check the appropriate radio it will display the modeless window regardless if it is created already. It will just continue to duplicate the modeless window.
Can someone help me out so that it will set focus on the open window and not diplicate it.
currently I am using this code in the OnOK method.
if (!m_pCommandOpt)
{
m_pCommandOpt = new CMainCommand(this);
if (m_pCommandOpt->Create(IDD_MAIN_TAB_DIALOG) == TRUE)
{
GetDlgItem(IDOK)->EnableWindow(FALSE);
m_pCommandOpt->ShowWindow(SW_SHOW);
}
}
else
m_pCommandOpt->SetActiveWindow();>
THANKS in advance.
|
|
|
|
|
Hi,
I have no idea, whar the clas CMainCommand is about, but nevertheless your code must fail.
You create a new insatance of this class in OnOk() so this new instance surely doesnot know anything of windows/dialogs/form created prior to its creation.
Thus Create(IDD_...) will always return true, because in the class instance of CMainCommand no flag or so is set to indicate that this dialog has been created already.
Two possible solution. Try to get the applications pointer of its CMainCommand instance, and use this pointer.
Or send/post the command to the application as if the user has selected the dialog via the menu.
Regards
G.Steudtel
|
|
|
|
|
Hi Friends,
I want to calculate the recent net connection speed through application program. Can i use Socket for this?
If you have any solution regarding this then please tell me.
Bye
Thanks
|
|
|
|
|
Correct. One solution is socket. You can do speed test via website. You can download large files and calculate the average bandwidth.
Kuphryn
|
|
|
|
|
Hi,
But how can i use the socket in this topic
can u give me some idea
Thanks
|
|
|
|
|
Hi All
can ne1 help i have a CString containing "O'Riely"
i need a way of replacing the ' with a blank space
does ne1 know the best way of doing so, im having problems
because im a bit crap
thanks
si
|
|
|
|
|
CString has a member called Replace, IIRC, that should do what you want.
--
Ian Darling
|
|
|
|
|
CString str = _T("O'Reily");
str.Replace(_T("'"), _T(" ")); Hope this helps,
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
My current project (a VC++/MFC program) needs to do a very lenghty
computation. I want to use multiple PCs running together to shorten the processing time.
Could anyone please give me some idea on how to write this program? What kind of technique I need to use, and what computer structure should I use (peer to peer, or client server)?
I really need some hints to start. Thanks a lot!!!
|
|
|
|
|
How parallelisable is the computation?
If there are lots of interdependant calculations, then you'll probably be wasting your time.
And typically, restating the algorithm differently and storing different data can assist in reducing this sort of computation - could you use eager and lazy evaluation at different points in your program to reduce the over all time taken?
I think you need to describe what your computation does in some detail before people can assist more.
--
Ian Darling
|
|
|
|
|
There are not many interdependant calculations. Actually, i need to generate a very large 2D matrix. And each element in this matrix is computed by the same algorithm.
The problem is the data source is very large (millions of images). So what I am thinking is to seperate the data source and put subsets of the data onto different PCs. So each PC can run the program at the same time to generate a small part of the big matrix. After all the small matrixes complete, the program will combine them together.
Is it a feasible way? Can anyone give me more ideas? Thanks!
|
|
|
|
|
You should ensure that the algorithms and implementation are as efficient as possible. Also look at profiling the code. I happilly use Glowcode for this www.glowcode.com[^]
Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
|
|
|
|
|
You need to use the keyword extern in front of your variable declarations in the header
file. Then declare them without the extern in one of your implementation files.
e.g.
extern HANDLE g_hAbortThreadEvent;
#include "Header.h"
...
HANDLE g_hAbortThreadEvent = NULL;
main ()
{
g_hAbortThreadEvent = CreateEvent (....);
....
DeleteObject (g_hAbortThreadEvent);
}
#include "Header.h"
...
dwWait = WaitForSingleEvent (g_hAbortThreadEvent, ...);
Make sense now? By "implementing" the variable in the header file, you were actually implementing
it in each .c file, hence the linker confusion.
Iain.
|
|
|
|
|
I've had problems mixing .C and .CPP functions in the past. Is there a good reason you can't just
rename rs232.c to rs232.cpp and compile it as a c++ file? That should hopefully get rid of your
problems. You could probably lose the "C" part of the extern, making it much simpler to keep
track of things.
Someone else may have inspiration better than mine thought.
Iain.
|
|
|
|
|
hi there
thanks for the time!
the problem i am facing is that i wanted to create a Dispatch parameter array..Once i have created a var of the type using "new", how can i create an array of a given size and be able to assign variables and vts???
here is the code:
This code throws bad memory exception after the method is invoked a couple of times )
void Spread::AddSelection(long nRow1, long nCol1, long nRow2, long nCol2)
{
DISPPARAMS DispParam;
EXCEPINFO excep;
UINT nArgErr;
DispParam1.cArgs = 4; //number of arguments
DispParam1.cNamedArgs = 0;// Number of named arguments.
DispParam1.rgdispidNamedArgs = NULL ; // Dispatch IDs of named arguments.
DispParam1.rgvarg = new VARIANTARG();
//here i create a new ptr, but how do i create an array which may have variables of different vts and make this pointer point to it?
DispParam1.rgvarg->vt = VT_ARRAY;
DispParam1.rgvarg[3].vt = VT_I4;
DispParam1.rgvarg[3].lVal = nRow1;
DispParam1.rgvarg[2].vt = VT_I4;
DispParam1.rgvarg[2].lVal = nCol1;
DispParam1.rgvarg[1].vt = VT_I4;
DispParam1.rgvarg[1].lVal = nRow2;
DispParam1.rgvarg[0].vt = VT_I4;
DispParam1.rgvarg[0].lVal = nCol2;
ISpread::Invoke(ID_AddSelection , IID_NULL , 0 , 1, &DispParam1, NULL , &excep, &nArgErr);
}
please help
thanks
regards
|
|
|
|
|
You're trying to set 4 parameters, but only allocating memory for 1. You need to allocation 4 structures, not 1:
DispParam1.rgvarg = new VARIANTARG[4]; Remember to call
delete [] DispParm1.rgvarg; after the Invoke() method call.
Hope this helps,
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
thanks a lot for this timely help!
kindest regards
safee
|
|
|
|