jdx797 | 4 Oct 2009 06:25
Picon
Favicon

re: Error in atlwince.h

Hi all, I am creating a WTL mobile project, my purpose is to link it with a C++ directshow engine. It is
supposed to preview the video from the webcam. However there is something wrong when I link it with the
directshow engine, I have included my stdafx.h code and my errors below. I suspect it clashes with
<streams.h>, not too sure about that.

Warning	1	warning C4003: not enough actual parameters for macro 'SelectFont'	C:\WTL81_9127\Include\atlwince.h	288	VoWifi
Warning	2	warning C4003: not enough actual parameters for macro 'SelectFont'	C:\WTL81_9127\Include\atlwince.h	302	VoWifi
Warning	3	warning C4003: not enough actual parameters for macro 'SelectPen'	C:\WTL81_9127\Include\atlwince.h	315	VoWifi
Error	4	error C2059: syntax error : '('	C:\WTL81_9127\Include\atlwince.h	288	VoWifi
Error	5	error C2039: 'dc' : is not a member of 'WTL::CPaintDC'	C:\WTL81_9127\Include\atlwince.h	289	VoWifi
Error	6	error C2059: syntax error : '('	C:\WTL81_9127\Include\atlwince.h	302	VoWifi
Error	7	error C2039: 'CPenHandle' : is not a member of 'WTL::CPaintDC'	C:\WTL81_9127\Include\atlwince.h	305	VoWifi
Error	8	error C2146: syntax error : missing ';' before identifier 'penOld'	C:\WTL81_9127\Include\atlwince.h	305	VoWifi
Error	9	error C2039: 'penOld' : is not a member of 'WTL::CPaintDC'	C:\WTL81_9127\Include\atlwince.h	305	VoWifi
Error	10	error C2039: 'dc' : is not a member of 'WTL::CPaintDC'	C:\WTL81_9127\Include\atlwince.h	305	VoWifi
Error	11	error C2059: syntax error : '('	C:\WTL81_9127\Include\atlwince.h	315	VoWifi

my stdafx.h

#pragma once

// Change this value to use different versions
#define WINVER 0x0420
#include <atlbase.h>
#if _ATL_VER == 0x900 
#define _SECURE_ATL 1 
#endif 
#include <atlstr.h>

#define _WTL_NO_CSTRING
(Continue reading)

jacksonsamuelson | 3 Oct 2009 22:19
Picon
Favicon

CListViewCtrl: Visual Studio 2008 Wizard

Hello All,

I'm new to WTL. I used Visual Studio 2008 to generate my first WTL project. I selected a multi-threaded
application, with a 1) ToolBar, 2) Rebar, 3) Command Bar, and 4) Status Bar. I also selected a "List View" as
the "View Type".

The problem that I have is that everytime I try to add columns and populate it, I get errors. I tried looking at
the MSDN, which describes MFC and I also looked at the code, but I still can't populate the list. 

Can someone please help me and send some sample code code?
Where can I find some WTL documentation and sample code?

-Jack

------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/wtl/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/wtl/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:wtl-digest@... 
(Continue reading)

Alain Rist | 5 Oct 2009 23:16

Re: re: Error in atlwince.h

Hi,

If you #include <streams.h> first (following #defineWINVER 0x0420) you should get rid of these errors:
atlbase.h and atlwin.h undefine some poorly named macros defined in the files included by streams.h.

cheers,
AR

----- Original Message ----- 
  From: jdx797 
  To: wtl@... 
  Sent: Sunday, October 04, 2009 6:25 AM
  Subject: [wtl] re: Error in atlwince.h

    Hi all, I am creating a WTL mobile project, my purpose is to link it with a C++ directshow engine. It is
supposed to preview the video from the webcam. However there is something wrong when I link it with the
directshow engine, I have included my stdafx.h code and my errors below. I suspect it clashes with
<streams.h>, not too sure about that.

  Warning 1 warning C4003: not enough actual parameters for macro 'SelectFont'
C:\WTL81_9127\Include\atlwince.h 288 VoWifi
  Warning 2 warning C4003: not enough actual parameters for macro 'SelectFont'
C:\WTL81_9127\Include\atlwince.h 302 VoWifi
  Warning 3 warning C4003: not enough actual parameters for macro 'SelectPen'
