|
sree_as wrote: but i want to disable
pop1->EnableWindow( FALSE );
nave
|
|
|
|
|
pop1->ShowWindow(SW_HIDE);
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
_AnShUmAn_ wrote: pop1->ShowWindow(SW_HIDE);
How could this function disables a dialog? it hides the dialog. isn't it?
nave
|
|
|
|
|
i tried
pop1->showWindow(SW_HIDE);
pop1->EnableWindow(false);
not working
some more please
sree
|
|
|
|
|
try
pop1->ModifyStyle( 0, WS_DISABLED );
nave
|
|
|
|
|
|
if you use pop1->showWindow(SW_HIDE); why use pop1->EnableWindow(false);?
you hide window and you want to disable it
whitesky
|
|
|
|
|
i mean tried one after one
|
|
|
|
|
when u called
pop1->showWindow(SW_HIDE);
did the dialog become invisible?
nave
|
|
|
|
|
|
From where did u created this dialog?
And from where( which function ) r u trying to hide/Disable it?
nave
|
|
|
|
|
in CListBox we have a Function OnSelectChange().when the selection in the list box change then i call this dailog by
writing following code
if(m_list.GetCurSel==LB_ERR)
{
}
else
{
pop1= new CPopupDlg();
pop1->Create(IDD_DIALOG1,this);
pop1->ShowWindow( SW_SHOW );
}
once i change the selection i want to disable that dialog .
|
|
|
|
|
Then where do u want to write pop1->EnableWindow( FALSE );
I thing ur getting another pointer while calling
pop1->EnableWindow( FALSE );
nave
|
|
|
|
|
when we want select another one then it will check if condition if it is true then i will keep that EnableWinbow().
but t's not working
|
|
|
|
|
try modifying the function like this
static CPopupDlg pop1;
if( 0 == pop1.m_hWnd )
{
pop1.Create(IDD_DIALOG1,this);
pop1.ShowWindow( SW_SHOW );
}
if( /*the condition*/ )
{
// Disable the dialog
pop1.EnableWindow( FALSE );
}
else
{
// enable the dialog
pop1.EnableWindow( TRUE );
}
nave
|
|
|
|
|
enable is done but disable is not working.
i think this enable also due to pop1.ShowWindow(SW_SHOW);
without pop2.EnableWindow( TRUE ) also we can get the dialog.
but without pop1.ShowWindow(SW_SHOW); not getting the dialog
|
|
|
|
|
send me the code i will check and tell
nave
|
|
|
|
|
i think you can use these functions once no
if(m_list.GetCurSel!=LB_ERR)
{
pop1= new CPopupDlg();
pop1->Create(IDD_DIALOG1,this);
}...repeat
whitesky
|
|
|
|
|
i used the same thing but not getting the desired result
|
|
|
|
|
check for return from these functions
BOOL o=EnableWindow and BOOL o=ShowWindow
if o=1 so this function is run else no
whitesky
|
|
|
|
|
Hi friends,
1.In Windows both WINAPI and CALLBACK are declared as _stdcall .
what is the exact difference between them ??
2.if the default calling convention in windows is _stdcall ,then what is the use of preceding the functions with WINAPI ??
3.Is void MyFunc() same as void _stdcall MyFunc( ) in windows??
4.What is difference between normal functions and CALLBACK functions ??
Thanks in Advance.
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
NiceNaidu wrote: Hi friends,
1.In Windows both WINAPI and CALLBACK are declared as _stdcall.
what is the exact difference between them ??
If declared as same then they are same!
NiceNaidu wrote: 2.if the default calling convention in windows is _stdcall,then what is the use of preceding the functions with WINAPI ??
3.Is void MyFunc() same as void _stdcall MyFunc() in windows??
4.What is difference between normal functions and CALLBACK functions ??
i am sorry to say that , you should consult MSDN before posting it here
"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
|
|
|
|
|
Hi Alok,
Thanks for the help.
I have searched MSDN for these before i post.But did n't get enough help.Thats the reason why i posted here.
If at all, you find any supporting links, Can u post them here.
Thanks again,
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
|
1. Nothing. They are used for different purpose - WINAPI is used for Windows API function calls, CALLBACK is used for callback functions that you define. It's purely so developers can tell the difference between what the functions are used for.
2. The default calling convention for C and C++ is cdecl , not stdcall .
3. No. The first one has the cdecl calling convention, the second is stdcall .
4. A function marked with CALLBACK uses the stdcall calling convention, rather than the usual cdecl . This means that the parameters are popped off the stack by the function, rather than the caller. For cdecl functions, the parameters are popped off the stack by the caller.
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"
|
|
|
|