|
yes i tried this with my code but i'm not getting any thing.
plz help me
|
|
|
|
|
By any chance is this happening on a seperate thread?
Are you sure that the IDC_Message is a valid control ID for the control you are looking for? Are you sure that it has already been created and has a message pump pumping messages for the dialog?
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
yes i'm sure that Control ID is Correct but for "Are you sure that it has already been created and has a message pump pumping messages for the dialog?"
But How to Check the this i didn't do anything for that.
|
|
|
|
|
Use ::GetDlgItem( CTRLID ) to get an HWND for the control. Then use ::IsWindow( HWND ) to see if it is valid. Do not assume that a non-NULL HWND is always a valid one - it could be garbage, or it could refer to a destroyed control (especially if it is stored in a variable or the control is destroyed in-between the two calls).
A brute-force way to see if the control has a pump is to use ::SendMessageTimeout(...) to send a WM_NULL value to the control and see if the message is processed or if an error/timeout happens.
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
i used it like this
this->GetDlgItem(IDC_Realm)->SetWindowText("Hello");
but it snot working
where i'm doing wrong plz tell me.
bye
|
|
|
|
|
Please try the steps I gave above as demonstrated.
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
ok
when i use ::IsWindow( HWND );
then it gives me error that HWND is not a valid expression.
what to do now?
thanx
|
|
|
|
|
How to create this control I guess this "IDC_message" isnt edit control.
whitesky
|
|
|
|
|
Sir this is a Edit Control.
i have just use resource file.
make a dialog box and within it a Edit Control From Toolbox.
plz help me sir
|
|
|
|
|
HWND hWndMessage = ::GetDlgItem( m_hWnd, IDC_Message );
if( ::IsWindow( hWndMessage ) )
{
} Get It?
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
when i use this code then if condition does not satisfy and it passes the if condition.
what to do?
|
|
|
|
|
If the call to ::IsWindow(...) fails, then you are trying to refer to an incorrect window/control. You could be in the wrong dialog (or parent window), or have the wrong control ID, or just be calling the code at a point before the controls are created or after they are destroyed.
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
hello sir
i'm getting somthing.
i'm using a function EventCallbackProc() which is viop function.
in this for calling my own funciton i have made a object of the dialog class.
like this ---------- sipxmngr dlg;
and in this (calling function) i'm trying to set the text in as text box.
if i don't make a object of the class then. it give me a error
"not static member calling function"
what to do tell me
|
|
|
|
|
hello!
I am trying to devolop win32 static library. In this library there is a String table and a function 'getString' which retrieves the string.
I am calling LoadString function for which i need instance of the calling application. But whenever i define getString prototype as follow:
GetString(HINSTANCE hinst)
Compiler gives error as HINSTANCE is undecleared identifier.
I am devoloping this project without MFC control. Where i am doin wrong?
Do i need to include any header files??
plz help
Thx in advance!
|
|
|
|
|
#include <windows.h>
John
-- modified at 9:35 Tuesday 27th June, 2006
|
|
|
|
|
thx john!
I bulild the library. But the problem is that its giving me error 1814 i.e The specified resource can not be found........
I had been told that when we build .lib static library...we can not have resource file in that. IF its there we need to add .rc file along with the .lib file whenever needed.
Is it true??
|
|
|
|
|
sach!! wrote: The specified resource can not be found........
Which resouce is it talking about?
sach!! wrote: I had been told that when we build .lib static library...we can not have resource file in that.
Resources can be attached to executables (i.e.; DLL or EXE files). I've never seen this done on a static library, and I don't think you can.
Jeremy Falcon
|
|
|
|
|
Jeremy Falcon wrote: I've never seen this done on a static library, and I don't think you can.
That's correct; you really can't. .libs are basically just a .tar of .objs, meaning that there are no sections as there are in .dll or .exe-files. Resources needs to be in a special section(s) within a valid container such as a .dll, or .exe.
--
100% natural. No superstitious additives.
|
|
|
|
|
Jörgen Sigvardsson wrote: .libs are basically just a .tar of .objs
You letting some Unix-lingo slip into there, eh?
Jeremy Falcon
|
|
|
|
|
Well, I did type "zipped" first, but I figured it wouldn't be as accurate as .tar. Besides, I know you know Unix, so why not use the best means of communication?
But then again, I could've used the term "stuffed". You're a Mac user too, aren't you?
|
|
|
|
|
Jörgen Sigvardsson wrote: But then again, I could've used the term "stuffed". You're a Mac user too, aren't you?
Yeah, but then people would start looking at you funny as they do me (ok, maybe that's not the reason).
Jeremy Falcon
|
|
|
|
|
I do
this->AnimateWindow(5000, AW_BLEND);
and I got error message above, I tried to add user32.lib in linker and include winuser.h but no luck, what I've done wrong?
|
|
|
|
|
HMODULE hMod= GetModuleHandle(_T("USER32.DLL"));<br />
if (hMod!=NULL)<br />
fptr= (ANIMWINDOW)GetProcAddress(hMod, _T("AnimateWindow"));<br />
else<br />
fptr= NULL;
//In the header file declare a function as in the global section.
<br />
typedef BOOL (WINAPI* ANIMWINDOW)(HWND,DWORD,DWORD);
//And in the variables declaration of the class in the public/protected section.
<br />
ANIMWINDOW fptr;<br />
I hope this will help you.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
(pretty complicated code for me)
Compiled without any error
but how do I use it?
|
|
|
|
|
Its not part of CWnd try this out :-
::AnimateWindow(HWND hwnd,DWORD dwTime,DWORD dwFlags);
Check the Req:-
Requirements <br />
Windows NT/2000: Requires Windows 2000.<br />
Windows 95/98: Requires Windows 98.<br />
Windows CE: Unsupported.<br />
Header: Declared in winuser.h; include windows.h.<br />
Library: Use user32.lib.
Regards,
FarPointer
Blog:FARPOINTER
|
|
|
|