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?
Comments
:
: I thought IDC_PAINT is a part of the API. Would
: anyone know what I'm doing wrong?
[purple]The [b]GetDlgItem[/b] 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?[/purple][code]#define IDC_PAINT ???[/code]
: :
: : I thought IDC_PAINT is a part of the API. Would
: : anyone know what I'm doing wrong?
: [purple]The [b]GetDlgItem[/b] 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?[/purple][code]#define IDC_PAINT ???[/code]
:
Okay, I see. Would you know what function I can call to retrieve
the handle to the overall window?
#include "resource.h"
: : :
: : : I thought IDC_PAINT is a part of the API. Would
: : : anyone know what I'm doing wrong?
: : [purple]The [b]GetDlgItem[/b] 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?[/purple][code]#define IDC_PAINT ???[/code]
: :
:
: Okay, I see. Would you know what function I can call to retrieve
: the handle to the overall window?
:
:
[blue]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.[/blue]