C:\WTL81_9127\Include\atlwince.h 315 VoWifi
  Error 4 error C2059: syntax error : '(' C:\WTL81_9127\Include\atlwince.h 288 VoWifi
  Error 5 error C2039: 'dc' : is not a member of 'WTL::CPaintDC' C:\WTL81_9127\Include\atlwince.h 289 VoWifi
  Error 6 error C2059: syntax error : '(' C:\WTL81_9127\Include\atlwince.h 302 VoWifi
  Error 7 error C2039: 'CPenHandle' : is not a member of 'WTL::CPaintDC'
C:\WTL81_9127\Include\atlwince.h 305 VoWifi
(Continue reading)

Alain Rist | 6 Oct 2009 00:26

Re: CListViewCtrl: Visual Studio 2008 Wizard

Hi Jack,

The WTLExplorer sample in <WTL>\Samples\WtlExplorer operates a WTL::CListViewCtrl.

Lots of interesting articles and samples in http://www.codeproject.com/KB/wtl/

cheers,
AR

  ----- Original Message ----- 
  From: jacksonsamuelson 
  To: wtl@... 
  Sent: Saturday, October 03, 2009 10:19 PM
  Subject: [wtl] CListViewCtrl: Visual Studio 2008 Wizard

    Hello All,

  I'm new to WTL. I used Visual Studio 2008 to generate my first WTL project. I selected a multi-threaded
application, with a 1) ToolBar, 2) Rebar, 3) Command Bar, and 4) Status Bar. I also selected a "List View" as
the "View Type".

  The problem that I have is that everytime I try to add columns and populate it, I get errors. I tried looking at
the MSDN, which describes MFC and I also looked at the code, but I still can't populate the list. 

  Can someone please help me and send some sample code code?
  Where can I find some WTL documentation and sample code?

  -Jack

[Non-text portions of this message have been removed]
(Continue reading)

Jim Barry | 6 Oct 2009 12:18

Re: a bug with atldlgs.h?undeclared identifier IID_IShellLink when I use<initguid.h>

"xfpl" wrote:
> my project is OK before I #include < Initguid.h> in "stdafx.h",
> after I include initguid.h, I got the following compiler error:
[...]

You are only supposed to include Initguid.h in a single source file, so you 
mustn't include it in the project header. There is no proper documentation, 
but see the section "How does the DEFINE_GUID macro work?" at the bottom of 
the DirectShow FAQ:

http://msdn.microsoft.com/en-us/library/dd375463(VS.85).aspx

- Jim 

------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/wtl/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/wtl/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:wtl-digest@... 
(Continue reading)

Jackson Samuelson | 7 Oct 2009 20:22
Picon
Favicon

Re: CListViewCtrl: Visual Studio 2008 Wizard

That's great. Let me look at them. 
 
Thanks,
Jack

--- On Mon, 10/5/09, Alain Rist <ar@...> wrote:

From: Alain Rist <ar@...>
Subject: Re: [wtl] CListViewCtrl: Visual Studio 2008 Wizard
To: wtl@...
Date: Monday, October 5, 2009, 10:26 PM

  

Hi Jack,

The WTLExplorer sample in <WTL>\Samples\ WtlExplorer operates a WTL::CListViewCtrl.

Lots of interesting articles and samples in http://www.codeproj ect.com/KB/ wtl/

cheers,
AR

----- Original Message ----- 
From: jacksonsamuelson 
To: wtl <at> yahoogroups. com 
Sent: Saturday, October 03, 2009 10:19 PM
Subject: [wtl] CListViewCtrl: Visual Studio 2008 Wizard

Hello All,
(Continue reading)

jdx797 | 12 Oct 2009 03:17
Picon
Favicon

Re: Error in atlwince.h

Hi AR,

your solution works by include <streams.h> first! Thanks alot!!

Best Regards,

Jordan

--- In wtl@..., "Alain Rist" <ar <at> ...> wrote:
>
> Hi,
> 
> If you #include <streams.h> first (following #defineWINVER 0x0420) you should get rid of these errors:
atlbase.h and atlwin.h undefine some poorly named macros defined in the files included by streams.h.
> 
> cheers,
> AR
> 
> 
> ----- Original Message ----- 
>   From: jdx797 
>   To: wtl@... 
>   Sent: Sunday, October 04, 2009 6:25 AM
>   Subject: [wtl] re: Error in atlwince.h
> 
> 
>     Hi all, I am creating a WTL mobile project, my purpose is to link it with a C++ directshow engine. It is
supposed to preview the video from the webcam. However there is something wrong when I link it with the
directshow engine, I have included my stdafx.h code and my errors below. I suspect it clashes with
<streams.h>, not too sure about that.
(Continue reading)

imperialgeniusx | 20 Oct 2009 05:09
Picon
Favicon

