Click here to Skip to main content
15,915,703 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
AnswerRe: windows Visual Studio C++/Visual Basic file locking Pin
«_Superman_»16-Aug-10 18:56
professional«_Superman_»16-Aug-10 18:56 
AnswerRe: windows Visual Studio C++/Visual Basic file locking Pin
Cool_Dev28-Aug-10 3:12
Cool_Dev28-Aug-10 3:12 
AnswerRe: windows Visual Studio C++/Visual Basic file locking Pin
cmk30-Aug-10 18:28
cmk30-Aug-10 18:28 
QuestionActiveX without prompting? (or how to create an IE-plugin?) Pin
Don Rolando15-Aug-10 20:44
Don Rolando15-Aug-10 20:44 
AnswerRe: ActiveX without prompting? (or how to create an IE-plugin?) Pin
Cool_Dev28-Aug-10 3:00
Cool_Dev28-Aug-10 3:00 
QuestionC++ MFC - DatePickerControl - DTN_DATETIMECHANGE event getting triggered twice when clicked !!!! [modified] Pin
Kausik4u11-Aug-10 8:54
Kausik4u11-Aug-10 8:54 
AnswerRe: C++ MFC - DatePickerControl - DTN_DATETIMECHANGE event getting triggered twice when clicked !!!! Pin
Stuart Dootson12-Aug-10 4:17
professionalStuart Dootson12-Aug-10 4:17 
GeneralRe: C++ MFC - DatePickerControl - DTN_DATETIMECHANGE event getting triggered twice when clicked !!!! Pin
Kausik4u12-Aug-10 4:27
Kausik4u12-Aug-10 4:27 
QuestionTranlating old code to the STL style Pin
VeganFanatic8-Aug-10 4:47
VeganFanatic8-Aug-10 4:47 
AnswerRe: Tranlating old code to the STL style Pin
Stuart Dootson12-Aug-10 4:13
professionalStuart Dootson12-Aug-10 4:13 
GeneralRe: Tranlating old code to the STL style Pin
VeganFanatic12-Aug-10 8:33
VeganFanatic12-Aug-10 8:33 
GeneralRe: Tranlating old code to the STL style Pin
Stuart Dootson12-Aug-10 8:51
professionalStuart Dootson12-Aug-10 8:51 
GeneralRe: Tranlating old code to the STL style Pin
VeganFanatic12-Aug-10 8:56
VeganFanatic12-Aug-10 8:56 
GeneralRe: Tranlating old code to the STL style Pin
Stuart Dootson12-Aug-10 9:16
professionalStuart Dootson12-Aug-10 9:16 
GeneralRe: Tranlating old code to the STL style Pin
VeganFanatic12-Aug-10 9:20
VeganFanatic12-Aug-10 9:20 
QuestionATL: WM_MOUSELEAVE Pin
Supriya Tonape6-Aug-10 4:30
Supriya Tonape6-Aug-10 4:30 
AnswerRe: ATL: WM_MOUSELEAVE Pin
Frank Seidler6-Aug-10 4:38
Frank Seidler6-Aug-10 4:38 
GeneralRe: ATL: WM_MOUSELEAVE Pin
Sauro Viti6-Aug-10 4:46
professionalSauro Viti6-Aug-10 4:46 
GeneralRe: ATL: WM_MOUSELEAVE Pin
Supriya Tonape9-Aug-10 2:25
Supriya Tonape9-Aug-10 2:25 
GeneralRe: ATL: WM_MOUSELEAVE Pin
Supriya Tonape9-Aug-10 2:28
Supriya Tonape9-Aug-10 2:28 
QuestionHow can my CDerivedEdit respond WM_SHOWWINDOW? (OnShowWindow) Pin
dancingfish5-Aug-10 21:41
dancingfish5-Aug-10 21:41 
How can my CDerivedEdit respond WM_SHOWWINDOW?

(OnShowWindow)just like MFC.

