|
Hem Rama, how did you manage to read the post ???
~RaGE();
|
|
|
|
|
1. View->Source
2. Find Reply URL
3. Type the reply URL on the address bar
|
|
|
|
|
I give you points for enginuity
- Matt Newman / Windows XP Activist
-Sonork ID: 100.11179
Could you Would you with a goat? - Dr Suess
|
|
|
|
|
click on the title of the article and hit tab
the real question is why we would go through such work to read a post
-dz
|
|
|
|
|
dazinith wrote:
click on the title of the article and hit tab
That's far more simpler.
dazinith wrote:
the real question is why we would go through such work to read a post
The guy did not do it purposefully. It's a mistake which happens everynow and then
|
|
|
|
|
Rama Krishna wrote:
The guy did not do it purposefully. It's a mistake which happens everynow and then
If he is annonymous because he is new, he probably did not realize the situation with HTML.
- Matt Newman / Windows XP Activist
-Sonork ID: 100.11179
Could you Would you with a goat? - Dr Suess
|
|
|
|
|
I can't build the DAOSDK\SAMPLES\addrbook with VC++ 7.0 . I have got this error message.
c:\inetsrv\scripts\Addrbook.dll : fatal error LNK1120: 1 unresolved externals
"public: class ATL::CStringT<char,class strtraitmfc<char,class="" atl::chtraitscrt<char=""> > > __thiscall CdbLastOLEError::GetDescription(void)"
Thanks
Feri
Feri
|
|
|
|
|
I have got a MDI application. Now I want to add a view to a document apart from the one that is given to me by the wizard. I have inserted a menu File->SwitchView where I want to give a different view of the same data in the doc. Below is my code for handling 'Switch View' but seems like its not working. Will you please let me know what wrong I am doing.
void CMainFrame::OnFileSwitchview()
{
// TODO: Add your command handler code here
CView* pViewAdd = NULL;
CView* pViewRemove = NULL;
CDocument* pDoc = GetActiveFrame()->GetActiveDocument();
if (m_pView == NULL)
{
m_pView = new CNewView();
m_pView->Create(NULL, NULL, AFX_WS_DEFAULT_VIEW,rectDefault, GetActiveFrame(), AFX_IDW_PANE_FIRST + 1, NULL);
pViewAdd = m_pView;
pViewRemove = GetActiveFrame()->GetActiveView();
}
int nSwitchChildID = pViewAdd->GetDlgCtrlID();
pViewAdd->SetDlgCtrlID(AFX_IDW_PANE_FIRST);
pViewRemove->SetDlgCtrlID(nSwitchChildID);
pViewAdd->ShowWindow(SW_SHOW);
pViewRemove->ShowWindow(SW_HIDE);
// Connect the newly active view to the document, and
// disconnect the inactive view.
pDoc->AddView(pViewAdd);
pDoc->RemoveView(pViewRemove);
GetActiveFrame()->SetActiveView(pViewAdd);
RecalcLayout();
}
m_pView is the one I am trying to view.
Thanks in advance. Looking fwd to a solution. BTW I know the way it is to be handled in SDI.. its the MDI which is giving the trouble.
Thanks again,
Sudip
|
|
|
|
|
Check out this CodeProject article:
http://www.codeproject.com/docview/replacingview.asp
|
|
|
|
|
Just some pointers (ooh I made a C++ joke... :rolleyes) or a tip or two would be helpful. I can figure it out once I get shown the start of the path
I am trying to return more than one result at a time from the CP Webservice and storing them into what I would call an array. Not sure what you call it in C++. Calling the webservice is fine, I have managed to pass it the input parameteres it needs. It is getting out all the results in one go that is troubling me. Right now my code returns it variable by variable, with a call to the webservice for each result and variable! Not very good at all.
I managed to do this:
__gc struct ArticleBriefs
{
public:
String* URL;
String* Title;
String* Author;
String* Posted;
String* Updated;
String* Status;
String* Description;
};
And I managed to load it one at a time like so:
LatestBrief* proxy = new LatestBrief();
ArticleBriefs* cArticles = new ArticleBriefs();
cArticles->Author = proxy->GetLatestArticleBrief(iNumArticles)[0]->Author;
...
However that is not an array (though obviously the right hand bit is an array, but I cannot transfer it over to the left hand, ya see?)
So my simple question is how do I turn that struct into an array and then how do I return the multiple values from the GetLatestArticleBrief web service method into the array?
*grumble* this is so easy in C# or VB *grumble*
And yes, you may laugh yourself silly at my question/code/vb-simplified-mind, I have my thick fire proof suit on
Thanks guys.
regards,
Paul Watson
Bluegrass
Cape Town, South Africa
The greatest thing you'll ever learn is just to love, and to be loved in return - Moulin Rouge
Tim Smith wrote:
Over here in the third world of humor (a.k.a. BBC America),
peterchen wrote:
We should petition microsoft to a "target=_Paul" attribute.
|
|
|
|
|
Not sure whether I understood what you want.
But this is enough
ArticleBrief* pArticles[] = proxy->GetLatestArticleBrief(iNumArticles);
You don't need new.
Paul Watson wrote:
grumble* this is so easy in C# or VB *grumble*
It would be same in C++ You can translate easily b/w C# and C++
|
|
|
|
|
Rama Krishna wrote:
ArticleBrief* pArticles[] = proxy->GetLatestArticleBrief(iNumArticles);
That is how I originally thought it was done. I even tried it but kept getting an error. However after re-reading your code I noticed that you had put down ArticleBrief and not ArticleBriefs...
Man do I feel like a mullet. I had it back to front!
Thank you very much
regards,
Paul Watson
Bluegrass
Cape Town, South Africa
The greatest thing you'll ever learn is just to love, and to be loved in return - Moulin Rouge
Tim Smith wrote:
Over here in the third world of humor (a.k.a. BBC America),
peterchen wrote:
We should petition microsoft to a "target=_Paul" attribute.
|
|
|
|
|
ArticleBriefs cArticles[10];
code...
or...
ArticleBriefs *cArticles = (ArticleBriefs*)malloc(sizeof(ArticleBriefs) * 10);
code...
free(cArticles);
in both cases you use cArticles[0] to cArticles[9] to access the 10 items in the array
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
This will not work as ArticleBrief is a managed class.
|
|
|
|
|
Anders Molin wrote:
ArticleBriefs *cArticles = (ArticleBriefs*)malloc(sizeof(ArticleBriefs) * 10);
Thanks Anders.
Your code and Rama's code set me straight.
I think I should have stuck to unmanaged VC++ for my first foray. At least then I would have some good samples and tutorials to help me out. MC++ samples and tuts are thin on the ground.
It is working now:
ArticleBrief* cArticles[] = proxy->GetLatestArticleBrief(iNumArticles);
I had it back to front (ArticleBriefs instead of just ArticleBrief.)
regards,
Paul Watson
Bluegrass
Cape Town, South Africa
The greatest thing you'll ever learn is just to love, and to be loved in return - Moulin Rouge
Tim Smith wrote:
Over here in the third world of humor (a.k.a. BBC America),
peterchen wrote:
We should petition microsoft to a "target=_Paul" attribute.
|
|
|
|
|
I have a CTreeCtrl with Parent nodes which have each 4 Child nodes. I´d like to associate an image on the child nodes, but not on the parent nodes. How do I manage to do that :
TVINSERTSTRUCT tvInsert;
HTREEITEM ChildItem;
CString Text;
CTreeCtrl *pOutprob;
pOutprob=(CTreeCtrl *) GetDlgItem(IDC_TREEPROB);
pOutprob->SetImageList(m_ImageList,TVSIL_NORMAL);
tvInsert.hParent = NULL;
tvInsert.hInsertAfter = TVI_SORT;
tvInsert.item.stateMask=0;
for(i=0;i<Tree.Nb_Vars();i++)
{
tvInsert.item.mask = TVIF_TEXT;
tvInsert.item.pszText =(unsigned short *)Text.operator LPCTSTR();
tvInsert.hParent = NULL;
tvInsert.hInsertAfter = NULL;
ChildItem=pOutprob->InsertItem(&tvInsert);
tvInsert.hParent = ChildItem;
tvInsert.hInsertAfter = NULL;
for(j=0;j<Tree.Variable_Parents[i].weight();j++)
{
tvInsert.item.mask = TVIF_TEXT|TVIF_IMAGE;
tvInsert.item.pszText =(unsigned short *)Text.operator LPCTSTR();
S_ID=pOutprob->InsertItem(&tvInsert);
pOutprob->SetItemImage(S_ID,imgnb,imgnb);
}
}
(Sorry if there is not the whole code here ) This displays an image for both parent and children .. and i do not see why ...
~RaGE();
|
|
|
|
|
Rage wrote:
pOutprob->SetImageList(m_ImageList,TVSIL_NORMAL);
To my concern the problem really is in this line of code. TreeView can either HAVE Images or HAVE NOT images ... so as soon as you declare an ImageList for the Tree it HAS images. To my opinion there's no way NOT to show images for the parent items in that case.
Crey
|
|
|
|
|
CreyBax wrote:
there's no way NOT to show images for the parent items in that case.
That´s what I was afraid of ... well, thanks anyway...
~RaGE();
|
|
|
|
|
there are two types of image lists
one depends on items state and so item can be without it
(you can see OnPaint/if(itemState & TVIS_STATEIMAGEMASK) into cp/treectrl/rgree sources)
t!
|
|
|
|
|
In a MFC dialog-based application i've created a worker thread.
In the worker thread i call Sleep(5000) and the interface blocks for the specified period.
I have to mention that the thread is involved in many operations including mutexes and objects located in some other threads, but not the main one of the interface.
Could you tell me how should i handle the problem?
rechi
|
|
|
|
|
Bogdan Rechi wrote:
In the worker thread i call Sleep(5000) and the interface blocks for the specified period.
By 'interface' you mean 'user interface'?
Tomasz Sowinski -- http://www.shooltz.com
- It's for protection - Protection from what? Zee Germans?
|
|
|
|
|
|
Calling Sleep() in worker should have no effect on main thread. Unless you're waiting for worker to finish...
Tomasz Sowinski -- http://www.shooltz.com
- It's for protection - Protection from what? Zee Germans?
|
|
|
|
|
It's strange, because i use a mutex - working excellent even in such conditions - to synchronize the access to some data located in an object belonging to another thread, but not the main-one.
Indeed, it seems that the delay comes from this mutex and hard times are to come.
Anyway, thanx!
rechi
|
|
|
|
|
I have an application with many different views, but I want to have only a single document open for a process. How can I best block OnFileOpen() and OnFileNew()?
1. I have tried OnUpdate in my CMainFrame by using CCmdUI. Can't make it work.
2. I override the OnFileOpen() and OnFileNew() to check if a document is already active. But if I use
CDocument* pDoc=((CFrameWnd*)m_pMainWnd)->GetActiveDocument();
I always get a NULL pointer ??
Regards, Haakon S.
|
|
|
|