Click here to Skip to main content
13,096,399 members (53,054 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I am beginner with COM. Currently I am trying to write a COM server(*.EXE) to receive messages from other process. So, I plan to create a hidden dialog for my COM server.

I just created a ATL Dialog class using VS2010 and the "Add class wizzard".

class CMyDlg: 
	public CAxDialogImpl<CTestDialog>

After initialized

CMyDlg dlg;

It just hang on every thing.

Then I changed another method

CMyDlg dlg;

Nothing happened! Just an error code: 1813. That means The specified resource type cannot be found in the image file.

I can't understand why this happen?
The Dialog resource was created by the wizzard.

I searched from google and some forum for the whole 2 day, nothing was found.

Could you please give me some idea?


Posted 15-Sep-12 9:15am
armagedescu 17-Sep-12 9:56am
how can you call doModal on a hidden box?
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

It might be a problem in Create method: you should use a template name, not a NULL statement. If you did not derived 'Create' virtual method, I suppose, the compiller will use standard CDialog template, not the inherited one.
xchftt 16-Sep-12 7:53am
THe create function parameter was hWnd. Because my application was a ALT service, no window existed.
skydger 17-Sep-12 5:08am
Have you tried to create standard CDialog window?
Although it might be a problem. If there is no any window, you can try to attach your dialog to desktop:
CWnd wnd;
wnd.Attach( GetDesktopWindow() );
CDialog dlg;
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

I ignored that my OS was Windows7. The services dialog, if successfully created, would work at Session 0. In this Session, no message can arrive from other session.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02 | 2.8.170813.1 | Last Updated 18 Dec 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100