|
Not a group of controls, but a group of windows.. Open two NotePad windows up, move one of them and pretend the other one was moving too 
|
|
|
|
|
shaosean wrote: Not a group of controls, but a group of windows..
In Windows, everything is a window. You are referring to an application window rather than a control window.
shaosean wrote: Open two NotePad windows up, move one of them and pretend the other one was moving too
I've never seen such behavior.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|
|
(I just started programming for Windows today so some of the lingo is a little different from one OS to the next)
Yes, an application window.. If everything is a window, would the same concept of grouping control windows work with application windows? Something for me to test out when I get back home..
|
|
|
|
|
shaosean wrote: If everything is a window, would the same concept of grouping control windows work with application windows?
Without digging into it deeper, I can't say for sure. If it is, I doubt it's 5-6 lines of code like that example I referenced.
Just out of curiosity, why would you want/need such behavior?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|
|
Two keep two windows linked together of course
The plugin I wrote on the Mac has this feature (part of the OS) and someone had requested this feature for Windows and seeing as I am starting the Windows version of the plugin I thought I would try to tackle it but it seems like I may need to wait for this feature..
|
|
|
|
|
shaosean wrote: Two keep two windows linked together of course
Admitingly, I've only been using Windows for 20 years, but in all that time, I've never had the need to link two separate windows together. Other peoples' mileage may vary, however.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|
|
I have used Windows since 2.0, Mac since 6.0 and have not really seen much of a need for this feature either, but since I started writing little C++ plugins for the language I normally code in I get all kinds of requests, this being one of them (they liked the feature in the Mac plugin and asked if I could do the same on Windows)
Thanks for all the replies but it looks like this is not something standard in Windows.. Anyone willing to try to do this? I have a whole 20 CAD in PayPal I can part with (I am jobless and only program for fun and learning)
|
|
|
|
|
shaosean wrote: Open two NotePad windows up, move one of them and pretend the other one was moving too
Two notepad windows means two different processes. You need to do some IPC for this.
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 think the OP wrote that as an example ...
This signature was proudly tested on animals.
|
|
|
|
|
Yes it was an example.. As previously mentioned I am coming from a Mac background where two document windows in an application is only one process..
|
|
|
|
|
AFAIK, nothing in Windows do that.
You need to code that yourself; it's not technically that hard, but specifications and requirements can make it a b*tch to implement.
This signature was proudly tested on animals.
|
|
|
|
|
HI all,
In property sheet and property pages,the by default font is fixed,iwant to set Font "Verdana(8)" to all pages and propety sheet also.
so i m taking help of this article.
http://support.microsoft.com/kb/142170[^]
all thinngs are done ,now i want to bold the caption of groupbox those are placed on property pages.
but its not done.
so please help me how can i do this.
thanks in advance.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
Le@rner wrote: now i want to bold the caption of groupbox those are placed on property pages.
See the Extras section of this article. It shows how to bold a static control. You can do the same thing for a button (i.e., group) control.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|
|
Hi,
how can i get handle to static control in combobox..
i tried
COMBOBOXINFO cbi;
cbi.cbSize = sizeof(COMBOBOXINFO);
m_ComboBox.GetComboBoxInfo(&cbi);
but cbi gives the handle for edit control but not static control....
Please help me regarding the same..
|
|
|
|
|
What static control do you mean?
A combobox doesn't have a static control.
Maybe you mean a label before the combobox?
|
|
|
|
|
Hi,
I'm creating a simple program wherein, the dialog contains only 2 elements, an edit box and a button(OK).
I've initiated a member variable for the edit box of the type 'int'.
After I run the application, enter a number and press OK, the number I've entered must be saved into the variable that I've already created.
After saving the number, the variable is used in a further part of the program, which is not relevant to this problem.
But the number is not being saved, resulting in halting the program.
Plzz help me in solving this problem.
Is my approach correct?
Thank You
|
|
|
|
|
Your approach does seem to be the correct one. I guess (as always) the devil's in the detail..
Don't know if you're using mfc or just plain c. Here's some code that works without mfc.
STEP 1: Create the main program window and the necessary controls.
#define IDC_EDIT 1001
HFONT hfont0 = CreateFont(-11, 0, 0, 0, 400, FALSE, FALSE, FALSE, 1, 400, 0, 0, 0, ("Ms Shell Dlg 2"));
hwnd = CreateWindowEx(WS_EX_TOOLWINDOW | WS_EX_APPWINDOW, szClassName, "Dialog", WS_VISIBLE | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP | WS_SYSMENU, 0, 0, 285, 78, 0, 0, hThisInstance, 0);
HWND hCtrl0_0 = CreateWindowEx(0, WC_BUTTON, ("OK"), WS_VISIBLE | WS_CHILD | WS_TABSTOP | 0x00000001, 234, 15, 35, 23, hwnd, (HMENU)IDOK, hThisInstance, 0);
HWND hCtrl0_1 = CreateWindowEx(0, WC_EDIT, 0, WS_VISIBLE | WS_CHILD | WS_TABSTOP | WS_BORDER | ES_AUTOHSCROLL, 162, 15, 66, 23, hwnd, (HMENU)IDC_EDIT, hThisInstance, 0);
HWND hCtrl0_2 = CreateWindowEx(0, WC_STATIC, ("Enter a +ive Int:"), WS_VISIBLE | WS_CHILD | WS_GROUP | SS_LEFT, 63, 24, 84, 13, hwnd, (HMENU)-1, hThisInstance, 0);
SendMessage(hCtrl0_0, WM_SETFONT, (WPARAM)hfont0, FALSE);
SendMessage(hCtrl0_1, WM_SETFONT, (WPARAM)hfont0, FALSE);
SendMessage(hCtrl0_2, WM_SETFONT, (WPARAM)hfont0, FALSE);
STEP 2: Handle the WM_COMMAND message in our message handling function
(and in this example, show the number entered as well as 2x the number entered)
case WM_COMMAND:
switch(LOWORD(wParam))
{
case IDOK:
tmp = GetDlgItemInt(hwnd, IDC_EDIT, &didSucceed, false);
sprintf(successStr, "%d\n2 * num = %d", tmp, tmp*2);
if (didSucceed)
MessageBox(NULL, successStr, "Number entered:", MB_OK);
else
MessageBox(NULL, "Invalid number!", "Error", MB_OK);
}
break;
modified on Thursday, October 29, 2009 10:37 PM
|
|
|
|
|
raviteja2020 wrote: But the number is not being saved...
How are you verifying this?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|
|
If you're using MFC, then you can use the class wizard to add a variable to your dialog, and "attach" it with the edit window. When OK, is pressed, the number is grabbed and put into your variable.
Look at:
DoDataExchange<br />
UpdateData<br />
DDX_Text
on google or msdn for more information.
You've now had answers for raw Win32, and for MFC. If neither of those helps ata ll, then you either need a different forum, or to give more information.
Good luck,
Iain.
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need contract work done, give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
Hi friends,
I have a requirement to show combobox (in addition to the column heading text) in four of the column headers in a list control. The intended functionality is that, when even user selects some value from the combobox, the content of the list control be filtered based on the user selection. Can somebody shed some light how to go about doing this.
Thanks
Sheebu
|
|
|
|
|
I'm 99% sure you can't do this. So, you have a few choices...
You could make a few comboboxes above the list control, and not use the header text?
Or you could detect that someone has clicked on the header control, and instead of sorting (default bahaviour), you could pop up a box instead?
For ideas on how to do that, have a look at my article: Generic Picker Dropdown Control[^] or the original inspiration for my article: Office 97 style Colour Picker control[^]
You won't be able to use them directly, but they will help you with the idea of positionaing a popup window next to another, in such a way as it looks like a combobox.
You have a thrid alternative of explaining to whoever is requiring this requirement that what they want is not easy, and are they sure they want to budget time / resources to this...
Good luck,
Iain.
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need contract work done, give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
Hi Iain,
Thank you very much for your suggestions. I am trying to go with the second suggestion of yours. I will update this post with my findings..
Thanks
Sheebu
|
|
|
|
|
I have a project which about dns resolver. I need help about this subject. If somebody have any code in c++ or java, please help.
DNS runs over the UDP protocol, and is used to convert user-friendly host names, e.g., www.anadolu.edu.tr, to IP addresses, called the forward translation, or IP addresses to host names, called the reverse translation.
DNS consists of 2 types of messages: Queries and replies.The message (both query and reply) starts with a 12-byte header. The ¯rst 2 bytes contains the message identi¯er, and is used to match replies with queries. Notice that a real DNS resolver may be handling several queries at the same time. Since
all responses will arrive at the same client port, the resolver needs a way to match responses to queries. The message identifier is used for this purpose. Since the resolver will deal with a single query at any time, you may simply set the identifier field to 1 for all your queries. The next 2 bytes is the flags field, and is divided into numerous pieces.
My code should send the the user friendly adress( www.anadolu.edu.tr) to a name server than if i get the answer i will print the ip adresses to the screen. Also my program shoul send the ip address to a server and get the user friendly name to print.
Type of the message should be like this (Query(i sent) and Reply(server sents) messages are same).
12 BYTES HEADER
0-15 (bits) identification:is used to match replies with queries. It is 1 for this project.
16-31(bits) flag field: id divided into fields like below.
QR is a 1-bit ¯eld: 0 means the message is a query, 1 means it is a response.
OPCODE is a 4-bit field: The normal value is 0 (standard query). Other values are 1 (an inverse query), and 2 (server status request).
AA is a 1-bit flag that means "authoritative answer." If the DNS server is authoritative for the queried host, it sets this bit.
TC is a 1-bit flag that means "truncated." With UDP this means the total size of the reply exceeds 512 bytes, and only the first 512 bytes of the reply was returned.
RD is a 1-bit flag that means "recursion desired." This bit can be set in a query and is then returned in the response. This flag tells the name server to handle the query itlsef, called a recursive query. If the bit is not set, and the requested name server does not have an authoritative answer, the requested name server returns a list of other name servers to contact for the answer. This is called an iterative query.
ZERO There is a 3-bit field that must be 0.
RCODE is a 4-bit field with the return code. The common values are 0 (no error) and 3 (name error). A name error is returned only from an authoritative name server and means the domain speci¯ed in query does not exist.
Thanks..
modified on Thursday, October 29, 2009 8:47 AM
|
|
|
|
|
marti86 wrote: I have a project which about dns resolver.
Explain what you mean by this and you'll likely receive more help.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|
|
Hello .
I want to execute a process at startup of computer before the user has logged on to the machine. How should I do this , I had made a Winlogon pacakage for this but It supports os till Windows 2003 . For later versions of OS including Vista and Windows 2008 where they have removed the concept of Winlogon notify , can any body let me know the alternative for this.
Regards,
Kushagra
modified on Thursday, October 29, 2009 8:59 AM
|
|
|
|
|