|
Thanks, but I have already gone through that page on the way to Crypto.
Raymond
|
|
|
|
|
HI Masters!
I'm writing a program that shows a short video clip to user in a seperate window than the main one. but they make TWO button on taskbar, while I don't like so. I'm using pure Win32 API ...
Thnx!
|
|
|
|
|
How about creating the second window as a child of the first one by specifying the WS_CHILD style!!!
« Superman »
|
|
|
|
|
From MSDN:
Managing Taskbar Buttons
The Shell creates a button on the taskbar whenever an application creates a window that isn't owned. To ensure that the window button is placed on the taskbar, create an unowned window with the WS_EX_APPWINDOW extended style. To prevent the window button from being placed on the taskbar, create the unowned window with the WS_EX_TOOLWINDOW extended style. As an alternative, you can create a hidden window and make this hidden window the owner of your visible window
|
|
|
|
|
I am writing an application that communicates with an external device. I need to copy a CString (TCHAR*) to a multibyte string buffer (char*) - the catch is I need the code to be able to compile with UNICODE on or off. Basically I need a function that can copy either a WCHAR* or char* to a char*.
Currently I have:
CString szVal = _T("Some User Input String");
char* Buf;
size_t BufLen;
#ifdef UNICODE
wcstombs_s(&szBufLen, NULL, NULL, szVal, _TRUNCATE);
szBuf = new char[szBufLen];
wcstombs_s(&szBufLen, szBuf, szBufLen, szVal, _TRUNCATE);
#else
szBuf = new char[szVal.GetLength() + 1];
strcpy(szBuf, szVal);
#endif
delete [] szBuf;
The above works, but I would prefer not having to use the preprocessor directives if posssible.
The function _tcscpy will not convert from WCHAR to char when needed. I know I can easily write my own overloaded function, but I was hoping there was already a function defined.
|
|
|
|
|
x87Bliss wrote: but I was hoping there was already a function defined.
Well while you were hoping, I was searching.[^]
led mike
|
|
|
|
|
Thanks. Sorry, I apparently am not good at searching; I could only find the functions for WCHAR and char, not TCHAR. Those macros are perfect.
|
|
|
|
|
|
Hi Masters!
I've got to use a dialog box WITHOUT titlebar as the main window in my app. Also the application has NOT any icon into it (don't ask me WHY!).
Now when it runs, its button on the taskbar has no text as a title and no icon on it (It's realy ugly now!).
Can any one help me PLS? ...
modified on Tuesday, June 10, 2008 2:24 PM
|
|
|
|
|
Hi...
Rather than using WITHOUT titlebar, just try to set BorderStyle = NULL.
It will show icon & title in taskbar...
Good Luck...
Jagdish Bhimbha
S/W Engineer
|
|
|
|
|
How can I hook the message when file create or delete??
|
|
|
|
|
Do you mean: FindFirstChangeNotification, FindNextChangeNotification, FindCloseChangeNotification?
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
almost like that
but it's no real-time,right?
I wanna program a dll
it's a real time Hook to watch if there is file 'create' or 'delete'
if there is...then I'll do...
|
|
|
|
|
It's as real time as anything above the driver level. ReadDirectoryChangesW() provides similar functionality, but unless used with overlapped IO, it's a blocking call that can't be easily interrupted.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Have a look at ReadDirectoryChangesW() .
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
I got a demo about ReadDirectoryChangesW() that's what I want!~~
thank you
and
thanks all
|
|
|
|
|
|
this demo is easy but with great helpful
thanks
|
|
|
|
|
I gald it was helpful for you.
|
|
|
|
|
i still have a question
i wanna rewrite a Dialog project and try to use those funtions
when i use CCriticalSection and i include the <afxmt.h>
some functions and variables can't be seen in a Thread function
it shows that
error C2065: 'USES_CONVERSION' : undeclared identifier
error C2065: 'ReadDirectoryChangesW' : undeclared identifier
error C2065: 'm_list' : undeclared identifier
error C2227: left of '->InsertItem' must point to class/struct/union
error C2227: left of '->GetItemCount' must point to class/struct/union
error C2227: left of '->SetItemText' must point to class/struct/union
How can i deal with it ??
And why ??
|
|
|
|
|
Did you include Header files WinBase.h Windows.h ?
|
|
|
|
|
no
but i tried include windows.h and winbase.h
still have two error
error C2065: 'USES_CONVERSION' : undeclared identifier
error C2065: 'ReadDirectoryChangesW' : undeclared identifier
should i include other head file or something??
thank you
|
|
|
|
|
I can use of these files without any header file (Im using of Visual Sudio 2008) but what was your application type and whats your IDE?
|
|
|
|
|
Dialog-Based project
IDE is VC 6.0
if i don't include <afxmt.h>
that part is all right
but there is other error
error : missing ';' before identifier 'm_Sec'
error C2501: 'CCriticalSection' : missing storage-class or type specifiers
fatal error C1004: unexpected end of file found
so that makes me confused
|
|
|
|
|
last reply
i miss something
it's if i don't include afxmt.h
|
|
|
|