|
ei thanks for replying... well i really need your help.. i realyl don't know what to do... my professor don't want us to ask question to him. He always say,... GO and explore. well i really hve difficulty on understanding how to do this stuff... will you help me on this???? thanks a lot.... oh by the w7y, it must be done using visual C++ 6.0........
JRBD
|
|
|
|
|
I have no idea how much you know about the language and development environment, so bear that in mind with suggestions I make. btw, I'm happy to give you some pointers, but I'm not about to do your homework for you, ok?!
Are you using a graphics based input? In which case, I'd suggest using an MFC Application wizard (exe) to generate a basic project. If not then you'll probably want a Win32 Console App. You can search google and/or the MSDev help system for more info on these. (I'm assuming you can use Wizards? It does simplify things.)
You'll also need to understand such basics as arrays (unless you're using a database interface?), and data input. There is a pretty good on-line reference at:
http://www.cplusplus.com/doc/tutorial/[^]
If your knowledge is that basic, btw, a week is cutting it pretty fine. Google-ing for an example to build upon might be a good idea...
Debbie
|
|
|
|
|
Well thanks debbie... yuor help is very well appreciated. I am so lucky with people like you who i willing to help someone... thanks again
|
|
|
|
|
Not exactly the level of difficulty I would have assigned to a person just starting with the C++ language.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Sounds pretty straight-forward.
And it's probably a fair guess that s/he was given more than a week to do it
"Sucks less" isn't progress - Kent Beck [^]
Awasu 1.1.4 [^]: A free RSS reader with support for Code Project.
|
|
|
|
|
Taka Muraoka wrote:
And it's probably a fair guess that s/he was given more than a week to do it
Hey, a week seems like a lot of forethought to me!
Debbie
|
|
|
|
|
I'm trying to display an open file common dialog with some additional controls added to it.
Question 1:
One problem I have is that I cannot hide the places bar.
It's supposed to be done by using FlagsEx and OFN_EX_NOPLACESBAR but I get errors:
error C2039: 'FlagsEx' : is not a member of 'tagOFNA'
error C2065: 'OFN_EX_NOPLACESBAR' : undeclared identifier
I have found some info about it on MSDN but I'm not smart enough to get it work anyway. How should it be done?
I know at least that the windows version is involved somehow.
I use VC++ 7.1 and Windows XP.
|
|
|
|
|
To get the members defined, you need to define _WIN32_WINNT to be 0x0500 or higher (for some Windows XP-specific stuff, you need to set it to 0x0501). This macro and its cousins _WIN32_WINDOWS and _WIN32_IE are used in the Windows SDK headers to control which macros, functions and structures are available - preventing you from accidentally compiling code which won't run on your target platform. Visual C++ sets _WIN32_WINNT to be 0x0400 by default, meaning that any features added to Windows 2000 or later are excluded from the build.
Decide what the minimum platform you'll support is, then define macros appropriately. You can get a current list at the page Using the SDK Headers[^].
You can write code that will still run on NT 4.0 and earlier for OPENFILENAME by calling GetVersionEx and checking whether dwMajorVersion is greater than 5. If not, set lStructSize to be OPENFILENAME_SIZE_VERSION_400 rather than sizeof(OPENFILENAME) .
|
|
|
|
|
I have made a resizable combo box using windows api. In the scrollbar i am getting the gripper at bottom roght corner using function
DrawFrameControl(hdc, &gripperRect, DFC_SCROLL, DFCS_SCROLLSIZEGRIP | DFCS_FLAT);
But i am not able to get the gripper in top right corner;
I want to have the same kind of gripper it comes in the RUN window(shortcut : windows + r, start>run)
kindly tell me how to get the gripper in top right corner.
One way i thought could be to get the same kind of gripper of bottom right and then rotate by 90 degree anti clockwise
can there be any way to rotate the gripper is it posible.
or is there some existing style that can be used with the above function
|
|
|
|
|
Hello Guys..
This is hari..i need some help regarding VC++...the problem iam not able to load an icon to a button in App Runtime..ie. iam selecting an icon in the App and it is loaded on the Button...guys help me to come out of it
Thanks in Advance..
Hariharan.S.N
|
|
|
|
|
use LoadImage
and set the fuload to LR_LOADFROMFILE
The World is getting smaller and so are the people.
|
|
|
|
|
I think ur problem is loading icons (or images) at runtime, from files.
MFC 7.0 solves this problem with CImage class, check the docs for details.
U can also search this site. There are button classes here that u can use instead.
What would life be without programmers and salesmen?
|
|
|
|
|
I have a CPropertySheet derived class; I need to implement the CPropertySheet::RemovePage(int nPage)
Would you tell me how I can do that?
|
|
|
|
|
I will like to believe u probably need to do some things before removing the page.
Try implementing these 2 mtds:
void CMyPropertySheet::RemovePage(CPropertyPage *pPage)
{
//do ur stuff...
//......
//finally, call the parent mtd...
CPropertySheet::RemovePage(pPage);
}
void CMyPropertySheet::RemovePage(int nPage )
{
//do ur stuff...
//......
//finally, call the parent mtd...
CPropertySheet::RemovePage(nPage );
}
Goodluck!
What would life be without programmers and salesmen?
|
|
|
|
|
Thanks for the reply!
I've done the same but the problem is that it throws an exception, I think it's due to another code I've put in the caller method.
|
|
|
|
|
I have 3 classes that are derived from each other as:
class A
class B: public Class A
class C: public class B
I've used a dynamic message in class A which resizes the controls on it. I want to resize the controls on classes B and C as well and I've put
BEGIN_DYNAMIC_MAP()
...
END_DYNAMIC_MAP()
on them but the controls are not resized in classes B and C.
Could you help me?
|
|
|
|
|
I don't know about..
BEGIN_DYNAMIC_MAP()
...
END_DYNAMIC_MAP()
I think it should be similar to BEGIN/END_MESSAGE_MAP. I'll also assume ur classes (i.e A,B,C) can recieve messages.
MFC docs says " if a message can't be matched in a derived class's message map, the framework also searches the message map of its immediate base class".
So check to ensure u have something like these...
//for class B
BEGIN_MESSAGE_MAP(B, A)
//..
END_MESSAGE_MAP
//for class C
BEGIN_MESSAGE_MAP(C, B)
//..
END_MESSAGE_MAP
search MFC doc for more details
goodluck!
What would life be without programmers and salesmen?
|
|
|
|
|
yes BEGIN/END _DYNAMIC_MAP()is something like BEGIN/END_MESSAGE_MAP that has been defined in a class that my A class is derived from that.
By the way, I do have
//for class B
BEGIN_MESSAGE_MAP(B, A)
//..
END_MESSAGE_MAP
//for class C
BEGIN_MESSAGE_MAP(C, B)
//..
END_MESSAGE_MAP
but nothing happens when resizing the classes B and C, and I couldn't find anything useful in MFC docs except what you have mentioned
|
|
|
|
|
You can try calling a virtual mtd (e.g doresize) from ur class A message handler. Remember to implement the mtd in B and C.
OR..
If class A is a CWnd kind-of (which I feel it is), then implement the usaul MFC's overidables like 'OnSize' e.t.c.
good luck!
What would life be without programmers and salesmen?
|
|
|
|
|
I've implmented OnSize() in child classes and the page itself is resized but the controls are not
I'm using this code to resize the controls and it works in the parent class:
BEGIN_DYNAMIC_MAP(CPropPageTabular,CPropPageItemize)
DYNAMIC_MAP_ENTRY(IDC_STATIC_REP_OPTIONS, mdResize, mdResize)
...
END_DYNAMIC_MAP()
|
|
|
|
|
Can I see the details of ur OnSize implementation?
What would life be without programmers and salesmen?
|
|
|
|
|
hello
i want to get the information about nbtstat command which is used in dos mode i want to get all information given
Z:\>nbtstat -a 192.168.1.215
Local Area Connection:
Node IpAddress: [192.168.1.216] Scope Id: []
NetBIOS Remote Machine Name Table
Name Type Status
---------------------------------------------
RES1_15 <00> UNIQUE Registered
BIIT-1 <00> GROUP Registered
RES1_15 <03> UNIQUE Registered
RES1_15 <20> UNIQUE Registered
BIIT-1 <1E> GROUP Registered
MIT01F-AFAZIL <03> UNIQUE Registered
MAC Address = 00-80-C8-F5-73-C1
using the vc++ or the api calls or mfc functions can u tell me plz how will i get this in vc i want to get actually the user name by giveing the ip address of the computer on the network while sitting on my own system .
tell me how will i do this work give me code related help too
regards
farrukh
du_aa
|
|
|
|
|
I think you need the Netbios system call, passing NCBASTAT as the ncb_command member of the NCB structure.
|
|
|
|
|
it works only for the adapter information i want to get the information like user name which i have told in the example
how will this information can i get plz tell me
regards
du_aa
|
|
|
|
|
plz give the idea by some coding help and getting the user name NCBASTAT gives the adapter satus i want the user name which the nbtstat gives like in example "afzal" is given by the nbtstat command
plzz tell me \
regards
du_aa
|
|
|
|