|
I'm from Australia. My profession is a programmer - Does that make me a professional?
Steve
|
|
|
|
|
I am having problems using the IStorage interface with multiple writers. I've reviewed and used all the info on MSDN regarding these but regardless if I have two writers at the same time, I lose the changes of one.
In particular I've noticed problems using multiple writers and TRANSACTED mode, I was wondering if anyone has done any work with this?
Specifically, if I have two writers open the storage at the same time and the modify two different streams or sub storages, the writer that closes the storage last keeps their changes. It does not seem to matter what flags I specify and I can't seem to get this working with multiple writers. If you have any suggestions please let me know.
Thanks,
Dustin
DH
|
|
|
|
|
am i using sockets correctly?
<br />
class CMySocket : public CAsyncSocket<br />
{<br />
public:<br />
CMySocket() : CAsyncSocket() {}<br />
<br />
void OnAccept()<br />
{<br />
_tprintf(_T("incoming connection\n"));<br />
}<br />
};<br />
<br />
<br />
if( !AfxSocketInit() )<br />
_tprintf(_T("Cannot init sockets"));<br />
<br />
CMySocket* sock = new CMySocket;<br />
if( sock->Create(1935,SOCK_STREAM,FD_READ | FD_WRITE) )<br />
_tprintf(_T("Created!\n"));<br />
if( sock->Listen() )<br />
_tprintf(_T("Listening!\n"));<br />
delete sock;<br />
the thing is that listening doesn't seem to get aby results though another app connects to that port. i am sending data from my FLASH movie via XMLSocket object but no result
|
|
|
|
|
Some time ago when it was common that an application/game came on a single diskette one way to make it fit was to compress the executable and then inflate it on startup into memory.
Is something similar available for Win32 executables?
Thanks Andre
|
|
|
|
|
|
Hi All,
The project I am working with is a Win32 in Visual c++ 6.0.
I am calling the API GetEffectiveRightsFromAcl:
dwResult = GetEffectiveRightsFromAcl(
ppDacl, // PACL pacl,
pTrustee, // PTRUSTEE pTrustee,
&dwAccessMask // PACCESS_MASK pAccessRights
);
It is returning with error code 1722 (RPC_S_SERVER_UNAVAILABLE).
The parameters ppDacl and pTrustee seem to be set properly.
Other APIS, such as GetExplicitEntriesFromAcl and LookupPrivilegeValue can be called with no errors returned.
Any help is appreciated.
Edward
|
|
|
|
|
|
I have a dialog box with a button. I want to handle the following event: the right button mouse click on the dialog box button. How can it be done?
AMV
|
|
|
|
|
Subclass the button and handle the WM_RBUTTONDOWN and WM_RBUTTONUP messages. There are several articles on subclassing controls here on CP, just do a search.
You may be right
I may be crazy
-- Billy Joel --
Within you lies the power for good - Use it!
|
|
|
|
|
|
void CssDlg::OnContextMenu(CWnd* pWnd, CPoint point)
{
HMENU hmenu,hmenuPopup;
hmenu = LoadMenu(AfxGetApp()->m_hInstance,(LPCTSTR) IDR_MENU1);
//you can use like this
if(pWnd->m_hWnd==m_Button1.m_hWnd)
hmenuPopup = GetSubMenu(hmenu, 0);
else
if(pWnd->m_hWnd==m_Button3.m_hWnd)
hmenuPopup = GetSubMenu(hmenu, 1);
TrackPopupMenu(hmenuPopup, TPM_LEFTALIGN | TPM_LEFTBUTTON,
point.x,point.y, 0, pWnd->m_hWnd, NULL);
DestroyMenu(hmenu);
}
|
|
|
|
|
I'm trying to decide when it's best to use a dialog based app and when to use a normal window.
What are the advantages and disadvantages of both methods ?
What basic rules should I use to decide which method to use ?
|
|
|
|
|
Just found the following article by Nish
http://www.codeproject.com/dialog/pretransdialog01.asp
which indicates a key difference "...is that in a dialog based application the focus is always on one of the child controls and not on the main dialog window."
He also gives a couple of ways to handle keyboard messages and accelerators.
Aside from this, are there any other big differences ?
|
|
|
|
|
What do you mean by a normal window ? A dialog box is also a normal window .
Are you speaking about the SDI (single document interface) framework ?
|
|
|
|
|
I mean a non-dialog window (eg. SDI or MDI).
|
|
|
|
|
Then it depends of the complexity of your program. The advantage of SDI/MDI apps is that they have the document/view architecture that can help a lot writing complex applications. But also, if you have a very simle app (two buttons and an edit box for example ), then it is a little bit overkill.
Of course, I'm speaking here about a SDI (or MDI) app when the view class inherits from a CFormView (to have a something similar as a dialog box).
-- modified at 15:56 Tuesday 2nd May, 2006
Also, what I forgot to say is that SDI/MDI apps offer more support for toolbars, menus, serialization, ...
|
|
|
|
|
I will be thankful if anyone can describes me the coding of " scientific calculator by Tahir Naeem".specially MFC functions in this calculator..........plzzzzzzzzzz.......
before 4th may 2006........plzzzzzzzzzzzzzzzzzzzzzz
I m waiting.........
|
|
|
|
|
Could you stop begging? plzzzzzzzzzz plzzzzzzzz plzzzzzzzz?
|
|
|
|
|
Is it possible to open Shared Memory in a C# Windows application, that was created in a C++ app using the CreateFile, CreateFileMapping API.
(& if it is possible, can I get a hint where to start looking for some "instructions" (e.g., sample code)?)
|
|
|
|
|
i am using visual c++ 2005 in my project,i am stuck in one step i.e., converting any image given to matrix, this matrix is very essential for the futher processing my project, can any one please help in telling me how to convert the given image to matrix
|
|
|
|
|
You have to be way more specific. How is your image stored? How are you reading it in?
John
|
|
|
|
|
to be more specific here matrix means a two dimensional array of interger,
here we have to find the intensity of each pixel and store then int he array
for example consider an image with resoultion 5x5 if the intesity of
0x0 pixel is 10 and 0x1 pixel is 20 then
the matrix will be
10 20 .. .. .. ..
.. .. .. .. .. ..
.. .. .. .. .. ..
.. .. .. and so on
|
|
|
|
|
|
thank u for the participation in solving the problem sir,
to be more specific here matrix means a two dimensional array of interger,
here we have to find the intensity of each pixel and store then in the array
for example consider an image with resoultion 5x5 if the intesity of
0x0 pixel is 10 and 0x1 pixel is 20 then
the matrix will be
10 20 .. .. .. ..
.. .. .. .. .. ..
.. .. .. .. .. ..
.. .. .. and so on
and one more thing is, i am not able to find a function in visual c++ 2005 to get the intensity of the pixel, for example C-language provides getpixel function, in vc++ this function is there but it operates only on bitmap files but i need to find intensity of the pixel even to jpg, and other forms of the image file
|
|
|
|
|
this is a really big task.
i recommend you look into something like GDI+, or a toolkit like CIXImage (here on CodeProject), or even a commercial product (for example, the one at the bottom of this post).
if you want to be able to read any kind of image file into a buffer that you can pick pixels from, you're going to have to spend some time and effort with a toolkit that can handle all the file format parsing for you.
Cleek | Image Toolkits | Thumbnail maker
|
|
|
|