|
hi,
dont use
m_client.Send("hi",strlen("hi")); //not UDP it for TCP.
m_client.Sendv(...) // may be you check MSDN for UDP.
Uday kiran
|
|
|
|
|
uday kiran janaswamy wrote: m_client.Sendv(...) // may be you check MSDN for UDP.
hi,
i know it ,but here m_client is the variable of type Cclient which i have derived from the AsynkSocket.
but in that onley send method is there i have nt found listen,recv,Senddv like methods.
|
|
|
|
|
hi
i am new to driver .
i want develop virtual printer such that
it convert that page to image file
how can i started for that
for that can i have some sample code ?
is there any code available in DDK src?
pradip
pradip patel -SE
|
|
|
|
|
Can you be more specific about convert page to image
|
|
|
|
|
Hello,
I use this fonction to close and destroy a modeless dialogbox but it crash my application :
m_Dlg* dialogbox CDialog created by new ..
if (m_Dlg!=NULL) {
m_Dlg->DestroyWindow();
delete m_Dlg;
m_Dlg=NULL;
}
Should i use realy delete after destroy ?
It works some time but it crash many time !
Thank you
AutreChien
|
|
|
|
|
NorGUI wrote: f (m_Dlg!=NULL) {
m_Dlg->DestroyWindow();
Send WM_QUIT message before deleting the Dialog instead of DestroyWindow!,
also check for existence of DialogWindow before cleaning up task!
"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
|
|
|
|
|
I'm new to VC++. WM_QUIT doc says it will quit app. Should we use it for one window?
----------------------
Mayank Thakore
Learning C++ - since 1998
They didn't print my card right; so I resigned.
|
|
|
|
|
MayankT wrote: what is the diff between WM_DESTROY and DestroyWindow?
according to MSDN DestoryWindow api also send WM_NCDESTROY to window to deactivate it!
MayankT wrote: Mayank Thakore
Learning C++ - since 1998
cool!
"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
|
|
|
|
|
MayankT wrote: WM_QUIT doc says it will quit app
A correction, it will stop message loop, not actually quit the window!. if you have put any wait function after the MessageLoop.. your window might get destroyed but your application still visible in running process list!
have a look sample app!
WinMain(....)
{
..........
GetMessage(&Msg,0,0,0)
{
}
.........
// WM_QUIT will break above loop but what about WaitForSingleObject written below!
WaitForSingleObject(...)
}
"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
|
|
|
|
|
|
are you destroying window created by some other thread? in that case DestroyWindow will not work. Did it crash in DestroyWindow or delete?
----------------------
Mayank Thakore
Learning C++ - since 1998
They didn't print my card right; so I resigned.
|
|
|
|
|
I found my problem it was that I called the from Parent Window
dlg->DestroyWindow;
and
delete dlg;
but in my class CDialog it was in
void Dlg::PostNcDestroy()
{
CDialog::PostNcDestroy();
delete this;
}
thank you it was a big mistake from me
AutreChien
|
|
|
|
|
NorGUI wrote: if (m_Dlg!=NULL) {
m_Dlg->DestroyWindow();
delete m_Dlg;
m_Dlg=NULL;
}
There should not be any problem with this code. Can you tell, where crash taking you in the code.
There must be something other , you are doing wrong.
|
|
|
|
|
It appears that the NT Security protocol is designed to allow or deny access to files in directories, depending on the security clearance of the human user. I have an application, where access would have to be be decided on, not only by human user identity, but also by means of the identity of the application used to access the data. ( e.g. a User must be stopped from opening a file via NotePad, but, may have access through a Bespoke Application) For instance, Banking Software would have to contain a lot of this. Does Anyone have any Idea or observations about this
regards
LateNightsInNewry
|
|
|
|
|
|
I'm printing this just off now, but scanning it I got the gist. It appears to be an obvious requirement that Bill gates never thought about! he seems to be pre-occupied with someone getting access to someone else's ascii file, or something that those like CIA could read from a disk they recovered.
About that,I can assure everybody that Bill has been quite successfull, in that a known local forger in my local area was set free from proceedings in such matters as providing forged passports, solely, because after two years GCHQ ( The UK Gouvernments Central Code Breaking Institute)in the UK failed to decript the man's hard disk, and the courts ran out of patience. The good news out of this is, that Encryption doe seem to work! The bad news is, it only seems to work in Microsoft ways!
LateNightsInNewry
|
|
|
|
|
I'm trying to make my code ANSI, MBCS and UNICODE compatible. All my string literals are wrapped in the _T() macro, and I use all the TCHAR functions when dealing with strings. In ANSI and MBCS my code compiles fine, but when switching to UNICODE I get compile errors. I have defined both UNICODE and _UNICODE. Here is an example:
'CreateFontA' : cannot convert parameter 14 from 'unsigned short [16]' to 'const char *'
and the function:
hfont = CreateFont(lfheight,0,0,0,800,FALSE,0,0,0,0,0,0,0,_T("Times New Roman") );
This tells me the ANSI version is trying to convert a wide char. Yet in the same file:
'wcsstr' : none of the 2 overloads can convert parameter 1 from type 'char *'
and the function:
TCHAR *idx = _tcsstr(tmp,_T("\\n"));
which tells me the functions are the unicode version.
Whats going on?
-- modified at 20:02 Thursday 24th August, 2006
|
|
|
|
|
It looks like _UNICODE is defined after the corresponding includes for CreateFont and _tcsstr.
--
The Show That Watches Back
|
|
|
|
|
I had this problem before and I found that there were two versions of the UNICODE definition. Last time I added
#ifdef _UNICODE
#ifndef UNICODE
#define UNICODE
#endif
#endif
and it worked. I did the same this time, but it's a no go. Some things are being converted, others are not. It looks like a TCHAR specific problem but I cannot find the cause.
|
|
|
|
|
I advise you to put these defines in your project's properties, and then recompile to make sure that stdafx.h et al picks it up. If the error still persists after that, I advise you to hire an exorcist...
--
From the Makers of Futurama
|
|
|
|
|
Found it. Some backstreet file had decided to not include stafx and rather include the files for itself. So my #defines were not being picked up.
|
|
|
|
|
Thats a New One, Never tried an Excorsist before, but it seems to have worked!
Let's get a new (ANSI Approved) Pragma , like
#pragma (invoke excorsist)
// This Pragma ensures that ( in the Debug Version at least
// that All Bugs will be Automatically Fixed)
Do not Forget however:
#pragma (endinvoke excorsist), or you get:
error C9999: "found end of line before closing pragma statement"
Regards
LateNightsInNewry
|
|
|
|
|
just write
#define UNICODE 1, you work will done!
"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
|
|
|
|
|
haha, I did. The trouble was I wrote it in a place where a particular file couldn't see it.
|
|
|
|
|
Help!
I'm in the process of switching an exisitng app to use comctrl version 6. In the process it broke transparent support I had for checkboxes. Static text controls still behave properly.
My main window is a CWnd and I handle the OnCtlColor call. It still allows me to change the brush of the checkbox, but not the text colour nor the transparent flag (whenever I use the transparent flag it picks black as the fill).
Any suggestions as to where I have gone astray?
Thanks!
|
|
|
|