|
Hi al
how to work on timer in vc++ in vs2005...
and how to go class wizard?
i remembr ctrl+w in vc++6.0,but in vs2005 it not works..can anyone sugest?
Regards
Gany
|
|
|
|
|
1. open the dialog in the resource editor.
2. open the 'Properties' window for the dialog
3. at the top of that window is an ugly little button called 'Messages', click it.
4. that will show a long list of messages. find "WM_TIMER" and click in the white space to its right. an "Add Handler" option will appear.
intuitive!
|
|
|
|
|
Right key to the class,click "attribute", --->"message"--->"WM_TIMER"
::Settimer()
|
|
|
|
|
Hi all
I am trying to a code a vc++ project where the xml data needed to be added in tree control.can any one help me on this?
I was earlier using vc++6.0 now changed to VS2005.Is there any difference in usign vc++ between thse two..?
Regards
Gany
|
|
|
|
|
can anyone help me
thnks in advance
|
|
|
|
|
hellogany wrote: I was earlier using vc++6.0 now changed to VS2005.Is there any difference in usign vc++ between thse two..?
What happens when you try it?
|
|
|
|
|
Hi Members,
I wanted to know if it i possible to protect a folder using Visual C++ such that it asks for a password when we rename, cut, copy, move or drag and drop and cd to the directory from command prompt.
Thanks,
Raj
|
|
|
|
|
See documentation [^].
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]
|
|
|
|
|
how to show static control on picture control in dialog box in picture control i use bitmap but when run it never shows static control on picture control. can anyone tell me how to show static control on picture control
Project Engineer
|
|
|
|
|
Do you think the static control is below the picture control.
If so you can use BringWindowToTop or SetForegroundWindow to bring the static control on top of the picture control.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
I have context menu on dialog box now i want to set background color of context menu.please anyone can tell me how to set background color of menu and context menu as well as submenu.
Project Engineer
|
|
|
|
|
Hi,
i tried using
BEGIN_MESSAGE_MAP(CMyDlg, CDialog)
ON_WM_NCCALCSIZE()
END_MESSAGE_MAP()
void CMyDlg::OnNcCalcSize(BOOL bCalcValidRects, NCCALCSIZE_PARAMS* lpncsp)
{
CRect& rc = (CRect&)lpncsp->rgrc[0];
rc.top += 20; // Increase the height of tittle bar
CWnd::OnNcCalcSize(bCalcValidRects, lpncsp);
}
but the issue is when i run the exe in which i used the above code it works in one system(ie clientarea for the dialog is decreased) but in other system client area was not decreased....
Please try to help me out....
|
|
|
|
|
Is there any way I can tell windows not to update my layered window when the window below the layered window is updated. Right now, it is causing lot of flickering in the layered window. I want to somehow control the updating of layered window.
Please suggest.
|
|
|
|
|
Hi friends
I have a bunch of resources name store in a file and i load these resources name in string
CString strRes = "IDC_LIST";
Can i use like this
GetDlgItem( strRes )->ShowWindow( SW_SHOW );
thanks in advance
-kk.tvm-
|
|
|
|
|
no it is not possiable bcoz GetDlgItem do not have string type of parameter. You need to mapping with string with resource.
|
|
|
|
|
The resource name (IDC_LIST) is actually an integer value which is #defined.
So you cannot use it like a string ("IDC_LIST").
If look at the signature of the GetDlgItem method[^], the parameter to the function is an integer value.
So you should be storing the integer values in the file rather than the names.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Sir,
I am Venkatraman working in HCL and I read your article (Undelete a file in NTFS) on 09/10/2009 and I am having a doubt in it my question is this "what are u trying to explain in attribute field in UnDelete.cpp file and what is the actual process of the atrribute field in the Undelete window"
Waiting for your reply
|
|
|
|
|
You need to post your question on the article page.
|
|
|
|
|
Go to the page Undelete a file in NTFS[^], scroll to the bottom and click New Message to post your question.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Hi there,
I have an application that uses UDP socket to exchange packets with some mobile devices (we have modem and SIM cards in these devices and use UDP socket to connect to the C++ application). the application also has a TCS socket that connects to a server that connects to the same mobile device through radio system. Here we try to send some messages to the devices using GPRS and if it failed to go out (no ACK was sent from the device) we retransmit message through radio. my question is that I need to know if the GPRS system is down or not and if it is down I do not try GPRS first and wait for ACK to come back (delay in messaging). please note that we have heart beat from devices to the application every 45 minutes so I can't use heartbeat as an indicator of GPRS being down. also in slow time of the day (midnight to 5:00 am there is not much trafic between the devices and application. what is the best way here to decide if GPRS is down?
Thanks for help,
Nahitan
|
|
|
|
|
I do not understand what you just said (design/implementation/cost problem?). If you do not have a kind of connectivity status, then add one by implementing a reasonable fast heartbeat.
Cheers
|
|
|
|
|
Thanks for your reply, I might not explained it properly but having all the devices send fast heartbeat means a lot of data traffic and pay for that and when you have like 1000 device and want to pay more than 5M per month or something like $15/month for GPRS usage is not acceptable by customers. so fast heartbeat is not a solution. I was/ am looking for a better way of examining the healthiness of the GPRS data trafic through UDP socket. Thanks for ideas in advanced.
Nahitan
|
|
|
|
|
Ok, sounds like a design or cost problem.
Unfortunately, I see no other technical solution than the one mentioned before. The concept of a heartbeat is more or less the same regardless of using UDP or TCP. If peer A wants to know about the status/availability of peer B, it either has to receive a "message" from B in regular intervals (and therfor knows that peer B is alive) -or- when there is no regular traffic to piggyback the heartbeat then one of the peers has to initiate (additional) heartbeats in reasonable intervals. For example an IRC server uses regular ping/pong messages every few minutes to find out about the connection status of its chat clients.
Regarding the costs, at the end of the day a better service will cause more traffic. You could offer your customers maybe a cheap basic service and an advanced service with more features.
Hope this helps
/M
|
|
|
|
|
I am having trouble getting tooltips right for CTabCtrl when it has enough tabs that the spinner is up to scroll through the tabs.
If I use CTabCtrl::SetToolTips(), then a tab's tooltip stays with it, even when the tabs scroll (good). The problem is that it seems to take my tool ID (1, 2, ... N) as an index into the tabs -- and zero is not a valid ID (asserts in MFC), so I cannot have a tooltip for the first tab.
Alternatively, I can do the tooltips on my own -- the problem there is that I do not know how to tell when the tabs scroll so I can update the tooltip control's rects. WM_HSCROLL works for the spinner, but not if the scrolling happened because of a right- or left-arrow key.
I could set to supply the tooltip text each time, and on each request compare the cursor postion to the tab rect's, but that seems like a heavyweight kludge. (I could also go to multi-line tabs, but do not want to do that.)
So, what is the correct way to do it?
TIA,
Bob
modified on Sunday, September 13, 2009 3:41 PM
|
|
|
|
|
I am using a CListCtrl control in may application, where i have 10 iteams in that control.
Now after receiving some input from user , i need to select a particular item from that list.
I have a code where after receiving users input , i am calling myCtrl.SetItemState( itemID, LVIS_SELECTED, LVIS_SELECTED ); to select respective item from that ctrl.
Now it is observed that after executing above line of code, afx_msg void OnSelchanged( NMHDR* pNMHDR, LRESULT* pResult ) is getting called multiple times.
Also when i tried to retrieve selected item in OnSelchanged method , by using ( GetFirstSelectedItemPosition() and GetNextSelectedItem() ), it gives different output every time.
Can you please explain,
i) why this OnSelchanged() method is getting called multiple times whenever myCtrl.SetItemState( itemID, LVIS_SELECTED, LVIS_SELECTED );line of code gets executed.
ii) Why i am getting different output ( id of item selected) after executing GetFirstSelectedItemPosition() and GetNextSelectedItem().
|
|
|
|