|
No it is not working properly. i have tried copying it again but still the same problm is there.
|
|
|
|
|
Try recompiling the code again.
Regards,
Paresh.
|
|
|
|
|
neha.agarwal27 wrote: No it is not working properly
Then there must be some specifice problem to your project, ideally it should work.
Thanks,
Anand.
|
|
|
|
|
neha.agarwal27 wrote: when i copy same application on to another disk...
How?
neha.agarwal27 wrote: ...size remains same...
Of what?
neha.agarwal27 wrote: ...i am unable to get my dialog box in my newly copied application.
What do you mean by "get my dialog box?"
neha.agarwal27 wrote: I have opened resource file also, but definations are also not available there.
Definations? Can you open the copied .rc file and locate the dialog templates? If not, can you do so with the original .rc file?
Is the dialog created at design-time or at run-time?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Dialog templates are stored in the project's .rc file. After compiling, they are in a .res file along with all the other resources (e.g., bitmaps, menus, icons).
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hello everyone,
I am wondering how to set DLL property (when we select the DLL and using right click to choose properties), like version, language, company, etc.?
Do we need to write some code or just need to configure something in Visual Studio 2005?
thanks in advance,
George
|
|
|
|
|
Hi.
if you use ATL you can uses source editor. In source editor you could see version folder. double click it.......
holp it's helpful for you.
|
|
|
|
|
Hi chnuser,
I am not using ATL. But I can find a related resource to edit such properties in resource view. Thanks!
regards,
George
|
|
|
|
|
Take the resource view on the visual studio. right click on the project, select add->Resource. A dialog box will appear in that select Version and press new. You are done!
|
|
|
|
|
Thanks nave,
It works!
regards,
George
|
|
|
|
|
In SDI struct.I just want to create a toolbar in myFrameWnd(not in CMainFrame) .Xp OS ,everything is ok .but win2000 OS CreateView(&ccontext, AFX_IDW_PANE_FIRST) returns NULL. Why?
1. i wrote a class like this:
------------------------.h file---------------------------------------------
class CViewCgMap;
class CFrameWndCgMap : public CFrameWnd
{
DECLARE_DYNCREATE(CFrameWndCgMap)
protected:
CFrameWndCgMap();
virtual ~CFrameWndCgMap();
protected:
CXTPDockingPaneManager m_paneManager;
CDlgAttrib *m_pdlgAttrib;
CViewCgMap *m_pNewView;
DECLARE_MESSAGE_MAP()
public:
afx_msg void OnNcPaint();
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
};
-----------------------------.cpp file-----------------------
#include "ViewCgMap.h"
// CFrameWndCgMap
IMPLEMENT_DYNCREATE(CFrameWndCgMap, CFrameWnd)
CFrameWndCgMap::CFrameWndCgMap() : m_pdlgAttrib(NULL), m_pNewView(0), m_pDoc(0)
{
}
CFrameWndCgMap::~CFrameWndCgMap()
{
}
BEGIN_MESSAGE_MAP(CFrameWndCgMap, CFrameWnd)
ON_WM_CREATE()
ON_WM_NCPAINT()
END_MESSAGE_MAP()
// CFrameWndCgMap
#ifdef _DEBUG
void CFrameWndCgMap::AssertValid() const
{
CFrameWnd::AssertValid();
}
void CFrameWndCgMap::Dump(CDumpContext& dc) const
{
CFrameWnd::Dump(dc);
}
#endif //_DEBUG
int CFrameWndCgMap::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
return -1;
//
CCreateContext ccontext;
ccontext.m_pNewViewClass = RUNTIME_CLASS(CViewCgMap);
ccontext.m_pCurrentDoc = NULL;
ccontext.m_pNewDocTemplate = *NULL;
ccontext.m_pLastView = NULL;
ccontext.m_pCurrentFrame = this;
m_pNewView = STATIC_DOWNCAST(CViewCgMap, CFrameWnd::CreateView(&ccontext, AFX_IDW_PANE_FIRST)); // WHY THIS CODE RETURNS NULL in win2000 OS?
if (!m_pNewView)
{
MessageBox("can't create view");
//return -1;
}
else
{
AFX_IDW_PANE_FIRST, &ccontext);
m_pNewView->OnInitialUpdate();
SetActiveView(m_pNewView);
m_pNewView->ShowWindow(SW_SHOW);
RecalcLayout();
}
//
if (!InitCommandBars())
{
return -1; // fail to create
}
CXTPCommandBars* pCommandBars = GetCommandBars();
// LOADTOOLBAR
CXTPToolBar* pCommandBar = (CXTPToolBar*)pCommandBars->Add(_T("Map"), xtpBarBottom);
if (!pCommandBar ||
!pCommandBar->LoadToolBar(IDR_TOOLBAR_MAP))
{
TRACE0("Failed to create toolbar\n");
return -1;
}
// LOAD TOOLBAR
CXTPToolBar* pExtendedBar = (CXTPToolBar*)pCommandBars->Add(_T("Edit"), xtpBarBottom);
if (!pExtendedBar ||
!pExtendedBar->LoadToolBar(IDR_TOOLBAR_MAP_EDIT))
{
TRACE0("Failed to create toolbar\n");
return -1;
}
DockRightOf(pExtendedBar, pCommandBar);
// Initialize the docking pane manager and set the
// initial them for the docking panes. Do this only after all
// control bars objects have been created and docked.
m_paneManager.InstallDockingPanes(this);
m_paneManager.SetTheme(xtpPaneThemeOffice);
// Create docking panes.
CXTPDockingPane* pwndPane1 = m_paneManager.CreatePane(
IDR_PANE_ATTRIB, CRect(0, 0,200, 120), dockBottomOf);
//pwndPane1->SetOptions(xtpPaneNoCloseable);
m_paneManager.SetTheme(xtpPaneThemeOffice2003);
return 0;
}
void CFrameWndCgMap::OnNcPaint()
{
CFrameWnd::OnNcPaint();
CWnd *pWnd = AfxGetMainWnd();
if (pWnd)
{
pWnd->SendMessage(WM_SIZE);
}
}
---------------------------view class------------------
class CViewCgMap : public CView
{
DECLARE_DYNCREATE(CViewCgMap)
protected:
CViewCgMap(); //
virtual ~CViewCgMap();
public:
public:
virtual void OnDraw(CDC* pDC); //
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
DECLARE_MESSAGE_MAP()
public:
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnBtnZoomin();
};
Help Help............................krying.
|
|
|
|
|
Hi all,
I am getting this error when I try to retrieve an attachment property here is my code:
hrProperty = HrGetOneProp((LPMAPIPROP)m_Attachment, PropertyID, &lpPropValue);
if (hrProperty == S_OK)
{
int len = WideCharToMultiByte(codePage , 0, (const wchar_t *)lpPropValue[0].Value.lpszW, -1,0, 0, NULL, NULL );
LPSTR pTemp;
MAPIAllocateBuffer(len,(LPVOID *)&pTemp);
WideCharToMultiByte(codePage , 0, (const wchar_t *)lpPropValue[0].Value.lpszW, -1,pTemp, len, NULL, NULL );
pRetVal = pTemp;
MAPIFreeBuffer(pTemp);
return (pRetVal);
}
When it passes the HrGetOneProp I am getting Access violation writing location 0x10161b7c. and it is pointed here:
AutoMapiPtr<SPropValue> m_PropertyCache;
protected:
PropertyMap m_Properties;
Attachment(AutoMapiPtr<SPropValue>& PropertyCache, PropertyMap &Properties) :
m_PropertyCache(PropertyCache), m_Properties(Properties)
{
}
public:
virtual ~Attachment()
{
}
virtual void SaveToFile(const wchar_t* FileName) = 0;
FoundProperty FindProperty(ULONG PropTag)
{
return m_Properties.find(PropTag);
}
virtual std::wstring Type() = 0;
};
at the
virtual ~Attachment()
{
}
I am not sure why as I know the property I search for exists.
Thanks I hope you can help me resolve this issue,
Jj
|
|
|
|
|
Just a quick question about enums in C++. I have an enum where each member corresponds to an I/O bit, e.g.
enum t_MyEnum {<br />
my_IO_1,<br />
my_IO_2,<br />
my_IO_3<br />
};
My question is, is there any way I can not include my_IO_2 in the enum? For example if a flag (global variable) is set, my_IO_2 is not a part of the IO memory map.
I know I can use #ifdef to not include it at compile time but any clever solutions to doing so at run time?
Thanks in advance!
|
|
|
|
|
No because the enum type, including its members, have to be known at compile time. You can't modify types at runtime.
|
|
|
|
|
Im searching for a windows programer for a free project . Please e- mail me if you ara interested. cj_beifa@hotmail.com
!!!
|
|
|
|
|
Hi all,
I am planning on writing an MFC application where I can open any TIFF or BMP images and do some manipulation on only TIFF images. All my tiff images are gray scale images which are anywhere from 512x512 to 5000x5000 in dimensions. The purpose of this application is to open a TIFF image and select some points on the image using mouse button click and change those selected points to a color pixel. So when the user keeps on selecting points on the image they are displayed in color. For this purpose, when ever the user click on a point on the image, I should be able to get the exact pixel location with respect to actual image (irrespective of the zoom level or position of scroll bars),Since all my tiff images are gray scale, when I open using Bitmap class, they are being opened as 8bppIndexed format.
Can someone explain me how I can do this??
thanks in advance
PKNT
|
|
|
|
|
You should start first with the loading of your image. Start by reading this article: BMP Scroll
|
|
|
|
|
As for displaying TIFF/BMP images, I followed the example over here[^] and created a new MFC application. I am still working on it to understand every step thats done in tht example. The good part with this example is it converts TIFF images into 24bpp images while displaying which will be easy for me to manipulate pixel data.
PKNT
|
|
|
|
|
How do you send a button click message to parent window?
Message I want processed in the parent:
ON_BN_CLICKED(IDC_EDIT_SOMEBTN, OnEditBtn)
In the child:
this->GetParent()->SendMessage(
am I on the right track, what do I need to put in the SendMessage?
|
|
|
|
|
littleGreenDude wrote: ...what do I need to put in the SendMessage?
My first guess would be BM_CLICK .
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
it has to be more than that... that would be sending the BM_CLICK message to the parent window how would the parent window know to associate the click witht he proper control?
|
|
|
|
|
Don't you have to send the message to the control itself ?
Maybe with something like :
CButton* pButton = (CButton*)GetTheButtonFromYourUI();
pButton->SendMessage( ... );
|
|
|
|
|
You send BM_CLICK to the button, which in turn, notifies the parent with a BN_CLICKED notification.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
::SendDlgItemMessage(hWnd,IDC_EDIT_SOMEBTN,BM_CLICK,0,0);
|
|
|
|
|
Use WM_COMMAND .
Please refer here[^] for more information.
Regards,
Paresh.
|
|
|
|