|
Hi,I am a programme-loving.But at recently programme development ,I have meet a headache problem,I search all
the MSDN and use google to search all for nothing.
Who can you help me how to enumerate Windows CE process
Thank !
|
|
|
|
|
is there any way to determine a window has standard scrollbar or scrollbar control? in other word, how to scroll a window that does not belong to my app?
|
|
|
|
|
Try sending WM_HSCROLL and WM_VSCROLL Messages to that Window
Live as if your were to die tomorrow. Learn as if you were to live forever.
-Mahatma Gandhi
|
|
|
|
|
sure, you are right
but i want to get some information about the scrollbar(range,pos etc.)
Do you know how can i do it???
thanks
|
|
|
|
|
Why don't you use GetScrollRange with the HWND of scroll bar
MSDN says
If the specified window does not have standard scroll bars or is not a scroll bar control, the GetScrollRange function copies zero to the lpMinPos and lpMaxPos parameters.
this might help
Live as if your were to die tomorrow. Learn as if you were to live forever.
-Mahatma Gandhi
|
|
|
|
|
MailMonty,
thanks for your reply,
I have tried to use GetScrollRange but nothing happened,
the min&max of the range are both zero
but i want to get the range and scroll it exactly
have you any good idea?
|
|
|
|
|
I am in the process of reorganizing my code and came across and I came across a problem, as described in the subject line of this posting.
I have many classes that have instances of other classes as member variables. So including a forward declaration doesnt help, does it? Faced with these, I had the following options:
-Include the appropriate header in the header file that contains the class definition that has a member variable that is a class instance as opposed to a pointer to the class
-Change the member variable from being a class instance to a class pointer.
I have the following questions:
1) Which approach is *better* and why?
2) If you need to include the header and the forward declaration of the class doesnt help(which is reasonable) what do you do?
For now, Im using this
#ifndef __FILE_H<br />
#include "File.h"<br />
#endif
Thanks in advance.
|
|
|
|
|
The best approach depends upon your program. Its generally easier to have the class instance rather than a pointer, as you dont then need to manage allocation/deallocation. Plus it will be a little faster as the variable will be allocated automatically with the class, as opposed to having to use the heap. I would only use a pointer if its being passed into the class (for example, a pointer to the parent)
|
|
|
|
|
Hi:
How to get the text of the button on the ctoolbarctrl?I try:CToolBarCtrl::GetButtonInfo(),but the text it returns is always empty.
TBBUTTONINFO tbinfo;
char szBuf[100];
tbinfo.cbSize = sizeof (TBBUTTONINFO);
tbinfo.dwMask =TBIF_IMAGE|TBIF_STYLE|TBIF_TEXT;
tbinfo.pszText = szBuf;
tbinfo.cchText = 100;
cTbCtrl->GetButtonInfo(pInfo->dwItemSpec,&tbinfo);//(CToolBarCtrl * cTbCtrl)
but the szBuf is always empty.How should I do?
Thanks
Benben
|
|
|
|
|
My goal is detecting USB Web-Came connection in my PC for correct video capture.
I use DirectShow for my work. I did enumerating videocapture devices and always getting identical result - Web Came is in system. Independing WebCame is plug in or plug out.
How can I do it yet?
Tav
|
|
|
|
|
I Use this Code works all the while
what problem are you having ?
IEnumMoniker *pEm;
hr = pCreateDevEnum->CreateClassEnumerator(CLSID_VideoInputDeviceCategory,&pEm, 0);
pCreateDevEnum->Release();
if (hr != NOERROR)
{
MessageBox("Sorry, you have no video capture hardware");
return FALSE;
}
pEm->Reset();
Live as if your were to die tomorrow. Learn as if you were to live forever.
-Mahatma Gandhi
|
|
|
|
|
Dear All,
I am developing an application for Windows 2000 in MFC VC++ Version 6.0. I need to set attributes (read only, hide, etc...) on a given file/folderd.Is there any Win32 API provided ?
Thanks a lot and Happy Christmas!!
Rohit
|
|
|
|
|
Try _chmod
if( _chmod( "CHMOD.C", _S_IREAD ) == -1 )
perror( "File not found\n" );
else
printf( "Mode changed to read-only\n" );
Live as if your were to die tomorrow. Learn as if you were to live forever.
-Mahatma Gandhi
|
|
|
|
|
One solution is SetFileAttributes().
Kuphryn
|
|
|
|
|
Hi,
I would like to enable / disable a NIC adapter from a user program. The driver is installed previously. Can someone point me to any function which can do that ?
I already have a working PassThru driver which to do some operations on the card.
Thanks !
Jayanta
|
|
|
|
|
hi,
Clipcursor is not working in XP.
RECT rcClip; // new area for ClipCursor
RECT rcOldClip; // previous area for ClipCursor
// Record the area in which the cursor can move.
GetClipCursor(&rcOldClip);
// Get the dimensions of the application's window.
GetWindowRect(&rcClip);
// Confine the cursor to the application's window.
ClipCursor(&rcClip);
// Process
....................
// Restore the cursor to its previous area.
ClipCursor(&rcOldClip);
whats wrong ?
regards
hari
Hari Krishnan
|
|
|
|
|
I'm a recent cs graduate and studied MFC programming as an undergrad, and I'm curious to ask what is the future of MFC with the arrival of .NET? and what about COM as well? The reason i ask is whether i should invest the time in learning .NET. Your input would be greatly appreciated.
|
|
|
|
|
hi,
there is no threat to MFC in the near future. .NET will take some time to catch up.
There are some excellent articles in the 'Interview' section of codeproject that will answer this.
Hari Krishnan
|
|
|
|
|
|
Save.cpp is a file in my VC program, but after my system's reboot which is caused by one systems' exception, this file is covert to a binary file, when I open the file, system prompt
"this file is bianry and cannot be read "
000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00…………
000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00…………
000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00…………
........
I want to know how to get back my CPP File?
Thanks!
Just do it !
|
|
|
|
|
|
|
In VC6, in the File Open dialog, use the 'Open as' dropdown list and select 'Binary'.
In VS.NET, in the File Open dialog, click on the dropdown attached to the Open button and select Open With... Select Binary Editor from the list.
In either case, this will open the file in the IDE's binary editor, which lets you change the file contents in hex. Use this to examine and correct the problems in the file.
Good luck.
Software Zen: delete this;
|
|
|
|
|
Where Coudle I Get IDE's binary editor?
Thanks
Just do it !
|
|
|
|
|
Hello all.
I am fairly new to programming with Visual C++. I am currently using version 6.0. I have done a lot of work in VB in the past, and am trying to migrate over to VC.
I am wondering if someone can point me in the right direction here. I am just tinkering around at this point. I've got an MFC program, with a listbox. I found some code and modified it for my liking. It's just simple code that searches the c:\ drive for all files and folders. If it finds a folder, it searches that folder too. It adds all of the files/folders to the listbox (m_ListBox.AddString()) is what I'm using. I'm also doing an m_ListBox.UpdateWindow() after each addition to ensure the window shows the contents correctly.
The problem I am running into is that since there are so many files on the C: drive, it takes a long time for the program to find them all. It adds the items very fast to the listbox, but what is happening is it is "locking up" the program (so to speak). Not Responding will show up on the window title, and it does not allow me to go into the listbox and click on the UP/DOWN arrows to scroll through while it is working.
In VB, I would use the function "DoEvents" and that would cause the program to let other things happen meanwhile. I am wondering how I would go about doing this in VC+?
Any pointers or hints or links to some documents that may be able to help me would be very much appreciated.
-Shultas
|
|
|
|