|
Sound like a typical CView window.
Kuphryn
|
|
|
|
|
so how do I accomplish it with the CView?
|
|
|
|
|
I have ben using 3rd party ActiveX controls on my dialog
based application. I have used the Tabbed dialog class
CMyTabCtrl - from codeproject - (6 dialogs in total).
All is fine apart from dialog 4 (tab 4), I keep getting an
Debug Assertion Error when I refer to any member variables
associated to any controls on this tab.
I thought is was just with the 3rd party ActiveX controls,
but it occures with a member variable tied to a standard
Windows button.
The variables are all NULL {000000} and I dont understand
why. I have deleted and replaced some of the controls, but
get the same error.
The use of member variables on other dialogs (tabs) are
OK - they work fine.
I dont want to restart this project as a lot of work has
gone into it.
Any idears out there?
|
|
|
|
|
Humm...
As you didn't post any code, consider doing some cross-reference checking. See what variables and functions you have in one of the dialogs (Not #4) and then compare the way you create this dialog to that of #4's.
Basically, see the logic behind all your dialogs: how do they work, how are they called. Then see how the ones which work differ from #4.
Last resort is to attach the debugger and step through the code to see what ASSERT command causes the assertion. This assumes that you have MFC Source Code installed. If you don't, then guessing and testing is the best way to go.
Perhaps you would post some code here ? I assume the Tabbed dialog is a self-standing class and the control forms (tab views) are members of this class ?
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
Thanks for your post.
The assertion error occures as soon as I make referecnce to any of the controls member variables.
It seems that the dialog is not being initialsed, but I can see no difference in this tabbed dialog than all the others.
|
|
|
|
|
Has anyone managed to get tear-off menus working in Windows (other than with the GTK, I mean!)
It would be possible to have a menu item with a line of dashes as its caption. It would be possible to make that item open a new window. But: is it possible to make that new window contain a fully-opened copy of an arbitrary HMENU?
You could make the "tear here" menu item open a copy of its own menu as a TrackPopupMenu item, but the popup menus only last for one mouseclick, and you can't drag them around like a window.
Those are just a couple of ideas, neither of which really works properly yet: are there more reliable ways of having tear-off menus?
|
|
|
|
|
please don't ...
the tear-off menus are one of the ugliest UI "feature" ever done; they were meant, I think, to replace toolbars functionalities.
I suggest you try implementing toolbars, and customizable toolbars ( to add/remove buttons ) instead.
but if you really want to, one way would be to create a palette-like window with buttons that represent the menu items.
Maximilien Lincourt
"Never underestimate the bandwidth of a station wagon filled with backup tapes." ("Computer Networks" by Andrew S Tannenbaum )
|
|
|
|
|
I'm trying to enumerate all hard drive partitions on a machine with GetDriveType(), and come up with total/free disk space figures and such, and have come across an "interesting" scenario...
If you use something like:
SUBST X: C:\TEST
...enumerating this "drive" will count the storage space of C: twice (obviously, since both are physically the same drive).
Is there any API that will let me identify SUBST'ed drives? I don't see anything returned by GetDriveType() offering any indication that this is the case, and GetLogicalDrives() doesn't seem to care either.
Comparing volume names isn't reliable, as I can (and do) have any number of drives/partitions actually using the same volume names.
What about the Volume Serial Number parameter of GetVolumeInformation()? Is it possible to have two totally different drives/partitions with the same volume serial number? My understanding is that this serial number is generated when the partition is formatted...and I'm thinking that yes, something like Norton Ghost would probably make the system use identical volume serial numbers for totally unrelated drives...
Note also that I'm aware that this volume serial number isn't the same as the hard drive's physical serial number--which might come in handy (?), but isn't easy to get to from a Win32 app...
Suggestions?
|
|
|
|
|
See here, here, and here.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Hmmm....the first link uses a proprietary VxD (which obviously won't work on NT+), and the second and third links use WMI (which I can't assume will exist on the target machine)...
On the other hand, the first link identifies the Int21 call (function 71aah), so at least this gives me something to work with...
Thanks.
|
|
|
|
|
You can still call interrupt 21 functions from VC++. Just open an asm block, load AX and invoke int 21h
It should return a pointer to a table of the current state of drive mappings.
Just google on int 21h - it has been a few years since I have used it and can't remember the exact calls.
|
|
|
|
|
Hi everyone,
I have a UDP client running.
I wanted to know if I can use the flag MSG_PEEK when doing a Receive. I keep getting an error (WSAEMSGSIZE (10040)) which says the message is too long.
What is currently in the buffer is a 12 bytes message. I want to just peek at the first 4 bytes so that I know how to process it. I have a temp buffer declared as 4 bytes to store and determine what kind of message it is, but it keeps reading all 12 bytes, trancating, and returning an error. What I want it to do is peek at the buffer and then process each type of message. In the process method of each type, that is where I would like to take the info out the buffer.
I do this same method for TCP client and it works fine.
What should I be doing to have this perform like I want and how I have it in my TCP client app?
Thanks in advance.
Jimmy
Just cause I am 15, doesn't mean I'm dumb! (I'll really be 4 on Feb. 29...the year 2004)
|
|
|
|
|
With UDP sockets you have to call ReceiveFrom instead of Receive. Thats why it works with TCP.
Bunburry
|
|
|
|
|
Developing, building, and testing. How do it the best? Learning from the world leader - Microsoft
I'm very interested in how the developing/build/testing workflow @ Microsoft looks like. I think Microsoft as world leader in software developing business must have a very good workflow. Does anyone know how the development flow @ Microsoft looks like?
I'm also interested in the workflow in your company perhaps the workflow in your company better then @ Microsoft? What do you think about test driven development?
Regards,
Gicio
|
|
|
|
|
Back when the company I was working for was embarking on a big BizTalk Server project, we had two Microsoft consultants come in for a week and brief us on what we needed in order to mature to the next level. I don't remember everything that was discussed but one thing that stuck with me was out of all the ideas/suggestions that are submitted (for new products or enhancements to existing products), only 10% of them are approved, which is why most of their products do very well. They can quickly determine if the work can be justified. If it can't, they don't bother with it. In most other companies, work is work, and it all gets done whether it has an ROI or not. It was quickly brought to their attention that Microsoft is the only company that could afford to be proactive, and that the other companies had no choice but to be reactive. They acknowledge that.
Shortly thereafter, myself and a few others took a trip to Redmond for some more training on getting the BizTalk Server project to its next phase. The net result was that BizTalk Server, as good as it was, was not yet ready for the task at hand. The other group that we were working with, Washington Publishing, was the copyright holder for an EDI document that was being fed into BizTalk Server. The output was supposed to be something generic that could be imported into SQL Server. Anyway, enough of that.
Microsoft definitely has some processes in place. For a price, they are happy to teach them to you. Surprisingly, most of what was taught to us was nothing new. It was mostly a matter of just doing it.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Hi.
My previous question was whether I need the platform SDk for WInsock. I want to use WSA.., connect, etc type of calls instead of MFC ones. I assume the answer is still the same and I do not need the platform SDK.
The next question I got is this. EACH port can only connect to ONE server. Is this correct?
I want to write a client class that will connect to a server. It will then spawn a thread to handle the reading of the data as it comes so as to get the data as soon as possible. If only ONE connection is possible, then I can just use the event method to signal that data has come in. Is this the best way? THis way I know when things come in and when a write is finished if I need it. I don't think I will have too many clients on the computer so that creating a thread for each socket port is probably OK. I just want to make sure my thinking is along the right lines.
THanks!!!
|
|
|
|
|
Each port can simultaneously connect to a single server, so that is correct.
However, you can start a seperate thread which monitors ALL the open ports. Afterall, checking a port isn't a long process, so this shouldn't cause any timing issues.
Now, instead of opening dozens of ports, I suggest that you formulate the data sent by the server, if that is possible. Place a identification number in front of each data packet to tell your program from which 'virtual port' this packet is coming from. This way you can open 'multiple' connections to a single server using only single physical port.
The event driven method is appropriate, considering that you created a seperate thread to handle the port. Now, when a port event occurs, the handler thread is notified. At this point, save the data to a temporary variable, free the port and notify your application that new data is available. This way the port is freed quickly, but the transfer of data from the port to the application isn't in a terrible hurry. This is called data buffering.
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
Sorry, 'bout that, now I understand what you are asking.
No you don't need SDK.
Theoretically, constructing WsaData explicitly requires SockAddr_in struct but I had an instructor once who said that dynamic sockets are possible but never showed me how.
Also, I've never tried to use a "Send" socket and a "Receive" socket (I assume this is what you are trying). I'll have to think more about this one using winsock2.
|
|
|
|
|
Stan the man wrote:
EACH port can only connect to ONE server. Is this correct?
1. Yes, but only if you use TCP, because it is connection oriented.
2. No, if use UDP datagramms. Datagramms are "broadcasted" therefore they can have several recipients.
Bunburry
|
|
|
|
|
Hi,
How can I evaluate the value of checkbox called "check1" (or something like it), in my setup project, if the box is checked, I need to place a shortcut on the desktop!
Thanks!
|
|
|
|
|
If this is MFC, use CButton::GetCheck() . Otherwise, send a BM_GETCHECK message to the control.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
OK, but this isn't MFC --> this is a SETUP project!
As far is I know this one has nothing to do with MFC (or am I wrong?)
|
|
|
|
|
Well, since your question was posted in the VC++ forum, it was assumed to be a VC++ question or an MFC question.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
That's right,
but where do I have to place my question (I don't know!)?
|
|
|
|
|
My first thought would be in a forum specializing in the language in which your setup application is written.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|