|
|
When begin dragging, them dragging image will offset twards left and up a little to the original one. I'd like the two images (original and dragging) in the same rect at the very begining. Here is the code:
void CDragDropListCtrl::OnBegindrag(NMHDR* pNMHDR, LRESULT* pResult)
{
NM_LISTVIEW *pNMListView = (NM_LISTVIEW*)pNMHDR;
SetCapture();
CImageList *pIL=GetImageList(LVSIL_NORMAL);
CRect rt;
GetItemRect(pNMListView->iItem,&rt,LVIR_ICON);
CPoint pt;
GetCursorPos(&pt);
ScreenToClient(&pt);
pt.x-=rt.left;
pt.y-=rt.top;
pIL->BeginDrag(pNMListView->iItem,pt);
ClientToScreen(&rt);
pIL->DragEnter(NULL,rt.TopLeft());
m_Dragging=TRUE;
*pResult = 0;
}
modified on Thursday, December 06, 2007 5:33:04 AM
|
|
|
|
|
Is there anyway to access a remote hard disk and process it as if it was a local hard disk? I mean, I want to read sectors of data from the remote hard disk which is connected to another machine in the same LAN. Can anyone tell me about how I can get a handle to the remote disk?
Regards,
Vijay.
|
|
|
|
|
Using the CWMPPlayer4 wrapper how should I get for event notifications?
Like, when a file is finished playing or when come back from full screen viwer etc.
(CWMPPlayer4 is composed without IWMPEvents Interface)
Please answer.
Thanks.
|
|
|
|
|
Were you able to figure this out? I have the same problem
|
|
|
|
|
Would anyone of you recommend a suitable site wherein I would be able to submit a game and receive feedback from players / game testers? By the way, I programmed the game using DirectX (indirectly because I used the CDX Library for this one). It's a revision of the Sokoban game in a 2.5 dimensional setting.
Thanks.
|
|
|
|
|
|
Really? Would you instruct me because there are a lot of hyperlinks here? Thanks.
|
|
|
|
|
see the Chapters section on the left bar ?
then choose the category that fits you best, and then submit[^] your article to the editors. I advise you to submit by mail because the sumbission wizard is currently deactivated, due to the site's migration...
|
|
|
|
|
Right, because I was having a problem with another site "cppgames.com" and their "submit game" option wasn't working properly. Anyway, the project I'm working on is at the beta stage so I just need feedback and suggestions from players. Well, thanks again. I'll try to do that.
Only fools rush in. Foo!
|
|
|
|
|
be aware that codeproject article is more a place for complete articles (more than articles still in draft), so be aware of it and don't forget to notify it to the readers...
|
|
|
|
|
You can also use the forum colaboration / testing[^] the description is "to search beta testers". And once you have reports, then post the game in an article If you are just searching for freedback for corrections, then use the forum i told you.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
modified on Thursday, December 06, 2007 6:26:18 AM
|
|
|
|
|
you could also try sourceforge.org for this type of stuff
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|
|
From what I understood, he just want to submit a game, and not write an article about it. He just wants some feedback for his game.
|
|
|
|
|
Yup. You're all right. There is this site www.cppgames.com where one can submit a game (whether full version / beta test). Once submitted, it will be saved within the sites database and members may download the game and do as they please. You may either submit the source code or the executable file. In my case, I just need to submit the executable file since my program is a beta version. So, right now I'm just looking for another SUITABLE for the said purpose. Thanks for all your feedback. I'll try out the websites that you recommended and see what's going on there.
|
|
|
|
|
than codeproject is not right place for you as article must accompany with the source code otherwise article will get deleted!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|
|
You can not update the game here in the website, but you can use megaupload or something like and post the link in the collaboration and testing forum[^]. Users will download and test it, and you can get the feedbacks there too.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
Hi all,
I have a byte stream, consisting of two parts. First 4 bytes gives an int value. Rest of the part give just a name. I want to read them separately.
I've tried something like this.
<br />
UINT vBuffer[4];<br />
::memcpy(vBuffer,InMsg.GetDataBuffer(),sizeof(vBuffer));<br />
used memcpy to copy the first 4 bytes to my buffer. Now I have two question. How read the vBuffer and find the value? How to read the rest?
I appreciate your help all the time...
Eranga
|
|
|
|
|
you say the first 4 bytes give an int value, but you don't read 4 bytes, you read 4 UINTs (that means, 16 bytes on a 32 bits system, and 32 bytes on a 64 bits system).
moreover, you're writing into an undefined buffer.
why don't you just do this:
<font color="green">
<font color="blue">unsigned long</font> nSize = 0;
<font color="green">
::memcpy(&nSize, InMsg.GetDataBuffer(), <font color="blue">sizeof</font>(nSize));
then you don't have much complicated task to read the size...
modified on Thursday, December 06, 2007 5:24:09 AM
|
|
|
|
|
Ok, I got the point where I'm going wrong.
I have a question on your code. in memcpy first argument should be the new buffer to copy from the existing buffer. But here nSize is not a buffer at all. Can you clear me on it.
I appreciate your help all the time...
Eranga
|
|
|
|
|
oh god, you're right. i updated my previous answer so that the 4 bytes are written at the memory used by the nSize variable
|
|
|
|
|
How about my second question. I know that after reading the initial 4 bytes of the stream, stream points to the next byte start position. Since the length of the rest vary how can I read as u said. It's string, just a name like "ball, house, etc...."
I appreciate your help all the time...
Eranga
|
|
|
|
|
what about using strncpy() and pass it the integer formerly extracted ?
<font color="green">
nSize = 0;
<font color="green">
::memcpy(&nSize, InMsg.GetDataBuffer(), <font color="blue">sizeof</font>(nSize));
char* pszBuffer = new char[nSize + 1]; <font color="green">
::strncpy(pszBuffer, <font color="green"></font>, nSize);
pszBuffer[nSize] = <font color="gray">'\0'</font>;
std::string strData = pszBuffer;
delete[] pszBuffer;
modified on Thursday, December 06, 2007 5:15:54 AM
|
|
|
|
|
Yep, initially I thought about this. But failed to do it. Because my destination is a string, that is my requirement. But my destination is in a buffer, a byte stream. I want to read it after finding the int value.
toxcct wrote: pass it the integer formerly extracted ?
I'm not clear this.
I appreciate your help all the time...
Eranga
|
|
|
|
|
i don't understand your problem... why can't you use strncpy() ?
you say you want to read it after getting the int value, but isn't it what i'm doing there ?
|
|
|
|