|
neha.agarwal27 wrote: I have used SendMessage function for that.But the result displayed is same for all rows.
use some number mechanism to distinguish between the data!
|
|
|
|
|
The problem is with selecting multiple rows. When u r selecting multiple rows only the last one is getting reflected. Try to track the row numbers and also send them using PostMessage.
|
|
|
|
|
h:\microsoft visual studio 8\vc\platformsdk\include\prsht.h(201) : warning C4201:
h:\microsoft visual studio 8\vc\platformsdk\include\prsht.h(201) : warning C4201:
h:\microsoft visual studio 8\vc\platformsdk\include\prsht.h(207) : warning C4201:
h:\microsoft visual studio 8\vc\platformsdk\include\prsht.h(207) : warning C4201:
h:\microsoft visual studio 8\vc\platformsdk\include\prsht.h(216) : warning C4201:
h:\microsoft visual studio 8\vc\platformsdk\include\prsht.h(216) : warning C4201:
h:\microsoft visual studio 8\vc\platformsdk\include\prsht.h(228) : warning C4201:
h:\microsoft visual studio 8\vc\platformsdk\include\prsht.h(228) : warning C4201:
h:\microsoft visual studio 8\vc\platformsdk\include\prsht.h(234) : warning C4201:
h:\microsoft visual studio 8\vc\platformsdk\include\prsht.h(234) : warning C4201:
h:\microsoft visual studio 8\vc\platformsdk\include\prsht.h(243) : warning C4201:
h:\microsoft visual studio 8\vc\platformsdk\include\prsht.h(243) : warning C4201:
h:\microsoft visual studio 8\vc\platformsdk\include\prsht.h(389) : warning C4201:
h:\microsoft visual studio 8\vc\platformsdk\include\prsht.h(397) : warning C4201:
h:\microsoft visual studio 8\vc\platformsdk\include\prsht.h(402) : warning C4201:
h:\microsoft visual studio 8\vc\platformsdk\include\prsht.h(410) : warning C4201:
h:\microsoft visual studio 8\vc\platformsdk\include\prsht.h(416) : warning C4201:
h:\microsoft visual studio 8\vc\platformsdk\include\prsht.h(432) : warning C4201:
h:\microsoft visual studio 8\vc\platformsdk\include\prsht.h(441) : warning C4201:
h:\microsoft visual studio 8\vc\platformsdk\include\prsht.h(446) : warning C4201:
h:\microsoft visual studio 8\vc\platformsdk\include\prsht.h(454) : warning C4201:
h:\microsoft visual studio 8\vc\platformsdk\include\prsht.h(460) : warning C4201:
h:\microsoft visual studio 8\vc\platformsdk\include\commctrl.h(4739) : warning C4201:
h:\microsoft visual studio 8\vc\platformsdk\include\commctrl.h(4753) : warning C4201:
h:\microsoft visual studio 8\vc\platformsdk\include\shtypes.h(172) : warning C4201:
h:\microsoft visual studio 8\vc\platformsdk\include\shlobj.h(1059) : warning C4201:
h:\microsoft visual studio 8\vc\platformsdk\include\shlobj.h(1089) : warning C4201:
h:\microsoft visual studio 8\vc\platformsdk\include\shlobj.h(1100) : warning C4201:
How let them hide?
Thanks.
|
|
|
|
|
Use
#pragma warning( disable : 4201 )<br />
#pragma warning( default : 4201 )
Regards,
Paresh.
|
|
|
|
|
I need to get the IP addess of the cluster.I need any API provided by Microsoft for the cluster provided by them....
|
|
|
|
|
3. Write a program which outputs frequency of digits in a given integer. For example, if the number is 12424329, output will be
Number Frequency
1 (space) 1
2 (space) 3
3 (space) 1
4 (space) 2
9 (space) 1
Use a switch statement to obtain frequency of the digits.
This means nothing (space) i just put in so the numbers would line up
|
|
|
|
|
HomeWork/Assignment?
The solution to your problem is pretty simple. 10-15 lines of code would produce the desired result.So rather than giving the solution here's the logic that you can build over:
1. Ask the user to input a integer.
2. Now you need to check if the integer at 0th index is repeated elsewhere in the number and so on.
3. If the number is repeated increment the count by 1
If you are having problems on how to get the individual numbers from 0-9 out of the number entered here's the logic for that too-
while(temp!=0){
n=temp%10; // temp is the number entered by the user
temp=temp/10;
//// Do something
// Increment count and print it
}
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
I am curious how to create a Control from a resource ID using Create. The MSDN documentation states: "You can create an edit control either from a dialog template or directly in your code." I guess my question is whether this is possible from Create? What do you pass for styles and rect?
I am more familiar with using GetDlgItem or using DDX/DDV.
I am asking because I am converting old Borland OWL code to MFC. OWL has two constructors for controls. One version creates a dynamic control, similar to Create. The othter constructor takes a parent window and a resource ID. As there is no equivalent in MFC, I am wondering if I can use Create, or if I should suggest scrapping the conversion of these particular classes and just use the more familiar way of doing this.
Thanks for any input.
|
|
|
|
|
StevenS_Dev wrote: I am curious how to create a Control from a resource ID using Create
Doesn't MSDN helps yu in this regard ?
StevenS_Dev wrote: I guess my question is whether this is possible from Create? What do you pass for styles and rect?
Yes it is, first parameter of Create are style to be given for particular component. Same function has parameter to decide its parent.
I hope I understood your question.
|
|
|
|
|
StevenS_Dev wrote: The othter constructor takes a parent window and a resource ID. As there is no equivalent in MFC
See MSDN for ::CreateWindow()
hWndParent
[in] Handle to the parent or owner window of the window being created. To create a child window or an owned window, supply a valid window handle. This parameter is optional for pop-up windows.
hMenu
[in] Handle to a menu, or specifies a child-window identifier, depending on the window style. For an overlapped or pop-up window, hMenu identifies the menu to be used with the window; it can be NULL if the class menu is to be used. For a child window, hMenu specifies the child-window identifier, an integer value used by a dialog box control to notify its parent about events. The application determines the child-window identifier; it must be unique for all child windows with the same parent window.
...cmk
Save the whales - collect the whole set
|
|
|
|
|
My question is in regards to a resource editor created control. I'll use CEdit for this example. There does not appear to be any way to create/construct a CEdit based on just the resourceID. For example, Borland's OWL let you simply do this: TEdit(parent, resourceID). There is no equivalent way to do this in MFC.
It seems GetDlgItem() is the call to use when you want a control from the resource editor to become a CEdit variable in code.
I was wondering if there was someway to do it with Create, but that really seems more geared for dynamically creating a control.
Thanks for the input this far. I appreciate it.
|
|
|
|
|
MFC does things a bit different in this regard.
One way to add a CEdit object to represent a control in a dialog is to let the wizard do it.
Right-click the control in the resource editor and choose "Add Variable...".
This will add a CEdit member that gets initialized through MFC's DDX system - you'll see it
in the dialog class' DoDataExchange() override (something like
DDX_Control(pDX, IDC_EDIT1, m_Edit1Edit); A second way is to attach the HWND of an existing control to a CEdit object:
CEdit MyEdit;
MyEdit.Attach(*GetDlgItem(IDC_EDIT1));
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|
|
Another option is to declare the m_myEdit variable and then use the SubclassDlgItem function. Remember to call UnsubclassWindow when destroying the window
Judy
|
|
|
|
|
Son-of-a-gun! They've got a method for everything!
That's easier than my 2nd example
Thank you!
Mark
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|
|
I was planning to go the GetDlgItem route, as I am familiar with that. I hadn't thought of SubclassDlgItem, though.
Thanks again. You've all been very helpful.
|
|
|
|
|
Hi,
I'm trying to select pictures having displayed when I click on a different item in my list box. I followed this tutorial exactly "http://www.functionx.com/visualc/applications/displaybitmap.htm", however, instead of using a combo box, I would like to use a list box, but for some reason I'm having difficulty. Please help.
Thanks
ibs
|
|
|
|
|
I suggest use of CListCtrl instead CListBox
|
|
|
|
|
First you must draw a list box,then add a Control variable for the list box.
Then In the function of OnInitDialog() you can Init the list box.
The other is the same as the "http://www.functionx.com/visualc/applications/displaybitmap.htm".
|
|
|
|
|
Hi,
Thanks for your help. I know sure how to Init the list box of the function of OnInitDialog(). Can you show me how? Thanks.
Ibs
|
|
|
|
|
Does anyone know of a way to get LVN_ITEMCHANGED to fire with a virtual list view control (i.e. it has the LVS_OWNERDATA style bit set)?
Is there a good way to simulate this? This is really driving me nuts.
|
|
|
|
|
Jim Crafton wrote: Is there a good way to simulate this?
Perhaps you could just post/send a hand-crafted WM_NOTIFY ?
/ravi
|
|
|
|
|
That's what I was thinking too, but I don't quite know where to put it. Do I need to override the default WM_LBUTTONXXX events?
|
|
|
|
|
Hi - I hope someone out there is more familiar with using this dll than I am!
I am trying to write data to the CTRL register of my parallel port (0x037a). Now I know that you cant do this using _out() (OS is XP), so I have used inpout32.dll. This seams to work when writing to the data port, but when I write to the CTRL port, the lines strobe up and then down (when looked at with a scope). What I wish to happen is that any data written remains on the port, until updated by any further writes. This seems to work OK when using _out() and Win98, but for some reason, Out32() and XP doesnt do what I hoped it would!
By the way, I am using VC++6.0
Thanks for any help, or redirection to another method of writting to the parallel port.
69 Bay
|
|
|
|
|
dont bother looking - I HAVE RESOLVED IT!
the problem was that I was also writing to the CTRL register in a thread, which I had forgotten about. Once I removed the write command, all works!
Sorry to have posted this!
69 Bay
|
|
|
|
|
in my SDI VC6.0 project, I have two property sheets in my form view. I want the left one to be skinny, so I can make the right one wider. I used IDD_PROPPAGE_SMALL as the template for the property pages in the left property sheet, and set the dimension to be 150x265 dialog units. But somehow, the left sheet is still pretty big. I googled a bit, and it turned out the limitation is PROP_SM_CXDLG defined in prsht.h.
I add thse to mypropertypage.h, but they don't seem to work. Anyone can point out what I did wrong please? TIA!
#ifdef PROP_SM_CXDLG
#undef PROP_SM_CXDLG
#define PROP_SM_CXDLG 150
#endif
#ifdef PROP_MED_CXDLG
#undef PROP_MED_CXDLG
#define PROP_MED_CXDLG 150
#endif
#ifdef PROP_LG_CXDLG
#undef PROP_LG_CXDLG
#define PROP_LG_CXDLG 150
#endif
|
|
|
|