Windows programming

Moderators: None (Apply to moderate this forum)
Number of threads: 3711
Number of posts: 9173

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
GetDlgItem IDC_PAINT error Posted by j2000 on 7 Jan 2005 at 12:29 PM
I'm trying to retrieve a handle to the window to
update it with the following call in the callback
procedure for my dialog box :

case WM_INITDIALOG:
hCtrlBlock = GetDlgItem (hDlg, IDC_PAINT) ;

But get the following error :

error C2065: 'IDC_PAINT' : undeclared identifier

I thought IDC_PAINT is a part of the API. Would
anyone know what I'm doing wrong?
Report
Re: GetDlgItem IDC_PAINT error Posted by Johnny13 on 7 Jan 2005 at 11:29 PM
: error C2065: 'IDC_PAINT' : undeclared identifier
:
: I thought IDC_PAINT is a part of the API. Would
: anyone know what I'm doing wrong?
The GetDlgItem function retrieves the handle of a control in the specified dialog box.
Which control of your dialogbox (in the resource section) defined as IDC_PAINT?
#define IDC_PAINT ???

Report
Re: GetDlgItem IDC_PAINT error Posted by j2000 on 8 Jan 2005 at 2:14 AM
: : error C2065: 'IDC_PAINT' : undeclared identifier
: :
: : I thought IDC_PAINT is a part of the API. Would
: : anyone know what I'm doing wrong?
: The GetDlgItem function retrieves the handle of a control in the specified dialog box.
: Which control of your dialogbox (in the resource section) defined as IDC_PAINT?
#define IDC_PAINT ???

:

Okay, I see. Would you know what function I can call to retrieve
the handle to the overall window?



Report
Re: GetDlgItem IDC_PAINT error Posted by AsmGuru62 on 9 Jan 2005 at 5:55 AM
: : : error C2065: 'IDC_PAINT' : undeclared identifier
: : :
: : : I thought IDC_PAINT is a part of the API. Would
: : : anyone know what I'm doing wrong?
: : The GetDlgItem function retrieves the handle of a control in the specified dialog box.
: : Which control of your dialogbox (in the resource section) defined as IDC_PAINT?
#define IDC_PAINT ???

: :
:
: Okay, I see. Would you know what function I can call to retrieve
: the handle to the overall window?
:
:
I suspect you are doing the wrong things... can you tell me what exactly is the purpose of getting the dialog item? If you want to draw on it - this is completely diferent and you do not need this function at all - you need to reply to WM_RAWITEM message.
Report
Re: GetDlgItem IDC_PAINT error Posted by HEP on 8 Jan 2005 at 6:03 AM
Add this line after the other #include statements:

#include "resource.h"



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.