|
Thanks
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
There is CDHTMLDialog class in VC7,and by default class wizard choose it for base class of dialogs.Can anybody tell me whats that?
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
|
Thank you Matt.
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
Thank you Matt.
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
No problem!
- Matt Newman / Anti-Linux Activist
-Sonork ID: 100.11179:BestSnowman
†
|
|
|
|
|
Hello programmers
i'm using a CEditView, and i want to make a ListBox appear on it when i press the F4 key and disappear when i press the ESc key. I can use accelerator keys to do this but the code and knowledge to make a listbox appear at runtime, i don't have. Can someone help me?
i tried to use accelerator key for F4 with a function of mine OnAccKey() with CEditView to create the listbox but gets a ASSERT error.
Function used
CListBox list;list.AddString("Bernard");list.SetWindowPos(&wndTopMost,10,10,20,20,SWP_SHOWWINDOW);
From Bernard Racoute
Bracoute
|
|
|
|
|
BOOL CMyEditView::PreTranslateMessage(MSG* pMsg)
{
// TODO: Add your specialized code here and/or call the base class
if( pMsg->message == WM_KEYDOWN && pMsg->wParam == VK_F4 )
{
TRACE0("f4\n");
// add your codes
}
return CEditView::PreTranslateMessage(pMsg);
}
|
|
|
|
|
Hi,
I have buffer,i would like to store it to another buffer in a reverse order.I mean last byte of source buffer should be the first byte of destination buffer.
can any one help me for this?
Neha
|
|
|
|
|
BYTE buf1[100];
BYTE buf2[100];
for (int x = 0; x < 100; x++)
{
buf2[x] = buf1[99 - x];
}
HTH
---
CPUA 0x5041
Sonork 100.11743 Chicken Little
It may be that your sole purpose in life is simply to serve as a warning to others.
|
|
|
|
|
But in my case buffer is a memory pointer.
Is there any api which copies the memory buffer is reverse order?
|
|
|
|
|
hi,
I am not sure of any api that copies Mem Buffer in reverse order but may be u can use "memcpy" , " memccpy" or "memmove" which copy in the orginal order. May be U can reverse them from local buff...
Hope this Helps...
hkprs
|
|
|
|
|
_strrev(),
or in STL
template<class BidirectionalIterator> inline
void reverse(BidirectionalIterator first, BidirectionalIterator last)
or
void reverse (BYTE *src, BYTE *dest, size_t size)
{
for (int x = 0; x < size; x++)
{
dest[x] = src[size - 1 - x];
}
}
---
CPUA 0x5041
Sonork 100.11743 Chicken Little
It may be that your sole purpose in life is simply to serve as a warning to others.
|
|
|
|
|
I created a dialog with a popup style (no title bar) and used SetIcon in the dialog init function. I do not see an icon in the taskbar though. I do see one in ALT-TAB. Am I missing something?
<pre>
LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
HICON hIcon = LoadIcon(_Module.GetResourceInstance(), MAKEINTRESOURCE(IDC_ICON1));
SetIcon(hIcon);
SetIcon(hIcon, FALSE);
// etc...
return 0;
}
</pre>
<b>Todd Smith
CPUA 0x007 ... shaken not stirred</b>
|
|
|
|
|
You might want to try using LoadImage() instead of LoadIcon() . LoadIcon() will always load the large image, which is not what is shown on the taskbar. That said, i've never tried setting an icon for a window without a titlebar, so i don't know if this will work.
Sometimes I only remember, The days when i was young Nowadays no one remembers when they were young and stupid... ADEMA, The Way You Like It
|
|
|
|
|
Dialog windows with the popup style set never have an icon. I've never seen a popup style window with icon.
|
|
|
|
|
Hi All,I have some trouble:
The symptom is I have a child window(CStatic)to display
status information,it must be updated every
second,after a longtime running(maybe 20 minute),then
i only got a NULL DC pointer,and then system give me a
notification that the resource requred can't acquire.at
the same time get into mass.
Any help will be appreciated.
some representive code(in a method of a CStatic derived class):
CDC* pDC=NULL;
pDC=GetDC();
if(pDC==NULL)
{
TRACE("Draw Label Failed!\n");
return FALSE;
}
CRect rc;
if(::GetClientRect(m_hWnd,&rc))
{
PaintBk(pDC,rc);
int iDC=pDC->SaveDC();
pDC->SetBkColor(0);
pDC->SetTextColor(m_FontColor);
pDC->SelectObject(&m_Font);
pDC->DrawText(m_szLabel,&rc,DT_VCENTER|DT_SINGLELINE);
pDC->RestoreDC(iDC);
return TRUE;
}
Scratch
|
|
|
|
|
Since your CDC class is a pointer, you need to delete it to free the resources that it contains.
...
if(::GetClientRect(m_hWnd,&rc))
{
PaintBk(pDC,rc);
int iDC=pDC->SaveDC();
pDC->SetBkColor(0);
pDC->SetTextColor(m_FontColor);
pDC->SelectObject(&m_Font);
pDC->DrawText(m_szLabel,&rc,DT_VCENTER|DT_SINGLELINE);
pDC->RestoreDC(iDC);
delete pDC
return TRUE;
}
|
|
|
|
|
Thank you,I will try it.
Scratch
|
|
|
|
|
It's get work, thank you !
Scratch
|
|
|
|
|
I think you simply need to do ReleaseDC( pDC );
"There's a slew of slip 'twixt cup and lip"
|
|
|
|
|
I use msflexgrid in a excel like program to display the app data, but when the data is huge, i mean about 400 items. the additem method will take about 30s to complete. what's wrong? I use vc60 and there is no other way then add each item a time. what can i do? thanks for help
|
|
|
|
|
How do i update the filename with extension whenever the user selects from the file types in the combo box, just like in MS Word.
Thanks
|
|
|
|
|
Use the default extention of CFileDialog :
CFileDialog fdlg(FALSE, _T(".txt"), ....)
Philip Patrick
Web-site: www.saintopatrick.com
"Two beer or not two beer?" Shakesbeer
Need ASP hosting? Check out 123HostNow.com
|
|
|
|
|
why doesnt ClassWizard allow u to override non client area messages?
|
|
|
|