|
Check out this article[^]
ed
~"Watch your thoughts; they become your words. Watch your words they become your actions.
Watch your actions; they become your habits. Watch your habits; they become your character.
Watch your character; it becomes your destiny."
-Frank Outlaw.
|
|
|
|
|
I dont want integrate html in my view and i dont want use a own written class derived from CView. I use the CHtmlView. This is the starting point. And i use this class for File browsing (Navigate2(pidl)).
Thx, for you comment, but this artikel was not what im locking for (or did i have some overlooked??)
|
|
|
|
|
Hi,
I've created a dll (C++) containing several functions, which are used inside an Excel-VBA-Project via dll-calls.
What I want: when the dll is loaded into memory (i.e. when one of the functions is executed first time), a general function should be executed (purpose: check licence information etc.).
Is there an event, which is triggered when the dll is loaded ?
TIA M.
|
|
|
|
|
BOOL WINAPI DllMain(
HINSTANCE hinstDLL,
DWORD fdwReason,
LPVOID lpvReserved
);
fdwReason -> DLL_PROCESS_ATTACH -> The DLL is being loaded into the virtual address space of the current process as a result of the process starting up or as a result of a call to LoadLibrary. DLLs can use this opportunity to initialize any instance data or to use the TlsAlloc function to allocate a thread local storage (TLS) index.
|
|
|
|
|
I would like to know how to pass CStatic as normal variable to member function?
When I try to do it, I will get a message
"cannot convert parameter 1 from 'class CStatic' to 'class CStatic'"!
Please help!
|
|
|
|
|
Post the code.
Why do you want to pass a CStatic variable to a member function ??
|
|
|
|
|
I have some repeatly process which will use serveral CStatic variable.
How can I make a member function to do it?
Please help!
|
|
|
|
|
Either use a pointer or a reference.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
You beat me. :P
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
(Off the top of my head guess)
CStatic might not have a copy constructor.
Try declaring the function as
void FuncX (CStatic &MyStatic);
- or -
void FuncX (const CStatic &MyStatic);
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
It's working now!
Thank you very much!
|
|
|
|
|
hi can anyone tell me
how can i get & send data to
a USB port from a VC++ application
thank you
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
You do not send data to the USB port, you send data to the device attached to the USB port.
The tigress is here
|
|
|
|
|
Logically true
I have an embeded device attached to the USB my
work is to ensure the data reach to the port rest
is the firmware developers work.
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
Communication on the USB port is made through a device driver. So, you need to get a handle to this driver (with CreateFile) and then use some IO commands (with DeviceIOControl). Normally you should have a driver with your device and the doc that goes with it.
-- modified at 8:13 Wednesday 9th November, 2005
|
|
|
|
|
Hi
I've never wrote an MDI app so this will probably sound like a silly question:
I am using Visual Studio 6. I want to write an MDI program where the documents are dialogs that I design - with buttons, lists, edit boxes, combos etc.
I have no clue how to do that. I've been searching for examples but could not find any.
I tried creating an MDI app and then desinged dialog. Using the class wizard I tried to create a class for that dialog, derived from CView. I then changes the call to the RUNTIME_CLASS macro to use my new class, but I am getting compilation error.
thanks!
|
|
|
|
|
You can create your view derived from CFormView, where you can place the controls as you do in dialogs.
|
|
|
|
|
Hi,
I am using Visual Studio 6. I want to write an MDI program where the documents are dialogs that I design - with buttons, lists, edit boxes, combos etc.
Actually, documents cannot be dialogs. Moreover this statement makes no sense. Documents are to store data that would be viewed by Views. And saying document you understand a class derived from CDocument. In other words, you might want your views contain dialog controls. It is possible though in case you have a CView derived class, you will not be able yo perform WYSIWYG. So,
you may perform dialog templates with the necessary controls on it and create the dialog object as a child control (dialog) for the views.
Or something may be done with CFormView derived classes.
--
======
Arman
|
|
|
|
|
Microsoft has done a great deal of work to help developers but
should have added a simple learning structure to it.
U can search the MSDN for and example project whose folder name
is viewex.
U will get a hint for what u need this is a simple example for
a class dervied from CFormView.
Thank you
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
I use function "MCIWndSetVolume" to adjust sound volume. And it works well for MP3. But it returns error message "device doesn't support..." for Wave and Midi. Can I adjust volume for Wave and Midi files using MCI ???
thank you for help.
|
|
|
|
|
Try using these functions instead, you can control each 'line' of the sound system WAVE, MIDI, etc. separately.
Audio Mixer Functions
The following functions are used with audio mixers.
mixerClose
mixerGetControlDetails
mixerGetDevCaps
mixerGetID
mixerGetLineControls
mixerGetLineInfo
mixerGetNumDevs
mixerMessage
mixerOpen
mixerSetControlDetails
|
|
|
|
|
Hey all, I have a little project I am messing around wiht, it just wraps up some winapi functions in c++ classes. I just changed all the std::string's to std::wstring and all my literal string have L"string" now. And UNICODE and _UNICODE are define. Anyway, everything compiles and runs. the only proplem is nothing renders. Buttons do not show and text control do not show, the only thing that shows in the scroolbars for the textarea.
Any ideas, I bet it is something simple i am missing. Hope you guy and girls have something to point me to.
Cheers
|
|
|
|
|
Well, one thing that instantly comes to my mind, is that buffer byte sizes, that were previously calculated using std::string::size , must now be calculated using std::wstring::size * sizeof(wchar_t) :
const std::string s1("non unicode");
const std::wstring s2("unicode");
const size_t bytesize1 = s1.size() * sizeof(char);
const size_t bytesize2 = s2.size() * sizeof(wchar_t); and, of course, bytesize1 != bytesize2 .
This in combination with memcpy , memset , etc. is a common trap when changing to unicode.
--
The Blog: Bits and Pieces
|
|
|
|
|
If your code always used the underlying string type's value_type , you would be always able to determine per-element size (and thus any buffer size requirements) correctly - there is no requirement that basic_string only contain narrow or wide char acter types:
typedef std::basic_string< int > IntStr;
int iValue = 1024;
IntStr isInt( &iValue );
const std::wstring s2( L"unicode" );
const std::string s1( "non unicode" );
const size_t stByteSize1 = s1.size() * sizeof( std::string::value_type );
const size_t stByteSize2 = s2.size() * sizeof( std::wstring::value_type );
const size_t stByteSize3 = isInt.size() * sizeof( IntStr::value_type ); 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! Tip for new SUV drivers: Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
Thanks Johann and James. I look for size calculation errors tonight, I beleive that may be part of the problem. As for memory functions, I am not using them currently (i'll double check though).
Thanks
|
|
|
|