|
Its probably not working because your program is 16 bit and the OS you're running it on is 32 or 64 bit.
«_Superman_»
|
|
|
|
|
I've found some stuff at MSDN, but not really enough to figure out how to do this.
I'm looking to add check boxes to a list, and allow the user to check any of the boxes and capture that.
I have not figured out how to do this, and I'm not really sure how to start.
If that is not really going to be easy to implement, I would alternately like to just put a blue dot or something in front of each list item, and allow the user to click those, and I'd change them to red, or something. And be able to check which the user selected.
I found CheckBox and GetCapture functions from MSDN, but as I say, I'm not sure how ti use them.
I searched here, but the GetCapture discussions seem like they are about implementing advanced features.
I didn't find anything that seems the right direction for the check box.
I'm writing a program for a Windows Mobile 5 handheld with a touch screen, and using C / MFC (I am actually programming as much as I can with C, rather than C++, because I don't know C++ that well.
|
|
|
|
|
I'm programming for my WM5 device using C, I really don't know C++, so I'm sticking with C (MFC).
All I really want to do is add SOME sort of buttons to my app.
I have a list that I'd like the user to be able to select items in the list,
I can't find anything that makes any sense (because it is all C++ stuff with the something.somethingElse or something::somethingElse and this doesn't seem to do anything at all.
I find it hard to believe that I'm the first one to try this.
I found all sorts of stuff but I'm not sure what will actually make a button or check box.
I'd like something like this:
http://msdn.microsoft.com/en-us/library/aa454207.aspx[^]
from MSDN, but I settle for something simplier.
I searched for how to implement what they show here, but its like the terminology they use from the page I link is so totally different from any sort of implementation that I could not find anything else about that.
I would appreciate any help!!!!!
|
|
|
|
|
OK,
I'm used to writing windows apps for national instruments hardware, using Lab Windows, it is SW by NI for their hardware (I use this at work);
when I want to add a button to my app, I can use a GUI and add a button to my app panel, and then create a callback function from that.
THIS IS ALL I WANT TO DO!!!!!!!!!! [I'm frustrated ... with myself because I cannot find this in Visual Studio!!!!!]
Can someone that knows a little about VS, and WM5 development (or even WIndows developement) clue me in as to how this is done?
I looked at VS and found a Toolbox on the right side of the panel, but there was nothing in it.
I checked the menus, and cannot find anything that looks like it would help me create a SIMPLE BUTTON!!!!!!!
PLEASE, PLEASE, PLEASE Help!!!!!
|
|
|
|
|
Well, this seems crazy.
I know a guy at church that develops WM5 apps with C#, he said there was a form that has the screen layout, and he drags a button onto that, and can create a callback function or whatever.
I have not found any such form layout for C++, is there?
Also, I have since figured out how to make a button and get it working just fine. If anyone is interested, just let me know and I can post something. (otherwise, I'll keep the secret too).
|
|
|
|
|
I write a kind of socket program as a massenger program, but I couldn't run my socket program..
|
|
|
|
|
I think you're going into a little too much detail, but just give us the gist of it..
Regards,
--Perspx
"A refund for defective software might be nice, except it would bankrupt the entire software industry in the first year." -Andrew Tanenbaum
"Einstein argued that there must be simplified explanations of nature, because God is not capricious or arbitrary. No such faith comforts the software engineer." -Fred Brooks
|
|
|
|
|
Perspx wrote: I think you're going into a little too much detail
Exactly! Information Overload! I was totally underwhelmed by everything he said after "socket program.."
|
|
|
|
|
led mike wrote: I was totally underwhelmed by everything he said after "socket program.."
I'm still perplexed as to what a "massenger program" is..
Regards,
--Perspx
"A refund for defective software might be nice, except it would bankrupt the entire software industry in the first year." -Andrew Tanenbaum
"Einstein argued that there must be simplified explanations of nature, because God is not capricious or arbitrary. No such faith comforts the software engineer." -Fred Brooks
|
|
|
|
|
Do you want to test your program or compile it?
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
You cannot be serious.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Is there anything different we need to do to make our executables compatible with standard user XP? Will worry about Vista later. What do we need to do to get programs to work with limited use accounts? we have VS 6.0 and builing c++ code as of right now.
thank you
|
|
|
|
|
It depends what you're trying to do. In general, you don't need to do anything special for your program to run as a standard user.
One very simple way is to develop and test your code as a standard user, by running VS as a standard user. That's what I've done since 2001, developing C++ applications using VS6, VS2003, VS2005 and VS2008 under Windows 2000 (not VS2005 and VS2008) and Windows XP.
|
|
|
|
|
Hi,
I want to use the Tree control inside the CList control. I found many artical on it when I search it. But I am not able to find simple approach to do this. Most of the artical have other things beside the tree control. And many of having ready .dll to be used in program. But none one explain how to do this. Can any one suggest me the simplest way to do this(web link/sample artical). The artical which only deal with inserting tree inside list control is welcome.
Thanks:-
Mike
|
|
|
|
|
|
Hi,
In our Project we have one Main window which is menu and two dialog boxes. They are separate windows.But I want all of them in same window as tabs.What should I do?
Rekha.
|
|
|
|
|
I'm assuming you're using MFC here.
Create the two dialog boxes with its border style set to none and visible property to false.
Create 2 objects representing the dialogs.
Call .Create on the objects with the tab control as its parent.
Set the size of the dialogs to the size of the client area of the tab.
Set the dialog that is initially shown to visible.
Then in the tab change notification, hide and show the relevant dialogs.
«_Superman_»
|
|
|
|
|
Hello there... I am a newbie here but am trying exactly what hemlat has asked. I hope it is ok to carry on with this thread rather than starting a new one. Please let me know otherwise.
I read your answers (many thanks) and gave it a go, but am struggling, since I am (unfortuantely) lacking the indepth knowledge.
May I ask you for your help, please?
I am using VC++ 6.0 and want to create a very simple dialog-box-based (no SDI or MDI) program utilizing the MFC.
Using the resource editor I have created two dialogs "IDD_PAGE_TestPage1" and "IDD_PAGE_TestPage2".
Using the class wizard I have then created two classes derived from CPropertyPage:
CTestPage1::CTestPage1() : CPropertyPage(CTestPage1::IDD) and CTestPage2::CTestPage2() : CPropertyPage(CTestPage2::IDD).
In my main window (the dialog-box-based program that I created using the wizard) I have created a tab control element, which I would like to somehow "link" to the two dialogs as described above.
I tried achieving this by creating the following objects:
CPropertySheet myPropertySheet;
CTestPage1 myPage1;
CTestPage2 myPage2;
... and then I tried all sorts of things (including ...DoModal, ....ShowWindow(), ..etc. to get my dialogs displayed as part of the tab control, but in vain.
FYI: Although I did some programming in C and C++ many, many years ago (mainly embedded stuff) and even started once to do some WIN32API and MFC programming, ...I have to admit that I am at this stage still lacking some of the (crucial, I know...) Windows concepts (in terms of parent/child relationship, event handling, etc.
I would greatly appreciate any feed back to my questions/problem.
Thanks !
modified on Sunday, February 8, 2009 1:22 AM
|
|
|
|
|
Hi,
Please see my reply to hemlat.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Thanks Rajesh, that is an interesting link/example, but I am not "there yet".
In order to learn the MFC basics properly and also not to complicate things for me at this stage (I am a novice), I would really like to get this relatively simple task (at least that's what I thought it would be), ...to be done with the standard MFC functionality.
I studied the help file etc. and my thinking was that using the CPropertySheet and ...page classes should do the trick, but rather than displaying the content of the individual dialogs in the appropriate tab pages, they are being displayed on top of the whole main dialog window and I need to close them to get to the actual (main) window).
I am sure this can be done, but I seem to be missing an important little step to implement it properly.
Maybe I must not call the individual dialogs as modal ones (with .DoModal(), but have to somehow, make them non-modal child of the tab control?
Even if that is the case, my problem is, that I don't have a clue how to do it.
Any help is most appreciated. Thanks.
modified on Sunday, February 8, 2009 3:53 AM
|
|
|
|
|
The problem is that your're not linking the property pages to the property sheet.
Try the following code in the main dialog class.
myPropertySheet.AddPage(&myPage1);
myPropertySheet.AddPage(&myPage2);
myPropertySheet.DoModal();
«_Superman_»
|
|
|
|
|
Thanks for your message,
As one of my many attempts, I had actually tried what you suggest, already. That is how it looks.
BOOL CTestDlg::OnInitDialog()
{
CDialog::OnInitDialog();
CPropertySheet myPropertySheet;
CTestPage1 myPage1;
CTestPage2 myPage2;
myPropertySheet.AddPage(&myPage1);
myPropertySheet.AddPage(&myPage2);
myPropertySheet.DoModal();
If I do this, the application does actually call the tab control (consisting of these two test pages). And it even comes fully equiped with OK CANCEL APPLY and HELP button in that dialog.
However it is not a 'child' (hope this term is right) of my actual main window, but sits on top of the main window instead. Once I hit OK or CANCEL this tab control dialog (which contains the correct tab contents, by the way) disappears and I can see my actual main window. But no way to get the tab control dialoga within my main window.
I think I am still missing an important step.
Maybe I shouldn't call the
myPropertySheet.AddPage(&myPage1);
myPropertySheet.AddPage(&myPage2);
in the OnInitDialog() function? What where else?
Heeeeeeeeelllllllp
|
|
|
|
|
I understand that you want the property sheet to be your main dialog.
You can remove the DoModal that is already there in the InitInstance method and replace it with the following code -
CPropertySheet myPropertySheet;
CTestPage1 myPage1;
CTestPage2 myPage2;
myPropertySheet.AddPage(&myPage1);
myPropertySheet.AddPage(&myPage2);
myPropertySheet.DoModal();
«_Superman_»
|
|
|
|
|
Thanks for your help and patience and please excuse my ignorance, but I don't know what you mean by "InitInstance "...I don't think I have that in my code.
To create my main window I just ran the AppWzeard and let it create most of my dialog box based program.
So far I have only added a few buttons which call some message boxes.
I am really at the beginning of the program. No fancy functionality yet.
Yes you are right my main window, which contains a few control elements (including the tab control, which I want to display the individual dialogs CTestpage1 and CTestpage2) is supposed to be the one and only dialog.
So on start up of the program I would like the tab control having the focus on the first of my dialog pages (CTestPage1).
|
|
|
|
|
Search through all the .cpp files.
You will see a method called InitInstance .
In that you will see a call to the DoModal function.
«_Superman_»
|
|
|
|