|
dear all,
how can i display value of variables of sdk datatypes like DWORD, LPTSTR... in a message box
thanx
|
|
|
|
|
convert into string first then you can display anything!!!!! as far as i know..
cheers..
Himanshu
|
|
|
|
|
I want to manipulate the camera (connected to my computer) such as capturing video stream for cam chat, or video conferencing for further... So that I must know how to use, to control,... the camera throught the camera's driver. Please show me the way to start.
Thanks in advance !
aTpnT
|
|
|
|
|
There are examples for this in the DirectX SDK (amongst the DirectShow examples)
--
Help me! I'm turning into a grapefruit!
|
|
|
|
|
I think your reply is so useful to me. Thanks so much, 'benjymous'!
aTpnT
|
|
|
|
|
Hi All,
I would like to initialize a char array to hold a path retrieved from a registry key. If I used _MAXPATH constant from stdlib.h like this .... TCHAR MyPath[_MAXPATH], would this ensure that the array will be large enough? Even on 98, XP, NT?
Thanks
Paul
|
|
|
|
|
Never trust your inputs, especially when the source is the registry. Any user could go change your data to something longer than MAX_PATH , which would overrun your buffer, and we all know that only leads to Bad Things.
Call RegQueryValueEx() with NULL and 0 as the buffer and size respectively, and you'll get back the exact size of the value in bytes. Alloc a buffer of that size, and you'll always have a big-enough buffer. Check the type as well, make sure it's REG_SZ like you expect.
--Mike--
I'm bored... Episode I bored.
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Thanks Mike,
I knew there had to be a way.;)
Paul
|
|
|
|
|
I would not stick to it. As someone says, never trust your inputs - that's the first reason, second reason is, that this will hardcode the _MAX_PATH to your buffers forever. And now it might be that these 260 chars is enough, but will it be enough next year?
|
|
|
|
|
Hi,
I am currently undertaking a project a requires the development of a Windows based application. I have some experiance in C++ coding but up to now all the programs I have coded have been command prompt run applications.
Just wondering if anyone knew of any good books that would get me started in learning how to program Windows applications. I have looked but there seems a vast amount out there. I am thinking I would rather use the MFC libarys rather than making direct calls to the Windows API itself. Good idea??
Any recommendations would be greatly appreciated
Thanks in advance
|
|
|
|
|
Without MFC
http://www.amazon.co.uk/exec/obidos/ASIN/157231995X/ref=sr_aps_books_1_1/202-2181440-5510268
With MFC
http://www.amazon.co.uk/exec/obidos/ASIN/1572316950/ref=pd_sim_b_dp/202-2181440-5510268
Two of the best programming books for Windows as far as I know. They also double as great weightlifting training because of the size of them
|
|
|
|
|
Hi,
how can I be sure to include all needed DLLs with my packages? I'm using Depends but it shows a bunch of DLLs, such as Kernel or GDI and others. Some of them are probably already on the user's system but what I need to know if which one to include and where to install them (directly in the installation path or system32) ???
Thanks!
---------------
Tired of Spam? Introducing InboxShield® for Microsoft® Outlook®
http://www.edovia.com
|
|
|
|
|
if you have an MFC app, then any of the dll's named mfcXXX.dll you will need to redistrib. Also msvcrtXXX.dll. If you have any C++ that touches the Standard Library, then you will probably need msvcpp60.dll (I am assuming you are using VC6, and the STL that comes with it, if you are using STLPort's STL then use their lib)
For other stuff, you'll have top track that down. For example if you are using DirectShow in your app, then there are redistribs with that (don't know what they are).
Likewise for other stuff like ADO, et al...
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
|
|
|
|
|
I'm using STL and ATL 7.0...
---------------
Tired of Spam? Introducing InboxShield® for Microsoft® Outlook®
http://www.edovia.com
|
|
|
|
|
OK well you should be OK. Be warned that I do NOT have VC7 and have not used it, so there could be other issues, different libs, etc. With ATL 3, depending on how you built your project, you also had to distribute the ATL.dll and there was a different version for Win9x OS vs. NT OS. Don't know if this is still the case.
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
|
|
|
|
|
|
Can any one tell me how to get to the selected text in an edit/richedit control (or any control having text that could be highlighted) of a foreground window from my own application? What about accessing a selected text in IE browser? One can see such use in Microsoft Boolshelf -- highlight any word in any window and then click on the QuickShelf icon in the system tray to get the meaning of the word! Tomasz Sowinski in the VC++ message board mentioned earlier using a combination of (1) calling the WIN32 API GETFOREGROUNDWINDOW to get a handle to the window and (2) sending the EM_GETSEL window message to get a pointer to the selected text. But I am not sure if this limits only to the case when the foreground window is itself a edit/richedit control.
Would appreciate very much any answers to these questions!
Gene Yu - gene4yu@yahoo.com
|
|
|
|
|
hello, I wants attach an application that I board create with a Word document or pdf,in way:whene I click on the document my application start in first.
|
|
|
|
|
:-Oi guess you will have to write something into ergistry so that your application runs whenever the word is opened or cleicked to open any document.
i don't have a clue how to do it? just in case maybe you are smart enuf to proceed if there is an idea i am writing this here. I am not sure whether this will work or not. but i guess it should.
cheers..
Himanshu
|
|
|
|
|
I tracked it down to:
BOOL CWnd::GetWindowPlacement(WINDOWPLACEMENT* lpwndpl) const
{
ASSERT(::IsWindow(m_hWnd));
lpwndpl->length = sizeof(WINDOWPLACEMENT);
return ::GetWindowPlacement(m_hWnd, lpwndpl);
}
and its at the assert that its unhappy.
I did get a non-null pointer imageDisplay that I used:
CImageDisplay* imageDisplay =m_imageDisplayVector[0];
imageDisplay->GetWindowPlacement(&wp);
Thanks
Appreciate your help,
ns
|
|
|
|
|
What is m_imageDisplayVector[0] ?? is it a valid ptr?
Where do you initialize it and what is it's value?
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
My GetActiveView is returniung a null pointer. Maybe thius is because I dont have an active view? When I run the app, it pops up with one CFormView in it which I was assuming is the so called active view> Am I right? Or do I have to do something to make a view active?
Appreciate your help,
ns
|
|
|
|
|
I had a way of getting the pView pointer but its not working anymore. I posted on anotehr thread. What I would like is to get a fresh sample or pointer on how to get to the view class members from the mainframe. Its a CFormView based MDI project with only 1 doc and only 1 view at this stage.....
Appreciate your help,
ns
|
|
|
|
|
hi,
i am poking aroung at a tabcntl, and i was wondering if theres a way to attach an individual dialog resource to each tabcntl tab?
seems like the easiest way for me to edit my tabs would be this way.
can it be done?
todo....
:: insert inpirational text here ::
|
|
|
|
|
You may want to check this[^] out.
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|