|
I do delete the objects like so at the beginning of the function:
if(pm_hBmpNew != NULL )
DeleteObject(*pm_hBmpNew);
if(p_cbmME !=NULL)
DeleteObject(*p_cbmME);
if(pm_hBmpOld != NULL)
DeleteObject(*pm_hBmpOld);
if(imagedata != NULL)
DeleteObject(imagedata);
if (prectStaticClient !=NULL)
DeleteObject(*prectStaticClient);
if (pm_st !=NULL)
DeleteObject(*pm_st);
but it is still not working. Am just deleting all of the ones that could possibly be involved but just not working. Could it be anything else? How would I go about detaching the bitmap from the CBitmap? Thank you for all your help so far
|
|
|
|
|
Oh my dear god I just finally found that detach handle and
IIIIITTTT WWOOOOOORRRKKKKKSSSSSS!!!!!!!!!!!!!!!!!!!!!!!
Oh thank you both so much, you don't believe how long I was working on this and just did not know that. Oh thank you! Thank you! Thank you!
|
|
|
|
|
hi all
i had made applicaton that generate the barcode and now i want the to make it as com component and acces through site. i mean online barcode geneator. it works fine as destop application.
i want to know how to use mfc classes in atl. or these allowed or cannot use these classes in atl 7. im using visual studio.net 2003. and atl 7 project.
Tasleem Arif
|
|
|
|
|
Yes, I think you can. It is just a COM dll using MFC. But in the project options, there is this option of "Attributes". Just uncheck it, now you could select MFC also. If you don't specifically include similar ATL header files, (like for CString, which is available in both MFC and ATL), it is all ok. I never had a problem with using both of them in one project (although I only used VC6).
this is this.
|
|
|
|
|
thanks for reply i will try that
ddd
|
|
|
|
|
Hello,
I am currently converting my win32 application into a .rtss based RTX application. However, my application requires a .dll file which for some reason cannot be opened by my .rtss application. Is there something i must do for my .rtss application for it to be able to open .dll files ?
|
|
|
|
|
Hi!
I found the following explanation to a subroutine. The subroutine gets 2 values, the second one is optionally set to zero or to an result. When it is set to zero, I have to write :
Export((_bstr_t)name, (VARIANT *)NULL);
But what kind of typecast do I have to do, if I will use as a first and second parameter a _bstr_t or CString-Type in the RESULT-array? I tried some things, but nothing worked.
Explanation from help file:
Sub Export( ByVal PathOrFilename As String,Optional ByRef Result As Variant )
Result is an array containing four string items, 1st is the complete filename or empty 2nd item is the complete navigation filename or empty 3rd item is the complete meteo filename or empty 4th item is the complete tilt filename or empty.
Thanks a lot, Hanno
-- modified at 4:23 Tuesday 28th March, 2006
|
|
|
|
|
hanno25 wrote: Sub Export( ByVal PathOrFilename As String,Optional ByRef Result As Variant )
This is VB so I don't really see what you are trying to do. You know that you are on a C++ forum ?
|
|
|
|
|
Yes, I know that. The help-file only gives informations in VB.
I have to use the supplied COM-interfaces in C++.
Below, there is the information from the precompiled header file:
inline HRESULT xxx::ICoClass::Export ( _bstr_t PathOrFilename, VARIANT * Result ) {
HRESULT _hr = raw_Export(PathOrFilename, Result);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _hr;
}
But that doesn't gives informations, that the result-Parameter has to be handled as a array, that's why I copied the VB-code in the first text.
Hanno
|
|
|
|
|
hi
im implemnting client server communication(TCP/IP) with the use of CCesocket functions.
currently im running the application on an emulator.
the application works fine till the point of ONACeept() function..
there are certain problems when the OnReceive function of server has to run.
the server does not receive data sent by client whereas the client does accept the data from the server...
can someone please help.......
Ekta Ahuja
ahuja.ekta@gmail.com
|
|
|
|
|
Ahuja Ekta wrote: there are certain problems when the OnReceive function of server has to run.the server does not receive data sent by client whereas the client does accept the data from the server...
Try WSAGetLastError to reterive actually what problem winsock is facing .
|
|
|
|
|
CCeSocket does not work well as a server. See, for example, "BUG: CCeSocket OnReceive() does not get called for accepted data sockets" at http://support.microsoft.com/default.aspx?scid=kb;en-us;253945[^]
It sounds like this might be your problem, and the above link gives a work-around. But the work-around involves modification to the MFC library header for Wcesock.h and sounds a bit nutty to me. Frankly, I would avoid use of CCeSocket in a server, and write my own from the basic Winsock API.
Best,
Mike
|
|
|
|
|
i am working on MFC with .net enviornment.i am using list control and it so many item items at run time and also show scroll bar as needed but when i shift the list controll column then these scroll bars are hide(not show) but i want thease scroll bar as needed but not hide when i shift the list control item.
so please told me where i am wrong.
Bankey Khandelwal
Software Engineer
|
|
|
|
|
Bankey Khandelwal wrote: MFC with .net enviornment
Do you mean VS2003 or VS2005 ? Or managed code ?
Bankey Khandelwal wrote: i shift the list controll column then these scroll bars are hi
What do you mean with "shift the list control column" ? In the resource editor of your list control, you should have a property that forces the scroll bars to be always drawn. Check there.
~RaGE();
|
|
|
|
|
i am doimg i project using c++ builder program and a matlab program...now i wanna want to combine the 2 output of project to do something...
assume that t is matlab output and f is c++ builder output
j=t*f;
if(j==1)
{
........
the problem is how can i compile matlab to c++ builder...i have look some explaination in matlab help but i want see some example so that i can understand clearly the process to do it...because now i so confuse with it...pls send to my e-mail leehf29@yahoo.com if you know about it...
thanks a lot.....
|
|
|
|
|
I honestly did not exactely understand what you meant, but search for 'matlab' on the search combobox up there anc check the result, it should help you...
~RaGE();
|
|
|
|
|
Using the resource Editor I create a menu and add text for the menu items. When adding the text I use the amperstand '&' to underline a char in the word eg '&Save'. The preview in the resource editor shows it correctly. But within the app only the word is visible and no underscore.
How do you do it?
|
|
|
|
|
waldermort wrote: But within the app only the word is visible and no underscore.
The new default is not to show keyboard accelerators. With the menu open, press the "alt" key to show the accelerators. There is a way to change the default behavior, I’m just drawing a blank, but is somewhere in the control panel.
|
|
|
|
|
Thanks for the quick reply. I have to laugh, I have been working on windows for so long I never noticed this behaviour with the menus, I can see it everywhere now.
|
|
|
|
|
actually, this happens not only by Alt but by keyboard selection...
take for example a dialog box, which opens another dialogBox.
if you navigate through the menu an click the item which opens the child dlg with the mouse only, then the controls in the child will not show the accelerators neither. but if you navigate using the keyboard (F10 or Alt to open menu), then the child dialog controls will show their accelerators...
can you see them ?!
|
|
|
|
|
Right-click the desktop and select Properties. Click the Appearance tab. Click the Effects button. Uncheck the "Hide underlined letters..." checkbox.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Hi all,
I need your help for a problem.
I am working with an owner-drawn, report view CListCtrl.
In the OnCustomDraw event I am drawing the list. Sometimes 2 blank
rows are getting added at the start. The first row does not take any
event but if I click on second row, actual first row (By actual first
row I mean where I can see the text of first row) gets selected. So I
think, I can't say it as rows. It is a space with height of 2 rows.
To make this clear, let's assume bottom of header is 13 and first row
starts at 15. The height of each row is 15. After debugging I noticed,
1. The whole list is drawn properly.
2. Then, from 15 to 30 blank space is added.
3. Then, form 15 to 45 blank space is added.
That means actual rows start from 45.
I tried to solve this in following ways:
1. Take rectangle of each item by GetItemRect() and then check if any
row is added. If added then change the co-ordinates accordingly. But
this is not making windows understand that the list is shifted.
Finally, for windows rows start from 45 and thats why any clicking is
giving miserable results.
2. Take top-left point using GetItemPostion() and if any row is added
do SetItemPosition(). But SetItemPosition doesn't work for report
view.
3. I am handling CDDS_ITEMPREPAINT | CDDS_SUBITEM event. In this switch block, I just changed background color and textcolor and rows are inserted using InsertItem() and SetItem() while creating the list.
Here I am unable to see list. And in the debug log, I can check first row is starting from 45 i.e. after two blank rows.
4. I am again handling CDDS_ITEMPREPAINT | CDDS_SUBITEM event, but instead of just changing colors I have merged Drawitem() here and then DrawSubItem is called. I have eliminated for loop in DrawItem() and the rectangle passed to DrawSubItem() is taken as GetSubItemRect().
Here again I am getting both above mentioned problem and in addition to that, when subitem index is '0', GetSubItemrect() gives rectangle for whole item.
I am not able to understand whatever approach I take, first row is starting after two blank rows. Even I am not able to see list, I can get its position is log. How can I make understand windows that first rows should start from perticular position? What can I do with this?
Chioo.
|
|
|
|
|
Maybe just a small guess, but does not the OnCustomDraw get called too often ( then adding clumsy lines unpurposely ?)
~RaGE();
|
|
|
|
|
Can you please explain me bit more? I am really unable to understand your comment as I am quite new.
Chioo.
|
|
|
|
|
Hi
Is there a way to get the current (or largest so far used) stack size for a single-threaded Windows application?
(I found this posting so far but it contains only pieces of information with which I don't get the the big picture working)
We do have a client/server application including some nasty bugs and I shall evaluate if it's possible in case of a crash or assert to automatically send a trace dump from the client to the server. For that I need an estimate how large the stack usually is in the client. For that I want to find out its current size at rumtime.
Thanks,
T.T.H.
|
|
|
|