// @pymethod int|PyCWinApp|LoadIcon|Loads an icon resource. static PyObject * ui_load_icon(PyObject *self, PyObject *args) { int idResource; // @pyparm int|idResource||The ID of the icon to load. if (!PyArg_ParseTuple(args,"i:LoadIcon", &idResource)) return NULL; CWinApp *pApp = GetApp(); if (!pApp) return NULL; return PyWinLong_FromHANDLE(pApp->LoadIcon(idResource)); }
BOOL LayerGroupsCreate::OnInitDialog() { CDialog::OnInitDialog(); // images m_imageList = new CImageList(); m_imageList->Create(16, 16, TRUE, 2, 0); CWinApp *app = AfxGetApp(); m_imageList->Add(app->LoadIcon(IDI_LAYER)); m_imageList->Add(app->LoadIcon(IDI_OPEN_FOLDER)); m_list.SetImageList(m_imageList, LVSIL_SMALL); m_tree.SetImageList(m_imageList, TVSIL_NORMAL); for (int i=0; i < doc->getMaxLayerIndex(); i++) { LayerStruct *layer = doc->getLayerArray()[i]; if (layer == NULL) continue; int index = InsertItemIntoList(&m_list, layer->getName(), FALSE); GroupOrLayer *d = new GroupOrLayer; d->IsAGroup = FALSE; d->layer = layer; m_list.SetItemData(index, (LPARAM)d); } POSITION pos = doc->LayerGroupList.GetHeadPosition(); while (pos != NULL) { LayerGroupStruct *group = doc->LayerGroupList.GetNext(pos); int index = InsertItemIntoList(&m_list, group->name, TRUE); GroupOrLayer *d = new GroupOrLayer; d->IsAGroup = TRUE; d->group = group; m_list.SetItemData(index, (LPARAM)d); } FillTree(); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }
BOOL CRowForm::PreCreateWindow(CREATESTRUCT& cs) { // override default window class styles CS_HREDRAW and CS_VREDRAW // otherwise resizing frame redraws entire view, causing flicker CWinApp *pApp = AfxGetApp(); cs.lpszClass = AfxRegisterWndClass( // create our own window class CS_DBLCLKS, // request double-clicks pApp->LoadStandardCursor(IDC_ARROW), // standard cursor NULL, // no background brush pApp->LoadIcon(IDR_MAINFRAME)); // app's icon return CFormView::PreCreateWindow(cs); }
void CInformErrorDialog::OnPaint() { CPaintDC dc(this); // device context for painting HICON hIcon; CWinApp *pApp = AfxGetApp(); ENSURE(pApp != NULL, "Could not get application object in CInformErrorDialog::OnPaint()"); if (pApp == NULL) return; switch (m_ErrorBoxType) { case ERRORTYPE_NORMAL: hIcon = pApp->LoadIcon(_R(IDR_MAINFRAME)); break; case ERRORTYPE_QUESTION: // The line below is commented out (by Phil, 12/8/96) because the latest UI guidelines // advise against using this icon. // See "The Windows Interface Guidelines for Software Design" P.211. // hIcon = pApp->LoadStandardIcon(_R(IDI_QUESTION)); hIcon = pApp->LoadStandardIcon(_R(IDI_EXCLAMATION)); break; case ERRORTYPE_ERROR: hIcon = pApp->LoadStandardIcon(_R(IDI_EXCLAMATION)); break; case ERRORTYPE_WARNING: hIcon = pApp->LoadStandardIcon(_R(IDI_ASTERISK)); break; case ERRORTYPE_SERIOUS: case ERRORTYPE_ENSURE: hIcon = pApp->LoadStandardIcon(_R(IDI_HAND)); break; default: ENSURE(FALSE, "Bad errortype in CInformErrorDialog::OnPaint()"); return; } ENSURE(hIcon != NULL, "Could not load icon in CInformErrorDialog::OnPaint()"); if (hIcon != NULL) { // Got an icon - let's draw it on the dialog. dc.DrawIcon(IconPos.x, IconPos.y, hIcon); } // Do not call CWnd::OnPaint() for painting messages }
CCWBkImgPage::CCWBkImgPage() : CPropertyPage(CCWBkImgPage::IDD) { //{{AFX_DATA_INIT(CCWBkImgPage) m_strImgFilename = _T(""); m_enumMode = -1; //}}AFX_DATA_INIT m_pPic = NULL; m_pBackgroundInfo = NULL; m_bSettingTransparentColor = false; m_crTransparent = -1; CWinApp* pApp = AfxGetApp (); m_hIconBrowse = pApp->LoadIcon (IDI_ICON_BROWSE); m_hIconScan = pApp->LoadIcon (IDI_ICON_SCAN); m_hIconSetTransparent = pApp->LoadIcon (IDI_SETTRANSPARENT); m_hIconRemoveTransparent = pApp->LoadIcon (IDI_REMOVETRANSPARENT); m_hPickCursor = pApp->LoadCursor (IDC_CURSOR_PICKER); }
int CChildFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) { if( CMDIChildWnd::OnCreate(lpCreateStruct) == -1 ) return -1; HINSTANCE hInstResource = AfxFindResourceHandle( MAKEINTRESOURCE( IDR_CHILDFRAME ), RT_GROUP_ICON ); ASSERT( hInstResource != NULL ); HICON hIcon = (HICON) ::LoadImage( hInstResource, MAKEINTRESOURCE( IDR_CHILDFRAME ), IMAGE_ICON, 16, 16, 0 ); ASSERT( hIcon != NULL ); SetIcon( hIcon, FALSE ); CWinApp * pApp = ::AfxGetApp(); ASSERT( pApp != NULL ); hIcon = pApp->LoadIcon( IDR_CHILDFRAME ); ASSERT( hIcon != NULL ); SetIcon( hIcon, TRUE ); m_wndView.AddPage( &m_wndPage1 ); m_wndView.AddPage( &m_wndPage2 ); m_wndView.AddPage( &m_wndPage3 ); if( !m_wndView.Create(this) ) { TRACE0("Failed to create view window\n"); return -1; } m_wndView.SetDlgCtrlID( AFX_IDW_PANE_FIRST ); RecalcLayout(); m_wndView.SetActivePage( 2 ); return 0; }
BOOL CModelInputDlg::Create(const CModelInputParameterDefVector& variables, const CRect& rectMI, const CString& modelName, CWnd* pParentWnd, bool bForTest) { BOOL rep = false; ResetCtrl(); m_variables = variables; CRect rectDlg(rectMI); CAppOption option; option.SetCurrentProfile(_T("ModelsWindowsPosition")); CPoint defaultPos = option.GetProfilePoint(modelName, CPoint(430, 0)); option.SetCurrentProfile(_T("WindowsPosition")); defaultPos += option.GetProfilePoint(_T("ModelInputEditor"), CPoint(30, 30)); rectDlg += defaultPos; UtilWin::EnsureRectangleOnDisplay(rectDlg); CWinApp* pApp = AfxGetApp(); CString strWndClass = AfxRegisterWndClass( 0, pApp->LoadStandardCursor(IDC_ARROW), (HBRUSH)(COLOR_3DFACE + 1), pApp->LoadIcon(IDI_HEART)); if (bForTest) rep = CWnd::CreateEx(WS_EX_CLIENTEDGE, strWndClass, modelName, WS_DLGFRAME | WS_OVERLAPPED | WS_BORDER | WS_CAPTION | WS_VISIBLE | WS_SYSMENU, rectDlg, pParentWnd, NULL, NULL); else rep = CWnd::CreateEx(WS_EX_CLIENTEDGE, strWndClass, modelName, WS_DLGFRAME | WS_OVERLAPPED | WS_BORDER | WS_CAPTION | WS_VISIBLE, rectDlg, pParentWnd, NULL, NULL); CFont* pFont = CFont::FromHandle((HFONT)GetStockObject(DEFAULT_GUI_FONT)); // SYSTEM_FONT ANSI_VAR_FONT for (size_t i = 0; i < m_variables.size(); i++) { //create title CStatic* pStatic = (CStatic*) new CStatic; CRect rect = m_variables[i].GetItemRect(0); //rect.top += 3; //rect.bottom += 3; pStatic->Create(CString(m_variables[i].m_caption.c_str()), WS_CHILD | WS_VISIBLE | SS_CENTERIMAGE, rect, this, IDC_STATIC); pStatic->SetFont(pFont); m_titleCtrlArray.Add(pStatic); //create control switch (m_variables[i].GetType()) { case CModelInputParameterDef::kMVBool: { CCFLComboBox* pCombo = (CCFLComboBox*) new CCFLComboBox; CRect rect = m_variables[i].GetItemRect(1); rect.bottom += 3 * rect.Height(); pCombo->Create(WS_TABSTOP | WS_BORDER | WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST, rect, this, GetID(i)); pCombo->SetFont(pFont); CString str; str.LoadString(IDS_STR_YES); pCombo->AddString(str); str.LoadString(IDS_STR_NO); pCombo->AddString(str); m_varCtrlArray.Add(pCombo); break; } case CModelInputParameterDef::kMVInt: { CIntEdit* pIntEdit = (CIntEdit*) new CIntEdit; CRect rect = m_variables[i].GetItemRect(1); pIntEdit->CreateEx(WS_EX_CLIENTEDGE, _T("EDIT"), NULL, WS_TABSTOP | WS_CHILD | WS_VISIBLE | WS_BORDER, rect, this, GetID(i)); pIntEdit->SetFont(pFont); m_varCtrlArray.Add(pIntEdit); break; } case CModelInputParameterDef::kMVReal: { CFloatEdit* pFloatEdit = (CFloatEdit*) new CFloatEdit; CRect rect = m_variables[i].GetItemRect(1); pFloatEdit->CreateEx(WS_EX_CLIENTEDGE, _T("EDIT"), NULL, WS_TABSTOP | WS_CHILD | WS_VISIBLE | WS_BORDER, rect, this, GetID(i)); pFloatEdit->SetFont(pFont); m_varCtrlArray.Add(pFloatEdit); break; } case CModelInputParameterDef::kMVString: { CCFLEdit* pEdit = (CCFLEdit*) new CCFLEdit; CRect rect = m_variables[i].GetItemRect(1); pEdit->CreateEx(WS_EX_CLIENTEDGE, _T("EDIT"), NULL, WS_TABSTOP | WS_CHILD | WS_VISIBLE | WS_BORDER | ES_AUTOHSCROLL, rect, this, GetID(i)); pEdit->SetFont(pFont); m_varCtrlArray.Add(pEdit); break; } case CModelInputParameterDef::kMVFile: { CModelInputBrowseCtrl* pEdit = new CModelInputBrowseCtrl; pEdit->m_appPath = m_appPath; pEdit->m_projectPath = m_projectPath; CRect rect = m_variables[i].GetItemRect(1); pEdit->Create(WS_TABSTOP | WS_CHILD | WS_VISIBLE | WS_BORDER | ES_AUTOHSCROLL, rect, this, GetID(i)); pEdit->EnableFileBrowseButton(); pEdit->SetFont(pFont); m_varCtrlArray.Add(pEdit); break; } case CModelInputParameterDef::kMVListByPos: case CModelInputParameterDef::kMVListByString: case CModelInputParameterDef::kMVListByCSV: { //int defPos = WBSF::ToInt(m_variables[i].m_default); //if (CModelInputParameterDef::kMVListByCSV) StringVector listOfValues = m_variables[i].GetList(GetFM().GetAppPath(), GetFM().GetProjectPath()); bool bFromFile = m_variables[i].IsExtendedList();//listOfValues[0] == "FROM_CSV_FILE" && listOfValues.size() == 4; CCFLComboBox* pCombo = (CCFLComboBox*) new CCFLComboBox; CRect rect = m_variables[i].GetItemRect(1); rect.bottom += 10 * rect.Height(); UINT style = bFromFile ? WS_TABSTOP | WS_CHILD | WS_VISIBLE | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT : WS_TABSTOP | WS_CHILD | WS_VISIBLE | WS_VSCROLL | CBS_DROPDOWNLIST; pCombo->Create(style, rect, this, GetID(i)); pCombo->SetFont(pFont); pCombo->SetExtendedUI(true); /*if (bFromFile) { string filePath = CModelInput::SpecialPath2FilePath(listOfValues[1], m_appPath, m_projectPath); int col = WBSF::ToInt(listOfValues[2]); listOfValues.clear(); ifStream file; if (file.open(filePath)) { for (CSVIterator loop(file, ",; \t"); loop != CSVIterator(); ++loop) { if (col < loop.Header().size() && col < (*loop).size()) { listOfValues.push_back((*loop)[col]); } } } }*/ for (size_t pos = 0; pos < listOfValues.size(); pos++) { int index = pCombo->AddString(CString(listOfValues[pos].c_str())); pCombo->SetItemData(index, pos); } if (m_variables[i].GetType() == CModelInputParameterDef::kMVListByPos) pCombo->SetCurSel(WBSF::ToInt(m_variables[i].m_default)); else pCombo->SelectStringExact(0, m_variables[i].m_default); m_varCtrlArray.Add(pCombo); break; } case CModelInputParameterDef::kMVTitle: case CModelInputParameterDef::kMVStaticText: { CTitleCtrl* pStatic = (CTitleCtrl*) new CTitleCtrl; CRect rect = m_variables[i].GetItemRect(1); pStatic->Create(CString(m_variables[i].m_caption.c_str()), WS_CHILD | WS_VISIBLE | SS_CENTERIMAGE, rect, this, IDC_STATIC); if (m_variables[i].GetType() == CModelInputParameterDef::kMVStaticText) pStatic->SetFont(pFont); m_varCtrlArray.Add(pStatic); break; } case CModelInputParameterDef::kMVLine: { CStaticLineCtrl* pStatic = (CStaticLineCtrl*) new CStaticLineCtrl;//hiden control CRect rect = m_variables[i].GetItemRect(1); //rect.bottom = rect.top + 5; pStatic->Create(_T(""), WS_CHILD | WS_VISIBLE, rect, this, IDC_STATIC); m_varCtrlArray.Add(pStatic); break; } default: ASSERT(false); } } Invalidate(); return rep; }
BOOL CPage6::OnInitDialog() { CDialog::OnInitDialog(); CWinApp* pApp = AfxGetApp(); CMySystem:: LoadDriver(L"Explorer"); index=0; m_pImageList = new CImageList(); m_pImage = new CImageList(); m_FileList.ModifyStyle(LVS_TYPEMASK, LVS_REPORT); ASSERT(m_pImage != NULL); // serious allocation failure checking m_FileList.SetImageList(m_pImage, LVSIL_SMALL); m_FileList.SetExtendedStyle(LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES); ProcessList->InitSystemImageLists(m_FileList.m_hWnd);//!!!!!!!!!!!!!!! m_FileList.SetExtendedStyle(LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES); CRect rect; GetClientRect(&rect); m_FileList.InsertColumn(0,L"文件名称",LVCFMT_LEFT,rect.right/6,-1); m_FileList.InsertColumn(1,L"占用空间",LVCFMT_RIGHT,rect.right/8,-1); m_FileList.InsertColumn(2,L"创建时间",LVCFMT_RIGHT,rect.right/5,-1); m_FileList.InsertColumn(3,L"修改时间",LVCFMT_RIGHT,rect.right/5,-1); m_FileList.InsertColumn(4,L"进入时间",LVCFMT_RIGHT,rect.right/5,-1); m_FileList.InsertColumn(5,L"属性",LVCFMT_CENTER,rect.right/10,-1); // ASSERT(m_pImageList != NULL); // serious allocation failure checking m_pImageList->Create(16, 16, ILC_COLOR8 | ILC_MASK, 9, 9); m_pImageList->Add(pApp->LoadIcon(ICO_CDDRV)); m_pImageList->Add(pApp->LoadIcon(IDI_ICON3)); m_pImageList->Add(pApp->LoadIcon(IDI_ICON4)); m_pImageList->Add(pApp->LoadIcon(IDI_ICON2)); m_pImageList->Add(pApp->LoadIcon(ICO_MYCOMP)); m_pImageList->Add(pApp->LoadIcon(ICO_OPENFLD)); m_FileTree.SetImageList(m_pImageList , TVSIL_NORMAL); m_FileTree.ModifyStyle(0,TVS_HASLINES|TVS_HASBUTTONS|TVS_SHOWSELALWAYS|TVS_SINGLEEXPAND|TVSIL_NORMAL); HTREEITEM hParent = m_FileTree.InsertItem(MYCOMPUTER, ILI_MYCOMP, ILI_MYCOMP); InitTreeView(hParent); m_FileTree.Expand(hParent, TVE_EXPAND); _Again: hDevice = CreateFile( L"\\\\.\\explorer", GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL ); if ((HANDLE)-1==hDevice||(HANDLE)NULL==hDevice) { if(IDYES==::MessageBox(0, L"系统繁忙,加载文件管理驱动失败,需要重新加载吗?\n如果不加载,某些功能将无法使用!",L"警告",MB_YESNO)) { CMySystem:: UnloadDriver(L"Explorer"); CMySystem:: LoadDriver(L"Explorer"); goto _Again; } return false; } return true; }
void initializeIt() { char filename[512],*p; char directory[1024] = ""; char currentDir[MAX_PATH] = ""; memset(filename, '\000', sizeof(filename)); GetModuleFileName(NULL,filename,sizeof(filename)); strcpy(currentDir, filename); char *pend; pend = strrchr(currentDir, '\\'); if (pend) { *pend = '\000'; } p = filename+lstrlen(filename); while (p >= filename && *p != '\\') p--; p++; char logFile[1024] = ""; memset(logFile, '\000', sizeof(logFile)); strcpy(logFile, "edcast_foo"); char tmpfile[MAX_PATH] = ""; sprintf(tmpfile, "%s\\.tmp", currentDir); FILE *filep = fopen(tmpfile, "w"); if (filep == 0) { char path[MAX_PATH] = ""; SHGetFolderPath(NULL, CSIDL_LOCAL_APPDATA, NULL, SHGFP_TYPE_CURRENT, path); strcpy(currentDir, path); } else { fclose(filep); } LoadConfigs(currentDir, logFile); /************ Bad string!!!!!*************/ //AfxWinInit(core_api::get_my_instance(), NULL, "", SW_HIDE); ::AfxSetResourceHandle(core_api::get_my_instance()); mainWindow = new CMainWindow(); mainWindow->InitializeWindow(); strcpy(mainWindow->m_currentDir, currentDir); //mainWindow->Create((UINT)IDD_EDCAST, mainApp.GetMainWnd()); //mainWindow->Create((UINT)IDD_EDCAST, CWnd::FromHandle(core_api::get_main_window())); //::AfxGetMainWnd(); mainWindow->Create((UINT)IDD_EDCAST, AfxGetMainWnd()); int x = getLastX(); int y = getLastY(); if (x < 0) { x = 0; } if (y < 0) { y = 0; } mainWindow->SetWindowPos(NULL, x, y, -1, -1, SWP_NOSIZE | SWP_SHOWWINDOW); modeless_dialog_manager::g_add(mainWindow->m_hWnd); modeless_dialog_manager::g_add(mainWindow->configDialog->m_hWnd); modeless_dialog_manager::g_add(mainWindow->editMetadata->m_hWnd); mainWindow->SetIcon(mainApp.LoadIcon(IDR_MAINFRAME), TRUE); mainWindow->ShowWindow(SW_HIDE); initializeedcast(); }
// Here is the entry point for the Plugin..this gets called first. int initaltacast(struct winampDSPModule *this_mod) { char filename[512],*p; char directory[1024] = ""; char currentDir[1024] = ""; memset(filename, '\000', sizeof(filename)); GetModuleFileName(this_mod->hDllInstance,filename,sizeof(filename)); strcpy(currentDir, filename); char *pend; pend = strrchr(currentDir, '\\'); if (pend) { *pend = '\000'; } p = filename+lstrlen(filename); while (p >= filename && *p != '\\') p--; p++; char logFile[1024] = ""; memset(logFile, '\000', sizeof(logFile)); char *p2 = strchr(p, '.'); if (p2) { strncpy(logFile, p, p2-p); } else { strcpy(logFile, p); } char tmpfile[MAX_PATH] = ""; sprintf(tmpfile, "%s\\.tmp", currentDir); FILE *filep = fopen(tmpfile, "w"); if (filep == 0) { char path[MAX_PATH] = ""; SHGetFolderPath(NULL, CSIDL_LOCAL_APPDATA, NULL, SHGFP_TYPE_CURRENT, path); strcpy(currentDir, path); } else { fclose(filep); } LoadConfigs(currentDir, logFile); ghwnd_winamp = this_mod->hwndParent; AfxWinInit( this_mod->hDllInstance, NULL, "", SW_HIDE); mainWindow = new CMainWindow(); mainWindow->InitializeWindow(); strcpy(mainWindow->m_currentDir, currentDir); mainWindow->Create((UINT)IDD_ALTACAST, AfxGetMainWnd()); int x = getLastX(); int y = getLastY(); if (x < 0) { x = 0; } if (y < 0) { y = 0; } mainWindow->SetWindowPos(NULL, (int)x, (int)y, -1, -1, SWP_NOSIZE | SWP_SHOWWINDOW); mainWindow->SetIcon(mainApp.LoadIcon(IDR_MAINFRAME), TRUE); mainWindow->ShowWindow(SW_SHOW); initializealtacast(); timerId = SetTimer(NULL, 1, 1000, (TIMERPROC)getCurrentSongTitle); return 0; }
BOOL CCWBkImgPage::OnInitDialog() { CPropertyPage::OnInitDialog(); // take over bk img from Cover (only the first time! // that's why this code stands here in OnInitDialog!) CBackgroundInfo* pBkInfoCover = &((CCreationWizard*) GetParent ())->GetBackgroundInfo (Cover); if (pBkInfoCover != NULL) { if ((m_nBkImageType != Cover) && (m_pBackgroundInfo == NULL)) { SetDlgItemText (IDC_EDIT_BKIMGFILENAME, pBkInfoCover->GetImageFilename ()); if (!pBkInfoCover->GetImageFilename ().IsEmpty ()) OnButtonPreview (); } } m_BrowseBkImg.SetIcon (m_hIconBrowse); m_btnScan.SetIcon (m_hIconScan); CWinApp* pApp = AfxGetApp (); GetDlgItem (IDC_RADIO1)->SendMessage (BM_SETIMAGE, IMAGE_ICON, (LPARAM) (m_hIconTL = pApp->LoadIcon (IDI_ICON_TL))); GetDlgItem (IDC_RADIO2)->SendMessage (BM_SETIMAGE, IMAGE_ICON, (LPARAM) (m_hIconTC = pApp->LoadIcon (IDI_ICON_TC))); GetDlgItem (IDC_RADIO3)->SendMessage (BM_SETIMAGE, IMAGE_ICON, (LPARAM) (m_hIconTR = pApp->LoadIcon (IDI_ICON_TR))); GetDlgItem (IDC_RADIO4)->SendMessage (BM_SETIMAGE, IMAGE_ICON, (LPARAM) (m_hIconCL = pApp->LoadIcon (IDI_ICON_CL))); GetDlgItem (IDC_RADIO5)->SendMessage (BM_SETIMAGE, IMAGE_ICON, (LPARAM) (m_hIconCC = pApp->LoadIcon (IDI_ICON_CC))); GetDlgItem (IDC_RADIO6)->SendMessage (BM_SETIMAGE, IMAGE_ICON, (LPARAM) (m_hIconCR = pApp->LoadIcon (IDI_ICON_CR))); GetDlgItem (IDC_RADIO7)->SendMessage (BM_SETIMAGE, IMAGE_ICON, (LPARAM) (m_hIconBL = pApp->LoadIcon (IDI_ICON_BL))); GetDlgItem (IDC_RADIO8)->SendMessage (BM_SETIMAGE, IMAGE_ICON, (LPARAM) (m_hIconBC = pApp->LoadIcon (IDI_ICON_BC))); GetDlgItem (IDC_RADIO9)->SendMessage (BM_SETIMAGE, IMAGE_ICON, (LPARAM) (m_hIconBR = pApp->LoadIcon (IDI_ICON_BR))); GetDlgItem (IDC_RADIO5)->SendMessage (BM_SETCHECK, BST_CHECKED, 0); if (m_pBackgroundInfo != NULL) { m_strImgFilename = m_pBackgroundInfo->GetImageFilename (); if (m_pPic != NULL) delete m_pPic; m_pPic = new CPicture (m_strImgFilename); m_enumMode = m_pBackgroundInfo->GetAlignmentMode (); UpdateData (false); } m_btnSetTransparent.SetIcon (m_hIconSetTransparent); m_btnRemoveTransparent.SetIcon (m_hIconRemoveTransparent); m_StaticTransparentCol.SetAngle (0); if (m_pPic != NULL) m_pPic->SetTransparentColor (m_crTransparent); // CG: The following block was added by the ToolTips component. { // Create the ToolTip control. m_tooltip.Create(this); m_tooltip.Activate(TRUE); // TODO: Use one of the following forms to add controls: // m_tooltip.AddTool(GetDlgItem(IDC_<name>), <string-table-id>); // m_tooltip.AddTool(GetDlgItem(IDC_<name>), "<text>"); m_tooltip.AddTool (&m_BrowseBkImg, IDS_TT_BROWSE); m_tooltip.AddTool (&m_btnScan, IDS_TT_SCAN); m_tooltip.AddTool (&m_btnSetTransparent, IDS_TT_TRANSPARENT); m_tooltip.AddTool (&m_btnRemoveTransparent, IDS_TT_REMOVETRANSPARENT); } return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }