|
Why you cant use of 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 )
|
|
|
|
|
Hi,
I have added ScrollBar to my Dialog.I added variable and Message Mapping function to it.I am displaying Images in my Dialog.After one Scroll ScrollBar is disappering.
void EnhancedReport::OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
{
int CurPos = m_ScrollBar.GetScrollPos();
switch (nSBCode)
{
case SB_LEFT:
CurPos = 0;
break;
case SB_RIGHT:
CurPos = (m_filecount/8);
break;
case SB_ENDSCROLL:
break;
case SB_LINELEFT:
if (CurPos > 0)
CurPos--;
break;
case SB_LINERIGHT:
if (CurPos < (m_filecount/8))
CurPos++;
break;
case SB_PAGELEFT:
{
SCROLLINFO info;
m_ScrollBar.GetScrollInfo(&info, SIF_ALL);
if (CurPos > 0)
CurPos = max(0, CurPos - (int) info.nPage);
}
break;
case SB_PAGERIGHT:
{
SCROLLINFO info;
m_ScrollBar.GetScrollInfo(&info, SIF_ALL);
if (CurPos < (m_filecount/8))
CurPos = min((m_filecount/8), CurPos + (int) info.nPage);
}
break;
case SB_THUMBPOSITION:
CurPos = nPos;
break;
case SB_THUMBTRACK:
CurPos = nPos;
break;
}
m_ScrollBar.SetScrollPos(CurPos);
DisplayImages(CurPos);
}
|
|
|
|
|
You cant see your scrollBar when you show your images?
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 )
|
|
|
|
|
First time I can able to see ScrollBar.When I do DoModal Dialog is coming with Images and ScrollBar.After one Scroll ScrollBar is missing.
|
|
|
|
|
How do you show your image?
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 )
|
|
|
|
|
By using load() and Setbitmap() functions I am displaying Images in Dialog.
But Problem is with SCrollBar. ScrollBar is not working If I am not displaying Images also.
|
|
|
|
|
Can you send me your project?
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 )
|
|
|
|
|
Hi,
I am learning C++ and came around a few code expressions I cannot understand.
What do the fallowing codes mean or do:
1) expression:expression
2) expression::expression
3) expression->expression
Thanks for help
Rainer
|
|
|
|
|
expression is used like a alias to explain certain things.
For eg
1) expression:expression resembles class A:public B
2) expression::expression resembles class A::FunctionOfClassA()
3) expression->expression resembles
Node *n; // Node is a structure with a variable named as data, so n is a pointer of type Node
n->data //data is a member of node;
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
TheRainer wrote: 1) expression:expression
If it's in this context
class A : public B
it indicates class inheritance (A inherits from B in htis example).
If it's in this context
cond?something:something_else
it's a conditional expression that returns something if cond is true and something_else is cond is false.
TheRainer wrote: 2) expression::expression
This can indicate either class or namespace membership.
some_class::some_item explicitly references the some_item thing that is a member (inherited or otherwise) of some_class
some_namespace::some_item explicitly references the some_item thing that is defined in the namespace some_namespace
TheRainer wrote: 3) expression->expression
This is the simplest one. This is for accessing a structure or class member using a pointer to the structure or class instance. So:
struct A { int B };
int X(A* a_pointer)
{
return a_pointer->B;
}
It's equivalent to (*expression).expression
HTH!!!
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hello,
i am totally new to OpenGL or windows programming in general.
can someone please provide me with some code or tell me how to draw a rectangular clipping window on mouse move with only 2 vertices. So if i click somewehre in upper part of the window and then lower i should get a rectangle which is NOT filled and has dashed lines.
i am going to use this rectangle for clipping.
thanks
modified on Friday, February 27, 2009 12:23 AM
|
|
|
|
|
Googling can help you to get many OpenGL samples. There are many sites contains OpenGL tutorials.
BTW, this is not the forum for OpenGL. You can post it in Graphics Forum.
- ns ami -
|
|
|
|
|
See OpenGL[^].
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 )
|
|
|
|
|
There's a way described here: http://support.microsoft.com/kb/131368/en-us/
Question 1: Is it different when I add "SetMenu(NULL);" in the CFrameWnd::OnCreate() function?
Question 2: Why I got an error when I added "SetMenu(NULL);" in the CFrameWnd::PreCreateWindow() function?
|
|
|
|
|
please help thanks in advance
|
|
|
|
|
Not clear.
You mean to post the message to some window using PostMessage()?
This message is send with WM_NOTIFY message. See MSDN for more details about other message parameters.
- ns ami -
|
|
|
|
|
If you want to select a node by code use CTreeCtrl::SetItemState(hItem, TVIS_SELECTED, TVIS_SELECTED);
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
your reply did help me.it works. but how to do the same thing by sending messages? in MSDN,i found that wm_notify message should be send ,but how to set the other parameters? i can't found something related in msdn.could you pls give some sample of using wm_notify? i am lack of these knowledge.
|
|
|
|
|
Do try this out.
Some other members of the structure may need to be initialized.
NMTREEVIEW nmtree;
nmtree.hdr.code = TVN_SELCHANGED;
nmtree.action = TVC_UNKNOWN;
nmtree.itemOld = oldItem;
nmtree.itemNew = newItem;
SendMessage(hTreeCtrl, WM_NOTIFY, IDC_TREECTRL, &nmtree);
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
thank you very much.you are always so warm hearted.
|
|
|
|
|
I defined two variables like:
CStringW str1(L"Hello");
wchar_t* str2={L"Hello"};
Why str1.GetLength() is 6 while sizeof(str2)/sizeof(wchar_t) is 12?
|
|
|
|
|
There is no way that sizeof(str2)/sizeof(wchar_t) can be 12. str2 is of type wchar_t*, which is a pointer, which will be of size 4 or 8 bytes. wchar_t is of size 2 or 4 bytes, depending on what system you're using. Thus, sizeof(str2)/sizeof(wchar_t) will range between 1 and 4. I've seen values of 1 (gcc 4.0.1 on OS X leopard) and 2 (VC++2008 on Windows 7 32-bit).
Also, the length of str1 is 5 (yes, I've built and run that code fragment), not 6.
So...where did you get your numbers from?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Member 4756574 wrote: Why str1.GetLength() is 6 while sizeof(str2)/sizeof(wchar_t) is 12?
And why rand() is giving me 41 ?
There must be a conspiracy, somewhere...
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]
|
|
|
|
|
CPallini wrote: And why rand() is giving me 41?
Because its not orginal you use of a copy of rand.
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 )
|
|
|
|
|
Wait, pal, now is giving me another number!
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]
|
|
|
|