|
When executing my program, I receive an Assertion Failure Dialog Box and if I press Retry button, program control goes to the following line,
VERIFY(::SendMessage(m_hWnd, TVM_GETITEM, 0, (LPARAM)&item));
in the winctrl2.cpp.
What to do?
|
|
|
|
|
T.RATHA KRISHNAN wrote: VERIFY(::SendMessage(m_hWnd, TVM_GETITEM, 0, (LPARAM)&item));
This means that, TVM_GETITEM sending message is failed, check item parameter.
m_hWnd is handle to tree view control, isn't it ?
|
|
|
|
|
T.RATHA KRISHNAN wrote: When executing my program, I receive an Assertion Failure Dialog Box...
What line of what file is asserting?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
How can I load bitmap image?
From open dialog i have to load bitmap image. then display it. then use pattern. they spay colors int the image.
How can i do this??
Help me
|
|
|
|
|
mazhar_cse wrote: How can I load bitmap image?
You can use of LoadImage or CImage class for load image and for show it use of WM_ERASEBKGND
|
|
|
|
|
I am working with a CListCtrl. Is it possible to set different text color of different back ground color for different index? Suppose index 1 would have red colored text while index 2 would have green. Is it possibl?
|
|
|
|
|
refer this[^] article by Michael Dunn.
|
|
|
|
|
|
Can any one give me brief idea how to use the PX_BLOB in the acticex control?
Tell me how to give the argument in this function.
Thanks in Advance
Mallikarjun
|
|
|
|
|
Isn't that provided in documentation ?
|
|
|
|
|
it is not given in document.so i kindly request u to tell me how can we use PX_BLOB in activex control?
|
|
|
|
|
|
Hi.
In my application I am trying to read all the fonts from system’s font folder and loading them in a drop down box so that user can pick any of the available fonts.
I am using EnumFontFamProc() for reading all the fonts from Fonts folder and here is the code snippet for that….
int CALLBACK CFontCombo::EnumFontFamProc(ENUMLOGFONT FAR *lpelf,
NEWTEXTMETRIC FAR *lpntm, int FontType, LPARAM lParam)
{
if(FontType & TRUETYPE_FONTTYPE)
{
CFontCombo *pxFC = (CFontCombo *) lParam;
pxFC->AddString(lpelf->elfLogFont.lfFaceName);
}
return 1;
}
Application successfully reads all TTF (Tru Type Fonts) but fails to read OTF (Open Type Font) that are present in Fonts folder.
What’s the solution for this problem?
Thanks
Sameer Thakur
|
|
|
|
|
int CALLBACK CFontCombo::EnumFontFamProc(ENUMLOGFONT FAR *lpelf,
NEWTEXTMETRIC FAR *lpntm, int FontType, LPARAM lParam)
{
<font color=red>if(FontType & TRUETYPE_FONTTYPE)</font> <-- What is this doing here??
{
CFontCombo *pxFC = (CFontCombo *) lParam;
pxFC->AddString(lpelf->elfLogFont.lfFaceName);
}
return 1;
}</blockquote>
|
|
|
|
|
Hi,
once I wrote a similar thing, but I used EnumFontFamiliesEx because it uses another callback proc which uses EnumFontFamExProc. There you get an NEWTEXTMETRICEX pointer and there you can test the
ntmFlags member of the ntmTm member:
if ( ( ( lpntme -> ntmTm.ntmFlags & NTM_PS_OPENTYPE ) == NTM_PS_OPENTYPE ) ||
( ( lpntme -> ntmTm.ntmFlags & NTM_TT_OPENTYPE ) == NTM_TT_OPENTYPE ) )
{
// this is an open type font
...
}
Cheers
Stefan
|
|
|
|
|
Hi, I need to change menu caption while the app is running.
Please help me.
Thanks
Papais
|
|
|
|
|
Use ModifyMenu, refer this thread[^].
|
|
|
|
|
if your application is a simple SDI or MDI,
Add this statement,where ever you want to change the menu title.
::SetWindowText(this->m_pMainWnd->m_hWnd,"TestCaption");
Appu..
"My blood group is not B+.But I have it my blood"
|
|
|
|
|
Of course not prasad_som he doesnt need
|
|
|
|
|
Hi,
does anyone know a way to find out if a certain menu handle denotes a popup menu or a menu bar? The GetMenuInfo() API function does not seem to provide this information. If someone knows for sure that it is really not possible to obtain the information about the menu type from the menu handle - this could also help ...
Best regards,
Daniel
|
|
|
|
|
Did you check GetMenuBarInfo ??
Appu..
"My blood group is not B+.But I have it my blood"
|
|
|
|
|
GetMenuBarInfo() takes the handle of the owning window, not a menu handle.
|
|
|
|
|
schwadan wrote: If someone knows for sure that it is really not possible to obtain the information about the menu type
It is possible,
Use GetMenuState .
UINT nState = GetMenuState(m_hMenu,0,MF_BYPOSITION);
if (LOBYTE(nState) & MF_POPUP)
{
}
|
|
|
|
|
I just tried it out: The example works if a pass the handle to the parent menu bar for m_hMenu. If I pass the handle of the popup menu itself, the MF_POPUP flag is not set in the result. This is also what one would expect according to the API doc.
It seems it is really not possible to retrieve the menu type from the menu handle itself. It seems I've found a hole in the Win32 API ...
Daniel
|
|
|
|
|
schwadan wrote: The example works if a pass the handle to the parent menu bar for m_hMenu.
It meant to used that way only, watch second paramter, where you can give menu items ID.
You may like to explore GetMenuItemInfo ,too.
|
|
|
|