|
http://lcdinterfacing.googlepages.com
|
|
|
|
|
Of course your message was reported as abuse.
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]
|
|
|
|
|
Ive similarly flagged the other two posting in the other forums
hope you're well and rested after the xmas/New Year break
'g'
|
|
|
|
|
Garth J Lancaster wrote: hope you're well and rested after the xmas/New Year break
Best wishes to you
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]
|
|
|
|
|
CPallini wrote: Of course your message was reported as abuse.
humm i am thinking of doing same!
"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
|
|
|
|
|
Why its here?
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
not mine!
"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
|
|
|
|
|
Dear All
I want to create the OnDestroy command in VC2005.
But because there is no ClassWizard in it, I dont know how to do this
could u please help me?
Regards
Monhi
|
|
|
|
|
See Q7 and Q10-Q12 here[^].
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
thanks
It was really helpfull.
|
|
|
|
|
I'd like to make a popup menu with the following code. However my assertion (ASSERT(m_Popup)) always fails. I've no idea what the problem could be. Thanks.
void CChildView::OnContextMenu(CWnd* pWnd, CPoint point)
{
CMenu PopupMenu;
PopupMenu.LoadMenu(IDR_P);
CMenu *m_Popup = PopupMenu.GetSubMenu(0);
ASSERT(m_Popup);
m_Popup->TrackPopupMenu(TPM_LEFTALIGN |TPM_RIGHTBUTTON, point.x, point.y, this);
}
|
|
|
|
|
GetSubMenu() only returns a sub menu that already exists.
If you want to create a new one, you must call CreateSubMenu() , and then attach menu items to it with AppendMenu or InsertMenu .
|
|
|
|
|
Thaks for the answer. I created a menu (IDR_P), and I thought that loading it would do all the aforementioned, or what is the point in using creating Menu resources?
Of course if I can't get around it, i will use the method you suggested I just thought that using a resource would be simpler. Thanks again.
|
|
|
|
|
Does PopupMenu.LoadMenu(...) succeed? If so, is there a popup menu at index 0 in the IDR_P menu?
|
|
|
|
|
I also did an assertion on PopupMenu.LoadMenu() and it was OK. How can I check if there is a popup menu at index 0?
Thanks
|
|
|
|
|
Thanks, the latter part was the problem.
|
|
|
|
|
As a side note, m_Popup is not a good name for a local variable. The m_ prefix is normally used to indicate that a variable is a member variable (member of a class or struct ).
Steve
|
|
|
|
|
|
I have an array of BYTEs named aBytes. As you know, It looks some thing like this in the memory:
1000100110001010100011011011010110110101 ...
memory increase ---->
Now I want to separate 6-Bit chunks from the begin, as follow:
100010011000101010001101101101011011 ...
memory increase ---->
I used this code:
typedef unsigned __int32 BASE64
struct CHUNKS
{
BASE64 First:6;
BASE64 Second:6;
BASE64 Third:6;
BASE64 Fourth:6;
}*pChunk = NULL;
for (int iCountor = 0; iCountor < Size_Of_aBytes; iCountor++)
{
pChunk = (CHUNKS*) (aBytes + iCountor);
} But each time, I get wrong values. Where is the problem?
Thank you masters!
|
|
|
|
|
Hi Jusef,
iCountor is counting 4-byte integers and you want the pChunk pointer to advance by 4 bytes, however aBytes is a char pointer, so adding iCountor to it is not correct. You should use one of these:
pChunk = (CHUNKS*) (aBytes + 4*iCountor);
pChunk = ((CHUNKS*)aBytes) + iCountor;
|
|
|
|
|
What type is aBytes ?
I'll presume it's a char or BYTE pointer. You want to increment it by sizeof (struct CHUNKS) , as you want to manipulate items of that type. One wrinkle - making sure you don't increment off the end of the byte array and making sure that all of a CHUNK is in the array.
Anyway - try this:
for (int chunkCountor = 0; chunkCountor < Size_Of_aBytes/sizeof (struct CHUNKS); chunkCountor++)
{
pChunk = ((CHUNKS*) (aBytes)) + chunkCountor;
}</pchunk>
|
|
|
|
|
You're on the right track, but remember that a BYTE is 8 bits, so you can't just use aBytes + iCountor to increment the way you are.
One suggestion would be to decode three bytes (four values) at a time in your loop:
struct CHUNKS
{
DWORD First:6;
DWORD Second:6;
DWORD Third:6;
DWORD Fourth:6;
} *pChunk = NULL;
int iCountor = 0;
for (iCountor = 0; iCountor < Size_Of_aBytes; iCountor += 3)
{
if ((iCountor + 3) <= Size_Of_aBytes)
{
pChunk = (CHUNKS*) (aBytes + iCountor);
}
else
{
}
}
Note that this is UNTESTED code, but should give you what you're looking for.
Hope that helps.
Karl - WK5M
PP-ASEL-IA (N43CS)
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
|
|
|
|
|
Hai all,
We have around 7 dialog boxes in our application. And to navigate from one dialog box to the other dialog box we use doModal(). After navigating for some time between the dialog boxes we get a debug assertion failure and when checked through call stack all the error falls into doModal() and pretranslatemessage(). Please help us out..........
Thanks and Regards
Bhanu
|
|
|
|
|
Please paste code snippets...
Regards,
Sandip.
|
|
|
|
|
are you opening model dialog on model dialog box?
"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
|
|
|
|