|
Faez Shingeri wrote: ...which are to be stored in
char tableRow[6][10] Which won't be large enough.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
hi,
i have application that disply USB cemera video .for that i have to connect with samplegraber and get image anyone please hehp me.
|
|
|
|
|
Please do not post the same question in multiple forums.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
I'm baffled here. I have a listbox that I can't send a message to, but if I change CreateWindowEx from Listbox to ComboBox, and change LB_ to CB_, it works fine.
So I have 6 hours into this, and it's time to ask for help. I can't think of anything. Changing the listbox to combobox was just an experiment because I tried everything I could think of, and was surprised it worked. Plus it validates that all my pointers are correct as well.
Here is my question:
I just looking for expert knowledge in how to diagnose this and get it to work as a listbox.
lb_SetupWizard_CreateUser_LB_Field = CreateWindowEx(WS_EX_TRANSPARENT,
TEXT("ListBox"),
NULL,
LBS_HASSTRINGS | WS_TABSTOP | WS_VSCROLL | WS_CHILD | WS_VISIBLE | ES_LEFT | ES_MULTILINE,
50, 122,
300, 220,
hSetupWizard,
(HMENU)IDC_SETUPWIZARD_CREATEUSER_LISTBOX_SELECT,
GetModuleHandle(NULL),
NULL
);
SendMessage(lb_SetupWizard_CreateUser_LB_Field, WM_SETFONT, (WPARAM)hFont_SetupWizard_Label, FALSE);
ShowWindow(lb_SetupWizard_CreateUser_LB_Field, SW_HIDE);
iPosition = SendMessage( lbUserAccounts, CB_ADDSTRING, 0, (LPARAM) szDescription );
SendMessage( lbUserAccounts, CB_SETITEMDATA, iPosition, (LPARAM) (int)pzUserID );
|
|
|
|
|
jkirkerx wrote: CB_ADDSTRING
Hopefully this is a typo and you really have LB_ADDSTRING in this function.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Individuality is fine, as long as we do it together - F. Burns
|
|
|
|
|
The send message works as a "Combobox", that's why the CB_ADDSTRING is there in the example code.
If I change the window to a "ListBox", and swap out CB_ADDSTRING with LB_ADDSTRING, it doesn't work. error code 87, but then I get a error code 87 with CB_ADDSTRING as well, but the combobox loads the text.
It seems really simple to me, CB for combo box and LB for Listbox. It's driving me nuts.
|
|
|
|
|
Have you tried SendDlgItemMessage?
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Individuality is fine, as long as we do it together - F. Burns
|
|
|
|
|
I didn't think of that,
I tried PostMessage, SendNotifyMessage
I'll give that a spin later tonight.
I'm just going to finish out the code with the combobox first.
Thanks
|
|
|
|
|
jkirkerx wrote: LBS_HASSTRINGS | WS_TABSTOP | WS_VSCROLL | WS_CHILD | WS_VISIBLE | ES_LEFT | ES_MULTILINE,
Why the use of edit-control styles?
jkirkerx wrote: (HMENU)IDC_SETUPWIZARD_CREATEUSER_LISTBOX_SELECT,
Did you mean to cast this identifier to an HMENU ?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
DavidCrow wrote: Why the use of edit-control styles?
I thought I needed it to set the alignment to the left, and show as multiline
DavidCrow wrote: Why the use of edit-control styles?
I was going to make it to where you can select the user by listbox only, but it didn't work out.
Should I take them out?
I haven't tried the SendDlgItem yet, will try it today.
|
|
|
|
|
I removed the ES_left and ES_MULTILINE, and now it works as a ListBox.
As far as the (HMENU) cast goes, I'm not sure what the proper way to do it is. And I'm not sure why the Listbox works now in detail.
|
|
|
|
|
My theory:
ES_LEFT resolves to 0 and ES_MULTILINE resolves to 4 . When you were using a combobox, a value of 4 was the same as CBS_DROPDOWNLIST|CBS_SIMPLE . When you were using a listbox, a value of 4 was the same as LBS_NOREDRAW . So, the items were likely being added to the listbox but since redraw was turned off, you could not see them.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
OOOOh
I was thinking yesterday, I know the names are being added, but it looks like the listbox is not being repainted. I looked into the WM_DRAWITEM and WM_PAINT, and checked all the Proc's, they were firing, so finally I changed the Listbox to a ComboBox and it worked.
Thanks a million times over for the help David. I would of never figured it out by myself.
I changed the ES_LEFT and ES_MULTILINE before I tried the SendDlgItemMessage.
|
|
|
|
|
Hi friend,
I am working with Client Server windows(VC++ and MFC) project which is connceted via TCP IP concept. it is working fine with in a organization(LAN).but my requierment, server in one location, client in another location.
How to connect Client and Server.
Can i use virualiztion concept?
I do not know how to start.
Do you have any virualiztion concept reference website link?
Please teach me.
|
|
|
|
|
If you're using TCP/IP already, your application can already support separate server and client machines/locations. Your question doesn't exactly make sense.
|
|
|
|
|
No what he means is that it does not work across internet, it's because of firewall/router/port redirection going on between client and server.
However, I don't have time to help on this, it depends on too much parameter, device, and network policy of his company.
What I can advice is to pick a book on how tcp/ip work, and basic networking class that cover firewall, port redirection, and public/private IP.
|
|
|
|
|
My five.
He should contact the network administrators on the client and server sides.
|
|
|
|
|
Wouldn't you think it would have been more helpful to answer the OP instead of posting all this for me?
|
|
|
|
|
D.Manivelan wrote: Do you have any virualiztion concept reference
A pretty efficient concept is to switch off your antivrus software, open the SPAM folder in your email client, and open every single mail and URLs provided therein. That should virualize your machine nicely.
Or did you mean virtualization? 
|
|
|
|
|
I want to open the child application form outside my parent form. I am using MDI application,
The way the application currently opening a child form is pretty simple, straight out from the MFC library.
AddDocTemplate( new CMultiDocTemplate( IDR_SCRIBTYPE,
RUNTIME_CLASS( CScribDoc ),
RUNTIME_CLASS( CMDIChildWnd ),
RUNTIME_CLASS( CScribView ) ) );
Thanks,
Ash
asdasdadadasd
|
|
|
|
|
What's the question? There's nothing that resembles a question in there. Multiple monitor support is managed by the operating system, what exactly do you want to be able to do?
|
|
|
|
|
Sorry if I couldnot make you clear. Question is very simple, currently in our application
we are not able to drag the child window outside the main frame window. If I move the main frame window my child window is also moving along with it. So I need to move my child window free out of main window
Hope I make it more clear than earlier. Waiting for your reply
asdasdadadasd
|
|
|
|
|
You can't do that with a CView derived class, without heavy modification of the MFC code.
It's easier to create a non-CView window and write your own linkages to the document class to manage creation and destruction.
|
|
|
|
|
Sorry if I couldnot make you clear. Question is very simple, currently in our application
we are not able to drag the child window outside the main frame window. If I move the main frame window my child window is also moving along with it. So I need to move my child window free out of main window
Hope I make it more clear than earlier. Waiting for your reply.
asdasdadadasd
|
|
|
|
|
I understood you.
MFC doesn't support what you're doing.
You'll have to write that yourself.
You might base this on the docking technology introduced in 2008/2010.
|
|
|
|