class CMouseValueEdit
: public CWindowImpl<cmousevalueedit, cedit="">
{
public:
DECLARE_WND_CLASS(_T("CMouseValueEdit"));

BEGIN_MSG_MAP_EX(CMouseValueEdit)
MESSAGE_HANDLER(WM_SHOWWINDOW, OnShowWindow)
MSG_WM_SHOWWINDOW(OnShowWindow)
//MESSAGE_HANDLER(WM_CTLCOLOREDIT, OnCtlColorEdit)
//MSG_WM_PAINT(OnPaint)
//MESSAGE_HANDLER(OCM_CTLCOLOREDIT, OnCtlColorEdit)
MSG_OCM_CTLCOLOREDIT(OnCtlColorEdit)
//REFLECTED_NOTIFY_CODE_HANDLER( WM_SHOWWINDOW, OnShowWindow)
DEFAULT_REFLECTION_HANDLER()
//CHAIN_MSG_MAP(CWindowImpl<cmousevalueedit, cedit="">)
END_MSG_MAP_EX()

CMouseValueEdit& operator=(HWND hWnd)
{
//m_hWnd = hWnd;
SubclassWindow(hWnd);
return *this;
}
}




class CMainDlg : public CDialogImpl<cmaindlg>, public CUpdateUI<cmaindlg>
, public CMessageFilter, public CIdleHandler
, public CWinDataExchange<cmaindlg>
{
public:
CMainDlg();
virtual ~CMainDlg();

CMouseValueEdit m_editMouse;
enum { IDD = IDD_MAINDLG };

BEGIN_DDX_MAP(CMainDlg)
DDX_CONTROL_HANDLE(IDC_EDIT_MOUSE, m_editMouse)
END_DDX_MAP();

virtual BOOL PreTranslateMessage(MSG* pMsg)
{
return CWindow::IsDialogMessage(pMsg);
}

virtual BOOL OnIdle()
{
return FALSE;
}

BEGIN_UPDATE_UI_MAP(CMainDlg)
END_UPDATE_UI_MAP()

BEGIN_MSG_MAP_EX(CMainDlg)
MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
MESSAGE_HANDLER(WM_DESTROY, OnDestroy)
COMMAND_ID_HANDLER(ID_APP_ABOUT, OnAppAbout)
COMMAND_ID_HANDLER(IDOK, OnOK)
COMMAND_ID_HANDLER(IDCANCEL, OnCancel)
REFLECT_NOTIFICATIONS()
END_MSG_MAP_EX()

LRESULT OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
// center the dialog on the screen
CenterWindow();

//mp_editMouse->SubclassWindow(GetDlgItem(IDC_EDIT_MOUSE));
DoDataExchange();

// set icons
HICON hIcon = (HICON)::LoadImage(_Module.GetResourceInstance(), MAKEINTRESOURCE(IDR_MAINFRAME),
IMAGE_ICON, ::GetSystemMetrics(SM_CXICON), ::GetSystemMetrics(SM_CYICON), LR_DEFAULTCOLOR);
SetIcon(hIcon, TRUE);
HICON hIconSmall = (HICON)::LoadImage(_Module.GetResourceInstance(), MAKEINTRESOURCE(IDR_MAINFRAME),
IMAGE_ICON, ::GetSystemMetrics(SM_CXSMICON), ::GetSystemMetrics(SM_CYSMICON), LR_DEFAULTCOLOR);
SetIcon(hIconSmall, FALSE);

// register object for message filtering and idle updates
CMessageLoop* pLoop = _Module.GetMessageLoop();
ATLASSERT(pLoop != NULL);
pLoop->AddMessageFilter(this);
pLoop->AddIdleHandler(this);

UIAddChildWindowContainer(m_hWnd);

return TRUE;
}
}




OnShowWindow is not called.
I can't understand WTL...
QuestionAuthentication client-server using message queues in c language Pin
ralph 230-Jul-10 2:31
ralph 230-Jul-10 2:31 
AnswerRe: Authentication client-server using message queues in c language Pin
Richard MacCutchan30-Jul-10 3:17
mveRichard MacCutchan30-Jul-10 3:17 
GeneralRe: Authentication client-server using message queues in c language Pin
ralph 230-Jul-10 3:20
ralph 230-Jul-10 3:20 
QuestionProgressBar and Threading.. Pin
Anil Kumar.Arvapalli29-Jul-10 19:53
Anil Kumar.Arvapalli29-Jul-10 19:53 

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.