荔园在线

荔园之美,在春之萌芽,在夏之绽放,在秋之收获,在冬之沉淀

[回到开始] [上一篇][下一篇]


发信人: tang (独孤九剑), 信区: Program
标  题: MSVC-BEGINNERS Digest - 13 May 1998 to 14 May 199
发信站: BBS 荔园晨风站 (Sat May 16 22:38:47 1998), 转信

here are 9 messages totalling 374 lines in this issue.

Topics of the day:

  1. USER ID AND CURRENT DATE IN MFC??
  2. passing arrays (2)
  3. Q: How to create a reusable widget in MFC ?
  4. Mystery modifier
  5. Threads, Events & Process
  6. Debug Error - Thread (2)
  7. STL & istream problem
Hi,

I am not sure about the user id part , but getting the current date is
fairly simple.

Just use the CTime class and check out its data members.

Regards.

Raghu
Software Engineer,
Ruksun Software Technologies,
svraghu@ruksun.com

~~~~~~~~~~~~~~~~~~~
Dreams and Dedication make a powerful Combination.
~~~~~~~~~~~~~~~~~~~
Why Not ! First of all, you didnt mention whether you are using c or c++.
If you are using c++, you could simply use references . else, you could use
a pointer to the structarray and use an index as well.

Say, the array of structure is defined as
#define MAXSIZE 10
struct x
{ ....
} structarray[MAXSIZE];

Your function would be declared as

void myfunc(struct x *tmpstruct);

main()
{

//    YOu could now invoke the function as

    myfunc(&structarray[0]);
}

IN your myfunc, you could always do

void myfunc(struct x *tmpstruct)
{
    for (i=0;i <MAXSIZE;i++)
        {
           // do something with(tmpstruct[i]);
        }
}

This code would work perfectly well. Hope this helps.

Regards,

Raghu
Software Engineer,
Ruksun Software Technologies,
svraghu@ruksun.com

~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When the going gets very easy, look for the sign "you are going downHill"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Hello to all MFCers!

I was wondering what the "best" method might be to create a widget
(let's say for example a special logarithmic progress indicator) that
should be easily (re)usable and as easy to construct as possible.

I can see several methods of doing this but cannot find any clear
documentation that shows advantages and disadvantages.

(1) I might try to create a OLE, OCX, ActiveX control. This seems quite
complex and to generic especially if I only need to reuse the component
in MFC. I also do not like the to complex interface compared to a nicely
designed class interface.

(2) I can create a child window that is encapsulated in a CWnd derived class
and manage the control as a Window.

(3) I can go for a simple class that just behaves like a CWnd class but
in reality is only a internally defined region of a window that knows how
to redraw itself, to move itself etc.

(4) I can try to create a class that is derived from a "native" control
class but draws itself.

and some other even more unusual methods seem possible ...

Can someone give me some directions on how to compare all this available
methods or point me to some useful existing documentation.
The best would be an available example that shows some or all of this
possibilities.

Regards and thanks for any help in advance

Dieter Oberkofler
Director of Engineering
--
        There are these few times I feel lonely for you.
        But I know this shade of blue will soon pass through!
        I must be strong without you by my side!
        I can see forever you are my light.

※ 来源:.BBS 荔园晨风站 bbs.szu.edu.cn.[FROM: 192.168.0.4]


[回到开始] [上一篇][下一篇]

荔园在线首页 友情链接:深圳大学 深大招生 荔园晨风BBS S-Term软件 网络书店