|
Actually this is a sample to check "How to display image from an byte array?"
In my actual requirement, I will be having an byte array, i have to display image from it?
I was just trying withe the function , but nothing gets displayed !!
Any other simple technique to display Byte Array to image on my dialog box !!
Please its very urgent!!
thanks !
|
|
|
|
|
You code doesn't make sense.
As I said again and again you should at least know how the image data is stored in your buffer before even attempting to display it.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
|
hello,
After i build my project and run it i get the following error :
Debug assertion failed
Program: C:\Documents and Settings\tasmin\Desktop\Ref Projects\FINAL CBIR\NggolekiGinambaran\Debug\NggolekiGinambaran.exe
File: f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\appcore.cpp
line: 380
i don have a "f" drive in my system. i'm not able to understand wat this means and refers to.
please help.....
tasmin
|
|
|
|
|
What about 'Rebuild all'?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Try and debug to check the point where you get this assertion.
If you don't find a solution try cleaning and building your code and then run it.
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
i tried the option
// initialize CWinApp state
ASSERT(afxCurrentWinApp == NULL); // only one CWinApp object please
pModuleState->m_pCurrentWinApp = this;
ASSERT(AfxGetApp() == this);
this is exactly where it stops .... but why is it referring to "f" drive in the error, which i don have at all ... should i have to change some property setting or some thing
|
|
|
|
|
tasmin iqbal wrote: i don have a "f" drive in my system. i'm not able to understand wat this means and refers to.
The f drive was on the machine that built the MFC DLLs that come with Visual Studio. The complete path to the source code got embedded in the assertion when the MFC DLL was built.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
thanks for the response,
The f drive was on the machine that built the MFC DLLs that come with Visual Studio. The complete path to the source code got embedded in the assertion when the MFC DLL was built.
can u please tell me how to solve this issue ....
tasmin
|
|
|
|
|
The first thing you need to do is learn how to ask a question with enough detail that someone can think about answering it. For example, what version of Visual Studio is the error from?
Secondly, you need to learn to use Google - the assertion that's failing is ASSERT(AfxGetThread() == NULL) (I have psychic debugging capability - don't ask). Googling[^] that leads to several pages indicating that a) you have more than one object derived from CWinApp, b) you're calling your application objects constructor multiple times, or c) you're using multiple MFC DLLs with inconsistent results.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Have you looked at line 380 of appcore.cpp to see what the assertion is?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
i have a report style CListCtrl.
How do i retrieve the text from the individual cell.
Actually I have been able to get the selected row but seem to be having problems trying to get the row,column combination.
this gives me the row:
int nSelected = m_handselection.GetNextSelectedItem(x);
I have searched and might have either overlooked or could not find anything to give me the column.
|
|
|
|
|
GetItemText[^]
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
Yes.
CString GetItemText(
int nItem,
int nSubItem )
I can get the the nItem which is the row i have clicked.
How do I get the nSubItem?
|
|
|
|
|
FISH786 wrote: CString GetItemText(
int nItem,
int nSubItem )
CString GetItemText(
int nItem,
int nSubItem )
Did you see the definition. Don't you spot the return value from the function.
Spoonfeeding Uhh!
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
Not. really. I did get the row, but can't get the column.
I used
nItem = m_myListCtrl.GetNextSelectedItem(pos);
but could not find anything simmilar to GetNextSelectedItem() to get the Column.
Like I said I don't know and could not find what to use to get the column.
Was asking for help only.
Thanks In advance.
|
|
|
|
|
nSubItem == column
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
thanks. I realized that but am having a hard time or have missed something to get the column.
I know I have the right row, since when i use the getItemtext with the nItem, and hadcoded "0", I get the first column values.
But once again I am having a difficult time to change that "0" to the selected column or clicked column cell.
|
|
|
|
|
Ah - you want the sub-item that the user clicked on!
The selection model for lists only includes selected rows, not columns. This means that what you need to do is handle the NM_CLICK notification[^] for the list view. This notification contains a pointer to an NMITEMACTIVATE structure[^] which contains details of where the click occurred, including the sub-item. You can then store that sub-item as the 'last-clicked sub-item'?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
|
Hello,
I have a project without Doc-View Architecture.I have ChildFrame derived from CMDICildWnd and ChildView1 derived from CView .When a new window is made it is made properly but when I want to close the window I get Debug Assertion failure.
When I debugged the program the problem is with the destructor of the ChildView.
I have another ChildView2 derived from CWnd but there is no problem in closing this window.
How should I go about rectifying the destructor ?
Prithaa
|
|
|
|
|
Debugger is your best friend...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hello,
Thanks for your answer.
But I wanted to ask you if creating a ChildView derived from CView must have created a problem since the basic project's view is derived from CWnd which works fine.
And why is it that the view's destructor causing a Debug Assertion ?
Pritha
|
|
|
|
|
prithaa wrote: But I wanted to ask you if creating a ChildView derived from CView must have created a problem since the basic project's view is derived from CWnd which works fine.
Form experimental point of view your code has (at least) a problem.
prithaa wrote: And why is it that the view's destructor causing a Debug Assertion ?
You probably won't know that, since you apparently are not using the debugger as suggested.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hello,
Thanks for your answers.
You probably won't know that, since you apparently are not using the debugger as suggested.
How is the debugger to be used ?
Pritha
|
|
|
|