|
Does any one know how to use the Mci32.ocx component or direct me to the documentation of the same.
regards,
Prakash.
The World is getting smaller and so are the people.
|
|
|
|
|
hello
i want to get the user info that is the information of domain name workstation and the user using the netbios api and NCB structure and name buffer structure please tell me how to use these structure in Netbios command can u give me the example
|
|
|
|
|
MSDN is full of examples. The one I am familar with is article Q118623. You can also Google the Net for tons more.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Hi!
I didn't know why did i get so many errors at compiling the source code.
I figured out that the problem is that i don't have the shell32.dll version 5.
I searched for it on the Net, but i didn't find it. From where to get it?
Thanks for your answer!
|
|
|
|
|
|
OK, but there are a lot of sdk files?
Which package do i need to download?
Thanks!
|
|
|
|
|
I have the following function
void CViewDBDlg::OnErrorAdodc1(long ErrorNumber, BSTR FAR* Description, long Scode, LPCTSTR
Source, LPCTSTR HelpFile, long HelpContext, BOOL FAR* fCancelDisplay)
{
// TODO: Add your control notification handler code here
}
I am not able to / I do not know the correct procedure to get the Description text from BSTR FAR*
Description. Please guys I need help on this immediately.
Nalini
|
|
|
|
|
use _bstr_t to deal with BSTR's
_bstr_t bstr(*Description);
now you can use the (LPCTSTR) operator on it to get a null terminated string.
CString str( (LPCTSTR) bstr );
|
|
|
|
|
Thanks a lot Paul. It works. Really apprecaite the help.
Nalini
|
|
|
|
|
How do I convert a non-wide string to wide format?
|
|
|
|
|
There are several macros for doing string conversion. In VC7 you would use CA2W(), in VC6 it is A2W()
lookup those macros in msdn and it will explain all.
|
|
|
|
|
I have been messing around with these with no luck...eg. mbstowcs and I get nothing...with T2W I get the following errors:
error C2065: '_lpa' : undeclared identifier
error C2440: '=' : cannot convert from 'char *' to 'int'
error C2065: '_convert' : undeclared identifier
what I am trying to convert is TCHAR* passed through a function to a WCHAR local variable in the function but nothing seems to work.
|
|
|
|
|
TCHAR * psz;
WCHAR * pwsz;
USES_CONVERSION; // if you are using VC++6 you need this
pwsz = T2W(psz);
|
|
|
|
|
Slight warning here: ATL 3.1 (shipped with VC 6.0) uses _alloc to allocate memory. For a large string, you can get stack overflows.
ATL 7.0 uses the heap to allocate memory for the new string.
In the general case, use mbstowcs or MultiByteToWideChar .
|
|
|
|
|
MultiByteToWideChar function will convert Char string WCHAR string and WideChartoMultiByte function does the opposite way.
|
|
|
|
|
|
|
I would like to know about hooking modal windows. Currently I am using SetWindowHookEx which could hook all toplevel windows and I could hook modal dialogs by using WH_CALLWNDPROC and WM_INITDIALOG but I could not hook other modal windows.
Expecting earliest solution.
Thanks and Regards
S.L.Rao
|
|
|
|
|
I'm the person who started the string below called "where's main() ???".
Ravi was helping me but either has given up on me or gone to bed
So, here's my question: If I create a dialog window and want to run
graphics in it continuously, where do I put my code that does the
graphics? I'm not using messages, the application is free-running.
I would guess I'm not the first person to ever wonder "Gee, I wonder
where my application goes?" but none of my 4 books tell me and no
one else has been able to tell me. Having just finished my C++ class,
this is my first and foremost question -- where does the code go now
that I'm no longer running console-only apps?
I've spent all day trying to figure this out, including numerous and
fruitless web searches. I presume the place where the application
code goes is well-defined and well-known, can someone tell me?
Thanks.
Dave
|
|
|
|
|
Well mate, i had a similar problem when i moved from dos based programing to windows type programming....
In windows you have created a dialog app, so you do need to responde to messages to get you job done effectivly, else i can only say that your code will become very inefficient.
You cant have a continouse loop waiting for the keypress by the user to terminate the application....like we did in dos programs.
the loop is there but it is called as the message loop. you can add your code in the message pump loop, but still again its inefficient.
You can setup a timer and respond to the timer every now n then. or you can handle the OnIdle event to do things that you would like to do. but you should not lock up that event,i.e return back as soon as possible.
Summury:You need to change the design of your application when making a moveing to windows.
hope i helped you someway.
regards
Prakash.
The World is getting smaller and so are the people.
|
|
|
|
|
Prakash,
Thank you very much for your suggestions. Sorry it took
so long to get back to you but I had to do some quick
reading of timers and the OnIdle event. I think one
of these will work for me and I appreciate your help.
I'm willing to change the design of my application, I
just didn't understand the need to until your reply.
Thanks again!
Dave
|
|
|
|
|
No Problem, nice to know that it helped and appreciating it.
regards.
The World is getting smaller and so are the people.
|
|
|
|
|
|
The latest book by Charles Petzold is a good starting point for Windows programs. I started with his Windows v3.1 book. It was a wonderful learning experience. I also used a few books by Herbert Schildt. They were fun!
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Hi, I'll try to help you out as it kinda seems to me everyone else hasn't really answered your question fully.
First off there's two main ways to go about programming Windows. There's the MFC and the Win32 API. MFC is Microsoft's wrapper classes around the Win32 API. MFC in a nutshell is Win32 with the details hidden from you, i.e. you use Microsoft's functions which in turn access the Win32 API.
I use MFC, so my knowledge of Win32 is vague, but in Win32 the application starts off in the WinMain() function. In MFC you can't see this, because its hidden behind the scenes. There really isn't a starting point that you can "see" in MFC. Your best bet as to understanding where an MFC app starts is by looking at the file projectname.cpp where the projectname is what you called the project. That's the first file thats used where you see any code.
Understanding the Win32 API will help you in using MFC, but its not necessary and from the little bit I've tried of Win32, there's a lot more stuff going on and takes longer to learn than MFC, I think. So I'd recommend starting off with MFC.
There's 3 different types of applications that you can make (as you've probably already seen in the wizard). Dialog based, SDI, or MDI. You should start off using the wizard and choosing either Dialog based or SDI to start off with.
There's a lot more to explain after that, but I don't want to write a book here unless I know I'm helping. I'd be happy to help you out though. Just send me a message and I'll explain more or if you really want help I could walk you through some examples over instant messenger if you wanted to.
|
|
|
|