|
dkyue92708 wrote: "not MFC" and "Win32 debug" which I didn't understand but couldn't find anything in the search.
"not MFC" means just that. The project does not use MFC in its code. "Win32" refers to the target (as opposed to something like ATL) and "debug" means the project is compiled and linked with debugging support. "Release" doesn't include debug stuff like symbol information and optimizes the code.
dkyue92708 wrote: I dropped a combo box control on the dialog form and added 3 items to the data tab and recompile to see if the box displayed properly. The combo box is on the form but nothing is in the drop down list?
Did you actually drop the list down or just assume nothing is in it since nothing is displayed in the visible portion? If the data is there when you do open the drop-list, you need to select an item in your initialization in order to see data in the edit area upon startup.
Judy
|
|
|
|
|
Thanks for the explanation. I need to read more.
On the combo box, I actually clicked on the drop-down arrow and the box opened up but nothing is in it. I drop the same combo box in a new project (MFC AppWizard) and the list does show up. Thanks!
|
|
|
|
|
dkyue92708 wrote: The combo box is on the form but nothing is in the drop down list?
That's because you need to increase the height of the combobox. By default, it's too small.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Thanks for the feedback but that's not it. I left-click on the combo box control on the form and adjusted the size already. When I click on the drop-down arrow on the form, a drop-down box does appear that is large enough to fit the 3 items I specified in the property data sheet but it is blank.
|
|
|
|
|
With VS6, comboboxes have two separate vertical sizing methods. One sets the height of an unexpanded control, while the other sets the height of an expanded control. If you are using VS200x, I'm not sure how it behaves.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
The items in the data tab are stored as a specific resource type. When a dialog is created using MFC, one of the jobs of CDialog::OnInitDialog is to go looking for this specific resource type, and populate the combo box for you.
It may be in OnCreate (in hindsight I'm pretty sure it is), but that doesn't really change anything here.
As you're not using MFC, no code ever goes looking for the data in the resources to add to your combo box, so it remains empty.
To recap: The data tab in the resource editor is only of use if you're using MFC. You're not.
In your DlgProc for that dialog, you'll need to handle WM_INITDIALOG and add the data there. Whether you hard code the values, read them from string resources, do some digging and write a function to replicate what MFC does is up to you.
Good luck,
Iain.
|
|
|
|
|
Thanks so much for the insightful answer. It makes perfect sense now.
|
|
|
|
|
Hi.
I have to develop an application that it will run in some clients, (3 or 5 PC's) and it connects to a SQL database in a server PC.
I have some skills in MFC:-> and also I know how to connect and query, (also call a SP), a SQL database.
But, my question is:
is that all that I need to know to develop such application?.
I mean, there's something else to know or to care to develop a Client/Server app?.
I need just an orientation about that, maybe an article or something like that.
Thank you.
Demian.
"I have always wished that my computer would be as easy to use as my
telephone. My wish has come true. I no longer know how to use my telephone."
-Bjarne Stroustrup, computer science professor, designer of C++
programming language (1950- )
|
|
|
|
|
For a two-tiered solution (client-RDBMS), that's pretty much all you need. Each client can just
connect to the SQL database server.
If you add a server tier (client-server-RDBMS), then you'd need to add communication between the
clients and that server.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Mark Salsbery wrote: For a two-tiered solution (client-RDBMS), that's pretty much all you need. Each client can just
connect to the SQL database server.
As long as there are no firewall issues.
|
|
|
|
|
Yeah But the OP won't need to know any other "technologies" to hit that wall
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Ok, Mark.
But in which situations are needed a client-server-RDBMS solution?.
I just want to read and update data in a server database, (a remote server) from some few clients. Just that.
Thankx.
Demian.
"I have always wished that my computer would be as easy to use as my
telephone. My wish has come true. I no longer know how to use my telephone."
-Bjarne Stroustrup, computer science professor, designer of C++
programming language (1950- )
|
|
|
|
|
I'm no expert on database applications, but in my case, I chose 3-tier for the following reasons,
based on experience, not expertise:
Complete control over client server communication, including NAT/firewall traversal.
Complete control over user authentication.
Complete control over network security (encryption).
Generic database access from clients - I'm not bound to a specific RDBMS or data access framework.
DB connection management and pooling.
Here's an article that may be of interest: N-Tier Application Development
with Microsoft .NET[^]
It's a 3-part article but part one explains some reasons for n-tier solutions.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
I was wondering if we could reset the semaphore count to 0 using any API. Is it possible? If yes, could anyone please tell me how?
Thank you,
AJ
|
|
|
|
|
Ajay L D wrote: I was wondering if we could reset the semaphore count to 0 using any API. Is it possible?
No.
You might want to read this article[^] on how to use semaphores and the difference between a mutex and a semaphore.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
As Roger stated, there is no way of doing that. The interesting point is that this even makes no sense (if we think a little bit deeper, of course). If it were possible, the whole schema of synchronization structure would worth nothing. Suppose, a thread holds a semaphore or a mutex by being sure that no other thread grabs it from itself... And what would happen if this were possible..?
--
=====
Arman
|
|
|
|
|
while (WaitForSingleObject(handle, 0) == WAIT_OBJECT_0);
(Assuming handle is the semaphore handle)
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Hi all,
Please point me to any demo project which captures audio from any device e.g mike,etc and able to hear the captured audio using DiectShow.There are many examples but all are of video capture and display using DirectShow.
Thanks and Regards,
Mayank
|
|
|
|
|
The same principles apply to audio.
The difference is in the filters used. For capturing the audio from a device you can use the
Audio Capture Filter. For rendering (playing) the audio you can use the Audio Renderer (WaveOut)
Filter.
The "AudioCap Sample" included with the SDK is a good place to start
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
I have a program with threads and a class. In class i have a treeview , but i can't update it from thread.
<br />
foreach(DirectoryInfo d in dir.GetDirectories("*.*"))<br />
{<br />
TreeNode new_node = new TreeNode(d.Name);<br />
nods.Nodes.Add(new_node);<br />
}<br />
Error:
Action being performed on this control is being called from the wrong thread. Marshal to the correct thread using Control.Invoke or Control.BeginInvoke to perform this action. at nods.Nodes.Add(new_node);
Help me!!!
Please excuse my english
|
|
|
|
|
Looks like you are getting bit by .NET's UI/Treading implementation/restrictions... Too bad this is not a .NET forum. :P
(Tip: try the C# forum for C# issues...)
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
suntromantralalalala wrote: foreach(DirectoryInfo d in dir.GetDirectories("*.*"))
Does your question about C++?
|
|
|
|
|
suntromantralalalala wrote: foreach
foreach? What is this "foreach"?
In C++ we use manly "for" loops (Just kidding C# people, geez!)
Try the C# board[^]
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
I think we need to foreach on the c++ I think its very powerful.
|
|
|
|
|
I want to embed an IE window as a child window of my dilog,but when the user open a linker,the new page would not open in the real IE,but in my embeded child window.
Thanks
|
|
|
|