|
Issues 1 and 2 - std::vector iterators used to be ordinary pointers. But they're not any more. I suspect this implies that your conversion from pointer to iterator (and vice versa) was (in terms of the C++ standard) erroneous, and you need to reformulate it in ways that are valid C++.
Issue 3 - try returning 'ComPtr<CEventMsg>(NULL) ' or 'ComPtr<CEventMsg>() '?
|
|
|
|
|
Thanks for the suggestion. Issue 3 is solved but a similar type araised
ComPtr<CDMPPacket> CDMPSession::NewRecvPacket()
{
return new CDMPPacket; //Error
}
Error 1 error C2664: 'ComPtr<t>::ComPtr(const ComPtr<t>&)' : cannot convert parameter 1 from 'CDMPPacket *' to 'const ComPtr<t>&
|
|
|
|
|
pratap1980 wrote: return new CDMPPacket;
should be replaced with return ComPtr<CDMPPacket>(new CDMPPacket); . It's the same pattern.
|
|
|
|
|
An iterator on an element in a collection is not the same as a pointer to that element. VC6 let you do that, and it happened to work, even though it was wrong to assume that the two were equivalent. Use &*it to convert an iterator to a pointer.
|
|
|
|
|
|
I'm trying to interpret the bCertificate member of the WIN_CERTIFICATE struct (for a debugging tool I'm writing). Does anyone have a code sample or link to a spec that shows how to interpret this data member?
|
|
|
|
|
You can view the authenticode signature documents here:
http://www.microsoft.com/whdc/winlogo/drvsign/Authenticode_PE.mspx[^]
The bCertificate member is described on page 13 as:
"bCertificate is set to a variable-length binary array that contains the Authenticode PKCS #7 signedData"
I believe page 7 contains the signedData structure which is associated with the bCertificate member. It looks like you will have some additional research ahead of you as there is little documentation in this particular area.
Best Wishes,
-David Delaune
|
|
|
|
|
Okay, I have a little war going on in my development, and I want y'all to weigh in with your thoughts. When I add a class to a project, let's call it the filter algorithm, we will know this as class CFilter. Now, do you name this file filter.h/cpp or cfilter.h/cpp?
Curious
Charlie Gilley
Will program for food...
<italic>Hurtling toward a government of the stupid, by the stupid, for the stupid we go. —Michelle Malkin
|
|
|
|
|
charlieg wrote: Now, do you name this file filter.h/cpp or cfilter.h/cpp?
By default for a class CFilter , the class wizard generates Filter.h/cpp . And for me it make more sense than cfilter.h/cpp . IMHO, Hungarian notations are best for source code, not for filenames.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
My vote goes for Filter.h/cpp too.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
|
|
|
|
|
so the topic is not related to C but to C++, right ?! ^^
my prefered choice : filter.* containing CFilter class definition/implementation...
|
|
|
|
|
Why do you call it CFilter ? I.e. (if the filter is your own class then) have you a special reason to emulate MFC 's class naming scheme?
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]
|
|
|
|
|
Well, the play on words with C or not.. had to do with the prefix of the class, not the language.
As to how I got into this mess? Dang if I know.
Charlie Gilley
Will program for food...
<italic>Hurtling toward a government of the stupid, by the stupid, for the stupid we go. —Michelle Malkin
|
|
|
|
|
Hi,
I am enhancing my VC6 Application to new MFC Feature pack, i am using CMFCToolBar to replace CToolBar but it is not working with CDialog, i am getting any exception or error but toolbar is not visible in Dialog.
Thanks in advance for any suggestion or help.
|
|
|
|
|
same problem for me also.
I am trying to create a toolBar in CView. The toolbar is getting created,but i am not able to see the toolbar.
|
|
|
|
|
Pls check the rectanlge size of toolbar because in my case i found that toolbar rectangle was not correct, so i increase the size to make it visible ... try it not sure what's your problem is.
|
|
|
|
|
I passed rectangle size(10,10,30,30)(hadrcode value).
Even though i am not able to see the toolbar. Is there any standard size limit for ractangle??
|
|
|
|
|
there is no as such size of the toolbar actually...can you please give me piece of code so that i can look furthrer to figure out something.
|
|
|
|
|
i tried by the following 2 methods in oncreate()
Method 1:
----------
CFrameWndEx* pParent = STATIC_DOWNCAST(CFrameWndEx, AfxGetMainWnd());
//handle to application window
if (!m_wndToolBar.CreateEx(pParent,
TBSTYLE_FLAT,
WS_CHILD | CBRS_ALIGN_TOP) ||
!m_wndToolBar.LoadToolBar(IDR_PAGEPREVIEW))
{
TRACE0("Failed to create toolbar\n");
return -1;
}
Method 2:
-------
CRect rc(10,10,100,100);
m_wndToolBar.CreateEx(this,0,0,&rc);
m_wndToolBar.LoadToolBar(IDR_PAGEPREVIEW);
|
|
|
|
|
Hello!
Could someone tell me if a CMFCToolbar in a CDialog is correctly supported?
I can get my toolbar to work fine in a CDialog (inside a CView of an CMDIChildWndEx), but next time I open another document (MDI child window) the respective docked panes doesn't appear docked at all.
This happens after the Create() method of the toolbar. I suppose that settings of the Docking Manager (global?) are somehow changed during creation of the toolbar.
Below is the way I'm creating the toolbar:
BOOL MyCDialog::OnInitDialog() {
...
m_toolbar.EnableLargeIcons(FALSE);
m_toolbar.Create( this, AFX_DEFAULT_TOOLBAR_STYLE, IDR_TOOLBAR );
m_toolbar.LoadToolBar( IDR_TOOLBAR, 0, 0, TRUE /* Is locked */);
DWORD tbStyle = m_toolbar.GetPaneStyle();
tbStyle |= CBRS_TOOLTIPS | CBRS_FLYBY;
tbStyle &= ~(CBRS_GRIPPER | CBRS_SIZE_DYNAMIC | CBRS_BORDER_TOP | CBRS_BORDER_BOTTOM | CBRS_BORDER_LEFT | CBRS_BORDER_RIGHT);
m_toolbar.SetPaneStyle(tbStyle);
m_toolbar.SetOwner(this); //dont know if is really necessary
m_toolbar.SetRouteCommandsViaFrame(FALSE);
...
}
Thanks in advance.
Regards.
|
|
|
|
|
Hello,
When I try to add docking to my own toolbar with dropdown buttons, the right end of the toolbar is cut off, presumably because of the wider button with the dropdown arrow. The same happens if I dock the toolbar vertically. How can I make my docking toolbar work with both dropdown buttons?
I made changes to the code as given in the link "http://www.microsoft.com/msj/0898/c0898.aspx". But its not working for me. My application is as MDI application.
Someone help me.
Thanks
Engilela
|
|
|
|
|
Any Expert programmer,
Please guide me in starting my project.
I am planning to do a Visual C++ project. I would like to make my front end/hci in Visual Studio C++ and the programming. However I'd like to get my data from a relational database which I've designed it in Ms Access 2007. Please suggest me a way of how to go about doing this, I've read about MFC but also in the books I came across Win API, Im confused what i should be using.
Desperate programmer,
Hitesh
|
|
|
|
|
|
Member 1862846 wrote: However I'd like to get my data from a relational database which I've designed it in Ms Access 2007. Please suggest me a way of how to go about doing this...
See if this helps.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Hi
Actually i have Rich text contol present in my dialog. I will get messages from the board, when the messages exceeds the size of the window, scroll bar automatically comes because of i had set the scroll bar(Vertical scroll bar) property of Rich Text Control.
My question is, when message exceeds the window size, the scroll bar automatically goes up. i don want scroll bar to move up rather it should go down, then only i can able to see latest updates form the board at time itself.
Thanks in advance,
Thanks,
Balaji
|
|
|
|