Click here to Skip to main content
15,889,216 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow can I use SetWindowLongPtr function in VC6 ? Pin
mesajflaviu19-Feb-11 2:39
mesajflaviu19-Feb-11 2:39 
AnswerRe: How can I use SetWindowLongPtr function in VC6 ? Pin
Richard MacCutchan19-Feb-11 2:53
mveRichard MacCutchan19-Feb-11 2:53 
AnswerRe: How can I use SetWindowLongPtr function in VC6 ? Pin
User 742933819-Feb-11 21:33
professionalUser 742933819-Feb-11 21:33 
GeneralRe: How can I use SetWindowLongPtr function in VC6 ? Pin
Richard MacCutchan19-Feb-11 21:48
mveRichard MacCutchan19-Feb-11 21:48 
QuestionRe: How can I use SetWindowLongPtr function in VC6 ? Pin
David Crow19-Feb-11 3:22
David Crow19-Feb-11 3:22 
AnswerRe: How can I use SetWindowLongPtr function in VC6 ? Pin
User 742933819-Feb-11 21:35
professionalUser 742933819-Feb-11 21:35 
AnswerRe: How can I use SetWindowLongPtr function in VC6 ? Pin
mesajflaviu20-Feb-11 7:22
mesajflaviu20-Feb-11 7:22 
Question891130 - capturing an image from a camera Pin
ilostmyid219-Feb-11 2:25
professionalilostmyid219-Feb-11 2:25 
Application A was using C.dll as an interface for camera. C.dll was and is erroneous. Sometimes it throws exceptions and causes the application to crash. Since the application is intended to be running always in the platform and is responsible for many things as well as handling cameras, we decided to use in indirect method for the application to use the camera. The plan was to separate the dll from the application. Another application got responsible for getting involved with sending the appropriate commands to the camera via the dll and in another side be in communication with the application. We call it server. The application is now a client for it. The communication between these two separate processes is established via a named pipe. I've tested this link and it works fine.
Now the problem is that after starting the camera I use the following code to capture an image:
bool CCamera::CaptureImage(LPCSTR i_lpszBMPFileName)
{
	if (m_hWnd &&
		capGrabFrameNoStop(m_hWnd) &&
		capFileSaveDIB(m_hWnd, i_lpszBMPFileName))
		return true;
	return false;
}

The m_hWnd is created with this code:
m_hWnd = capCreateCaptureWindow(m_sName, WS_CHILD|WS_CLIPSIBLINGS, 0, 0, 160, 120, i_hwndParnt, 0xffff);

i_hwndParent in both cases (before separating the application and after it) is obtained with the following code:
i_hwndParent = CreateWindow("STATIC", "parent", WS_POPUP, 0, 0, 20, 10, NULL, NULL, NULL, NULL);

Before changing the method to a client/server method, in CaptureImage everything was working fine. Both capxxx macros did their job and returned with true or false. But now, the program control remains inside them and the if statement is not evaluated until I stop the camera. After stopping the camera these macros return with true. It causes the application to remain in the CaptureImage function and never returns until the camera is stopped. I wondered what might be different in two methods. I couldn't realize why the macros don't return.
Any idea?
Thx
QuestionVISUAL C++ resource.h/rc madness mess Pin
andwan018-Feb-11 12:24
andwan018-Feb-11 12:24 
AnswerRe: VISUAL C++ resource.h/rc madness mess Pin
Hans Dietrich18-Feb-11 12:47
mentorHans Dietrich18-Feb-11 12:47 
AnswerRe: VISUAL C++ resource.h/rc madness mess Pin
Albert Holguin18-Feb-11 14:09
professionalAlbert Holguin18-Feb-11 14:09 
QuestionPlugin for activex Pin
S p k 52118-Feb-11 5:48
S p k 52118-Feb-11 5:48 
AnswerRe: Plugin for activex Pin
Luc Pattyn18-Feb-11 5:58
sitebuilderLuc Pattyn18-Feb-11 5:58 
QuestionAbout Resizing controls as per screen resolution.............. Pin
ddgalande18-Feb-11 0:22
ddgalande18-Feb-11 0:22 
AnswerRe: About Resizing controls as per screen resolution.............. Pin
ShilpiP18-Feb-11 1:09
ShilpiP18-Feb-11 1:09 
AnswerRe: About Resizing controls as per screen resolution.............. Pin
Richard MacCutchan18-Feb-11 2:48
mveRichard MacCutchan18-Feb-11 2:48 
AnswerRe: About Resizing controls as per screen resolution.............. Pin
Alan Balkany18-Feb-11 3:27
Alan Balkany18-Feb-11 3:27 
GeneralRe: About Resizing controls as per screen resolution.............. Pin
Hans Dietrich18-Feb-11 6:55
mentorHans Dietrich18-Feb-11 6:55 
GeneralRe: About Resizing controls as per screen resolution.............. Pin
Alan Balkany18-Feb-11 8:38
Alan Balkany18-Feb-11 8:38 
GeneralRe: About Resizing controls as per screen resolution.............. Pin
Hans Dietrich18-Feb-11 8:43
mentorHans Dietrich18-Feb-11 8:43 
QuestionType non-English characters at GINA / Windows logon Pin
Shashi.Shinde17-Feb-11 20:59
Shashi.Shinde17-Feb-11 20:59 
AnswerRe: Type non-English characters at GINA / Windows logon Pin
Richard MacCutchan17-Feb-11 22:05
mveRichard MacCutchan17-Feb-11 22:05 
GeneralRe: Type non-English characters at GINA / Windows logon Pin
Shashi.Shinde17-Feb-11 23:46
Shashi.Shinde17-Feb-11 23:46 
GeneralRe: Type non-English characters at GINA / Windows logon Pin
Richard MacCutchan18-Feb-11 1:29
mveRichard MacCutchan18-Feb-11 1:29 
AnswerRe: Type non-English characters at GINA / Windows logon Pin
ShilpiP18-Feb-11 5:57
ShilpiP18-Feb-11 5:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.