CWindowImpl and dynamically created button

Hi all,
  I'm new to WTL and implementing custom controls and have been having some difficulty with what SHOULD be a
pretty straightforward thing: adding a button to a CWindowImpl and then having the button respond to
clicks and generate events. For some reason, this simply doesn't happen.

 The basic hierarchy I have is

CFrameWindowImpl
  CWindowImpl (1)
    CWindowImpl (2)
      CButton (4)
    CButton (3)

The numbers reflect the order things are created: everything is dynamically created, and (2) and (3) are
created at the same time as children of (1), and (4) is created on demand later on as a child of (2).

When I display (1) and click on (3), I get WM_COMMAND messages. When I click on (2) anywhere other than the
drawing area of (4), I get WM_LBUTTONDOWN and WM_LBUTTONUP messages. (4) is correctly drawn: I get
WM_PAINT messages and the button appears in the CWindowImpl area correctly. However when I click on (4) I
get nothing: no WM_LBUTTONDOWN, WM_LBUTTONUP or anything of that ilk.

(2) is created using the following code:

CVerticalLayout * _display = new CVerticalLayout(m_hWnd, IDC_DETAILS_LAYOUT);

 where CVerticalLayout is based on CWindowImpl. The constructor for CVerticalLayout does this:

this->Create(parent, NULL, L"VerticalLayout", WS_CHILD|WS_VISIBLE|WS_TABSTOP,0,uID);

and uses the following declarations/message map
(Continue reading)

domehead100 | 20 Oct 2009 17:57
Picon

Re: CWindowImpl and dynamically created button

Are you creating (4) inside of (2), even though (4) is a child of (3)?
wnd.Create(_display->m_hWnd, rc, _T("TEST"), WS_CHILD|WS_VISIBLE,0,ID_TEST_ACTION);

(noting _display->m_hWnd)

Anyway, the button will send messages to it's parent.  The parent is apparently _display.  Are you looking
for the messages in _display's message map?  If you're looking for them in (2)'s message map, they won't be
sent to (2) but rather to (3)(_display) since that it the button's parent.

~Mike

--- In wtl@..., "imperialgeniusx" <imperialgeniusx <at> ...> wrote:
>
> Hi all,
>   I'm new to WTL and implementing custom controls and have been having some difficulty with what SHOULD be a
pretty straightforward thing: adding a button to a CWindowImpl and then having the button respond to
clicks and generate events. For some reason, this simply doesn't happen.
> 
>  The basic hierarchy I have is
> 
> CFrameWindowImpl
>   CWindowImpl (1)
>     CWindowImpl (2)
>       CButton (4)
>     CButton (3)
> 
> The numbers reflect the order things are created: everything is dynamically created, and (2) and (3) are
created at the same time as children of (1), and (4) is created on demand later on as a child of (2).
> 
> When I display (1) and click on (3), I get WM_COMMAND messages. When I click on (2) anywhere other than the
(Continue reading)

Root Null | 21 Oct 2009 07:57
Picon
Favicon

Re: Re: CWindowImpl and dynamically created button

Mike,
  thanks for the response: I am creating (4) inside of (2), but setting (3) to be its parent. I'm looking for
just regular run of the mill button behavior: when I click on the button it should switch colors/behave
like a button/generate WM_COMMAND messages to someone (ANYONE will do), but none of those happen at all.

To further complicate things, I've been getting these periodic application freezes: the app simply stops
responding to clicks or scrolls or menu requests. About 1 out of every 3 times, it recovers after 10 to 20
seconds. Other times I have to force kill the debugging session. I'm assuming both of these are somehow
related and there's something foolish I'm doing, but I'm at a bit of a loss. I'm largely a Java person or old
style Win32, and this WTL thing is new for me.

Imp.

--- On Tue, 10/20/09, domehead100 <domehead100@...> wrote:

> From: domehead100 <domehead100@...>
> Subject: [wtl] Re: CWindowImpl and dynamically created button
> To: wtl@...
> Date: Tuesday, October 20, 2009, 11:57 AM
> Are you creating (4) inside of (2),
> even though (4) is a child of (3)?
> wnd.Create(_display->m_hWnd, rc, _T("TEST"),
> WS_CHILD|WS_VISIBLE,0,ID_TEST_ACTION);
> 
> (noting _display->m_hWnd)
> 
> Anyway, the button will send messages to it's parent. 
> The parent is apparently _display.  Are you looking for
> the messages in _display's message map?  If you're
> looking for them in (2)'s message map, they won't be sent to
(Continue reading)


Gmane