|
I asked a doubt and I give 5 when I am helped. I dont know who is the fool that is giving a low rating to a person who replied to *me*. 5/5 for both of you.
|
|
|
|
|
As said by David , just ignore it.
|
|
|
|
|
Hi All,
Does anyone have idea how to get the Google PageRank using VC++?
Thanks In Advance.
The secret of life is not enjoyment
but education through experience.
- Swami Vivekananda.
|
|
|
|
|
See here.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Thanks For The Information David.
I know the theory of PageRank , Searching for the API to get the PageRank.Is there any google service to provide PageRank of the URL? Is it possible with gogle Toolbar Query? If yes,How?
The secret of life is not enjoyment
but education through experience.
- Swami Vivekananda.
|
|
|
|
|
I wouldn't know their (proprietary) information. Perhaps an e-mail to Google is in order.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi all,
My application uses a spalsh screen for about 30 seconds and then the
main window appears.
During these if the user types any keyboard key ,the main window should appear immediately.
My code looks like this:
// *************** SPLASH SCREEN ***********************
// create a temp. invisible wnd. as parent of splash screen
if(m_wndOwner.m_hWnd == NULL)
{
LPCTSTR pstrOwnerClass = AfxRegisterWndClass(0);
if ( !m_wndOwner.CreateEx(0, pstrOwnerClass, _T(""),
WS_POPUP, CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
NULL, 0) )
return FALSE;
}
int nDelay = 30000;
// Create and show the splash screen.
CSplashWnd::ShowSplashScreen(nDelay, BMP_MICATECH_BIG, &m_wndOwner);
Sleep(nDelay) ;
Can any one tell me how to overcome these problem?
Regards,
Veeresh
|
|
|
|
|
Don't use Sleep(nDelay),Sleep will block keyboard input.
Use OnTimer set delay time.
Use OnKeyDown get the typed keyboard key
|
|
|
|
|
You can use WM_KEYUP orWM_KEYDOWN did you try it?
|
|
|
|
|
how to create 3D coloured command button
|
|
|
|
|
Can you be more specific you want to create 3D bulk button
|
|
|
|
|
Hello Comunity,
i have an litle trouble wit this data type! To add an new item in this object i use:
CMapStringToOb cMap;
CString csNewKey = "First";
CMyObject* myObject;
cMap.SetAt(csNewKey, new CMyObject());
cMap.Lookup(csNewKey, (CObject*&)myObject);
myObject->csName = "John";
ok, works fine, but when i close my dialog, i recive memoryleaks!
And the debugger show in this line with -> cMap.SetAt(csNewKey, new CObject()); ?!
how to solve this, any sugestions?
regards
break;
|
|
|
|
|
break; wrote: cMap.SetAt(csNewKey, new CMyObject());// to add new items to my class CMyObject use:cMap.Lookup(csNewKey, (CObject*&)myObject);
You have used new CMyObject ,in SetAt .
Somewhere you need to delete it. You can do it before cMap goes out of scope, enumerating it.
|
|
|
|
|
Hello,
i use other funktion to delete all objects befor closing dialog, looks something like this:
POSITION pos = cMap.GetStartPosition();
CString csKey;
CMyObject* cMyObject;
while(NULL != pos)
{
CMyObject* myOb;
cMap.GetNextAssoc(pos, csKey, (CObject*&)cMyObject);
delete cMyObject;
cMap.RemoveKey(csKey);
}
i dont know what else to do!
Question is on witch place to set use "delete"? I need all data during program run, only solution is
before closing the dialog??
regards
break;
|
|
|
|
|
I dont see any memory leak, if you are using above code.
break; wrote: Question is on witch place to set use "delete"? I need all data during program run, only solution is
before closing the dialog??
Are you asking this ?
you can write it in DestroyWindow() . Provided cMap is dialog class member.
|
|
|
|
|
You're creating new objects when you add them to the map, but you're never deleting them
Either:
1) At the end, go though the elements of cMap, and delete everything
2) Use smart pointers, that'll delete the objects for you
|
|
|
|
|
Hi,
thanx for answer, please take a look to my answer by previous reply!
regards
break;
|
|
|
|
|
Hi,
smart pointer can be a good idea, how to use them in this case, any sample for smart pointer?
break;
|
|
|
|
|
|
Hello,
yes, i try this to solve my prob.!
thanx for help to all
regards
break
|
|
|
|
|
Hi everyone,
i had a component with diff PopUp Buttons, to catch the OnClick-Event i added a message-handler in the
Pane ( it herids from CWnd ) and a click on the different PopUp Buttons executes the code in the method On_xxxxxx_Click() in this Pane.
Now, i have created a modified the component and added a Click-Handle that determinates the Button of the component who's clicked.
Then i must send a message to the Pane to execute the On_xxxxxx_Click() ( The Pane doesn't change )
void MyTaskPanel::OnLButtonDown(UINT nFlags,CPoint point)<br />
{<br />
<br />
TaskPanelGroup* Item;<br />
<br />
Item = HitTestGroup(point);<br />
<br />
UINT SelectedID;<br />
if(Item) {<br />
SelectedID = Item->GetID();
SendMessage(BN_CLICKED,(WPARAM)SelectedID,NULL);
} else {<br />
}<br />
}
In the pane i have this message-map :
BEGIN_MESSAGE_MAP(Home_Bht_Kunden_Side, CPaneView)<br />
ON_BN_CLICKED(ID_OF_CLICKED_BUTTON,On_ID_OF_CLICKED_BUTTON_Click)<br />
...<br />
END_MESSAGE_MAP()<br />
<br />
void ThePane::On_ID_OF_CLICKED_BUTTON_Click()<br />
{<br />
int test = 9;
}<br />
<br />
The Question: If i send a message from out the component, where does the message arrives?
Can all Message-Maps receive this Message and trade it ( if it matches )
Big Thanks
|
|
|
|
|
BN_CLICKED is not a message, it is notification code and should be sent through WM_COMMAND message.
e.g.
WPARAM wParam = (WPARAM)(((WORD)BN_CLICKED << 16) | ((WORD)GetDlgCtrlID()));
GetParent()->SendMessage(WM_COMMAND, wParam, (LPARAM)m_hWnd);
where m_hWnd is the HWND of the control and GetDlgCtrlID() returns the id of the control.
The message arrives to that CWnd you sent it. In your situation, you send the message to MyTaskPanel, so MyTaskPanel should process the message. If you want to send a message to other CWnd object , you should call SendMmessage fct. for that object : pMyView->SendMessage(...)
|
|
|
|
|
Thanks for the answer
but i don't have a HWND. I will sent the Message from out the Component.
The component should send a message to the window where it's placed.
Because the components gets the universal click on the component
The OnClick-Function determinates which button is clicked and the component sends a new message
to the window by specifing which Button is clicked ( over the ID )
Thanks
|
|
|
|
|
You will also find that your code may work in Debug build, but when you build a release version, it will crash.
The reason is that the SendMessage actually sends the command and a WPARAM and LPARAM. You must handle those in your message handler:
void ThePane::On_ID_OF_CLICKED_BUTTON_Click(WPARAM, LPARAM)<br />
{<br />
int test = 9;
}Karl - WK5M<br />
PP-ASEL-IA (N43CS)<br />
<kmedcalf@ev1.net><br />
PGP Key: 0xDB02E193<br />
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
|
|
|
|
|
I found the error
I send the Message from the Pane, but that's wrong
I must send the Message from the Parent of the Pane.
GetParent()->SendMessage(WM_COMMAND, wParam, (LPARAM)NULL);
Thanks nevertheless
|
|
|
|