|
I would not be able to debug since I dont have the problem at all.
When I tested the same, its working fine for me. i.e., The application shows up the dialog withe MSFlexGrid control. But its not working in the client place which is far of from here. Even in the client place it works for him in few PCs.
In the client place, if he run the application and try to open the dialog with MSFLexgrid, the dialog is not opening. It even didnt give any error messages or crash. Then I created a sample application with 2 dialogs one with MSFlexgrid and other without the Control, to confirm the problem. The same thing happened. The dialog without the MSFlexGrid control does not show up whereas the other dialog without the MSFlexGrid showed up.
I suspect any DLL problem or any access violation for the DLL?
Kindly help.
|
|
|
|
|
The MSFlexigrid is an ActiveX control, you should install the MSFlxGrd.ocx on the target machine.
To be honest I would expect a more dramatic event happening whenever the app is unable to find the component.
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: To be honest I would expect a more dramatic event happening whenever the app is unable to find the component.
No, that's how it reacts and it's really a pain. An big red error message would be much more convenient to fix the problem. I remember when I was first playing with ActiveX that I had the same problem and I took me quite some time to find the issue (but well, I was young and naive at that time :p).
|
|
|
|
|
Similar things happen when you try to open a dialog containing an ActiveX which is not registered in the system. So, you should make sure that the ActiveX is present and registered on the target system. This is most probably the cause of your problem.
|
|
|
|
|
Thank you very much for your suggestion.
Can you Pls elaborate how to find that the ActiveX is present and Registered for my case (MSFlexGrid)
Do I have to check only the MSFlexGrid.OCX or still anything more to do.
Pl. list out the steps to be followed to make it work.
Thanks in advance
|
|
|
|
|
you may use 'OLE/COM Object Viewer' of Visual Studio Tools.
there in left tree view, Object Classes ->Grouped by Component Category ->Controls
Also, better not to insert activeX control by right clicking on dialog and selecting 'insert activex control'. Instead use CWnd::CreateControl(), and check the return value. Do write such a a test application and run it on the suspicious PCs to confirm the issue.
|
|
|
|
|
HI all,
I have recently installed the "Service Pack 1 Redistributable Package ATL Security Update" update. Now i have the x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.4053_x-ww_e6967989 in my "c:\window\WinSxS\" folder. But, i dont have the corresponding Debug version.
Now, when i build the application in VS2005, the debug manifest of my application refers to the 8.0.50727.4053. Now, I am unable to debug my application as it fails to find the debug version of 8.0.50727.4053.
How can i Solve this?
Thanks in advance.
Bibin Varghese
modified on Friday, August 20, 2010 12:31 PM
|
|
|
|
|
Bibin, this is not the appropriate forum for this question. I am moving this to the native C++ forum.
|
|
|
|
|
Hi guys, i am a fresher to IT. pls any tell me how to read file in backward using iterators
|
|
|
|
|
What do you mean exactly?
Cannot you just read the whole file and then going backward in the memory buffer?
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]
|
|
|
|
|
I have one propertypage and it has the 10 radio button and two command button.
All buttons has the onclick event function.
My problem is two command button event is not called.
I checked the message map area. Its looking fine.
I can't simply add another control and compile it.
Because it's huge lib, I have to wait 10 hours to complete.
resource.h has the control Id.
Some other dialog also has the control with same ID, there the event is occured.
Anybody suggest me what could be the problem?
|
|
|
|
|
ganesh.dp wrote: I can't simply add another control and compile it.
Because it's huge lib, I have to wait 10 hours to complete.
There's something weird in that.
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]
|
|
|
|
|
Assign unique value for duplicated id, simply.
You should assign all unique (different) id for different controls.
Only one handler will be called for one id value on MFC message mapping.
Because MFC's message mapping is very simple implement which using array of struct,
and decide handler by sequential searching.
When message map is as below;
BEGIN_MESSAGE_MAP(CSampleDlg, CDialog)
ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
ON_BN_CLICKED(IDC_BUTTON2, OnButton2)
END_MESSAGE_MAP()
Compiler recognize as below; (rewriting simply)
struct MessageEntry messageEntries[] = {
{ IDC_BUTTON1, OnButton1 },
{ IDC_BUTTON2, OnButton2 }
};
If IDC_BUTTON1 and IDC_BUTTON2 are equal, the sequential searching algorithm always find OnButton1 for IDC_BUTTON{1,2}.
|
|
|
|
|
This was a question in my mind from several days.
Suppose we have a MFC dialog I want to add one checkbox when user clicks on a button. Since user can click several times on a button then it should generate n number of buttons. How can we work with the click event on those buttons. How can we identify each buttons individually? Can we create ids of buttons at runtime ?
|
|
|
|
|
rahul.kulshreshtha wrote: Can we create ids of buttons at runtime ?
Ids are just unsigned integers, so as long as they are unique there's no problem. If you want to create checkboxes at runtime, you have to create an instance of CButton and call the Create method (and pass BS_CHECKBOX along with the other styles).
|
|
|
|
|
And how can we attach a member variable to that.
Can we write something like this?
DDX_Control(pDX, IDC_BTN_CONTROLS + index , mButtons[index]);
As the dialog height is limited so can we attach vertical scroll to dialog. I never worked with scrollbar. Can you suggest any example for vertical scrolling of dialog?
|
|
|
|
|
Yes ... that works.
About scrolling, that's nothing more that handling WM_VSCROLL and reposition the check-boxes (MoveWindow / SetWindowPos ) accordingly.
But consider that your design may be not as good as it seems: as the number of controls grows, the dispatch time for the messages also grow and so the repositioning (you must be very smart about the hiding / showing / moving).
Try thinking to a list-control (CListControl) mimicking the checkboxes by changing the item's state-icons.
2 bugs found.
> recompile ...
65534 bugs found.
|
|
|
|
|
It would be better to place the dynamic controls in a child dialog placed on the original dialog. That will make scrolling easy (and smooth) since you only have to scroll the child dialog, and not its controls.
Dispatch time is nothing you have to worry about when the user is involved.
|
|
|
|
|
Really interesting suggestions. Thanks to all. I will try these soon.
|
|
|
|
|
Niklas Lindquist wrote: Dispatch time is nothing you have to worry about when the user is involved.
Generally speaking yes, unless you are scrolling also by tracking, with pixel precision. Repositioning one-hundred children while the user is running the mouse or the wheel may be challenging, especially if asynchronous paints are also involved. Nothing dangerous, simply "dirty" visual effects may be perceived while moving.
(But your proposal may mask the problem very well, since it localize it in a small area)
2 bugs found.
> recompile ...
65534 bugs found.
|
|
|
|
|
If you had to move a lot of controls around, you would of course use LockWindowUpdate[^] to avoid the "dirty" visual effects.
But you're right, it was generally speaking.
|
|
|
|
|
An alternative to Cedrics reply could be to use a CCheckListBox[^] or similar.
|
|
|
|
|
Hi all,
I am working on a sdi application, i have divided my window in two parts using splitter Control. On left side of my window i have used CFormView class. On that dialog i have put a list control. My problem is i have a made a NM_Click event on that list control but when i click on that list that event is not called....
I don't know why this is happening, but can anybody help me in this....
|
|
|
|
|
Is there anyone who has faced similar problem and what is the solution?
Some anti-viruses block socket communication by default so socket based applications can not work properly.
Is there any way to make safe sockets which should not block by anti-viruses?
|
|
|
|
|
rahul.kulshreshtha wrote: Some anti-viruses block socket communication by default
I'm not sure what this has to do with C/C++, it seems more a System Admin question.
I would expect this to be an option on the AV software so you need to change its configuration settings.
It's time for a new signature.
|
|
|
|