|
I can not remember exact code, but the fuction call
hr=FindResource(hmod,MAKEINTRESOURCE(504),"GIF");
is not correct.
you can try enumurating resource to find its resource ID.
includeh10
|
|
|
|
|
How can I add a status bar to a dialog.
I can add a toolbar but status bar is not showing up. It is being created successfully.
Happy christmas friends. May the Love of My Lord and Saviour Jesus bring forth Joy and Happiness into your life too.
<marquee direction="up" height="30" scrolldelay="1" step="1" scrollamount="1" hspace="0" vspace="0">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
LOL
I've Done It.
He he.
Happy christmas friends. May the Love of My Lord and Saviour Jesus bring forth Joy and Happiness into your life too.
<marquee direction="up" height="30" scrolldelay="1" step="1" scrollamount="1" hspace="0" vspace="0">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
Try using InitCommonControls or InitCommonControlsEx in the beginning of your program.
INITCOMMONCONTROLSEX InitCtrls;<br />
InitCtrls.dwSize = sizeof(INITCOMMONCONTROLSEX);<br />
InitCtrls.dwICC = ICC_BAR_CLASSES; <br />
InitCommonControlsEx(&InitCtrls);
If it still does not work, you should try to add it through code:
hStatus = CreateWindowEx(0, STATUSCLASSNAME, NULL,<br />
WS_CHILD | WS_VISIBLE | SBARS_SIZEGRIP, 0, 0, 0, 0,<br />
hwnd, (HMENU)IDC_MAIN_STATUS, GetModuleHandle(NULL), NULL);<br />
int statwidths[] = {100, -1};<br />
SendMessage(hStatus, SB_SETPARTS, sizeof(statwidths)/sizeof(int), (LPARAM)statwidths);<br />
SendMessage(hStatus, SB_SETTEXT, 0, (LPARAM)"Some text");
kind regards,
Ward
|
|
|
|
|
Here the well known Nish article :
Link[^]
~RaGE();
|
|
|
|
|
Happy christmas friends. May the Love of My Lord and Saviour Jesus bring forth Joy and Happiness into your life too.
<marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" hspace="2" vspace="2">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
Hi,
(1) I have a CRszListCtrl : public CListCtrl
(2) which has a CustHeaderCtrl m_hdrCustom, where CustHeaderCtrl : public CHeaderCtrl
(3) CRszListCtrl has init() called from CDialog::OnInitDialog.
(4) This init() calls void CustHeaderCtrl::init(CListCtrl * const pList) with Argument this (i.e. self) to init its m_hdrCustom
(5) The code is
void CustHeaderCtrl::init(CListCtrl * const pList)<br />
{<br />
m_pParentList = pList;<br />
CHeaderCtrl * pHeader = m_pParentList->GetHeaderCtrl();<br />
ASSERT( SubclassWindow(pHeader->GetSafeHwnd()) );<br />
}<br />
(6) To catch clicks on the header items I made handlers for WM_NOTIFY messages resent to the header by it's parent list which where routed via WM_NOTIFY_REFLECT macro or alternatively via OnChildNotify.
:(Both work fine but only in debug code!
Who can give a solution? Thank you!
regards Werner
|
|
|
|
|
WernerP wrote: Both work fine but only in debug code!
Check what you have put in ASSERT macros, do not forget these are not compiled in Release mode.
~RaGE();
|
|
|
|
|
Outrageous laughter (Ok, we think we can fix it).+
Thanks.
Bye, Werner
|
|
|
|
|
I have made a regular dll in MFC. Here I have invoked an exported function in which I call a dialog using DoModal method. Now I added a static control on that dialog. Now, whenever I call that exported function in dll using an exe application i'm able to view that dialog, but the problem i'm facing is that i'm not able to get nor set data to the various controls(like static or edit) used in dialog. Like the MFC functions GetDlgItem, SetDlgItemText, SetWindowText, etc doesn't work.
Here is the piece of code
__declspec(dllexport) MyFun()
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
CMyDialog dlg;
dlg.DoModal();
}
//Constructor for CMyDialog
CDlgTest::CDlgTest(CWnd* pParent /*=NULL*/)
: CDialog(CDlgTest::IDD, pParent)
{
this->SetDlgItemText(IDC_STATIC, "Mayank"); //Not working
}
|
|
|
|
|
You can't use SetDlgItemText in the constructor because the window (IDC_STATIC) has not yet been created.
You need to override the OnInitDialog (WM_INITDIALOG) and put your SetDlgItemText in that function, after the call to CDialog::OnInitDialog();
Hope that helps.
Karl - WK5M
PP-ASEL-IA (N43CS)
<kmedcalf@ev1.net>
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
|
|
|
|
|
Is there some way how to reuse explorer's list control used for browsing the disk/local computer ?
I'd like to have this control integrated in my application with all default features (view modes like thumbnails/icons/...., default shell context menu, etc.
Thank you.
rrrado
|
|
|
|
|
I think the WebBrowser should do it too. Insert the WebBrowser control in the project, and there you go. Then you must start with a real local address like "c:\\" etc. to start it with.
this is this.
|
|
|
|
|
thank you for the idea
Is there some way how to control view type (thumbnail/icons) ?
rrrado
|
|
|
|
|
Sorry, I have never tried it, but I hope someone else knows a way.
But the context menu is still there.
this is this.
|
|
|
|
|
Yes but after changing the folder original view mode is restored.
But thank you for help anyway, now I found IShellView for
direct usage of shell folder view, I'll examine it.
rrrado
|
|
|
|
|
I hav written simple vc++ application for winsows service. It can call exe's. I am getting problem when i am calling conf.exe.
when i am calling conf.exe of NetMeeting within service i am unable to receive calls from client. can u tell me what are the dependencies when i am calling conf.exe.
plz help me.
|
|
|
|
|
Hi,
I am writing an application which support English,Chinese and Japanese languages.My viusal studio IDE unbale to open the file in workspace.It unable to support it, what could be the problem.
The text in dialog boxes are not dispalyed properly in chinese and japanese lang , i am manuly chaning the property of text (the height and width)..etc, I am opening the "RC file" in "note pad".For chinese and Japanese lang`s.This there any way ,to solve this problem , rather than trile and error method.
|
|
|
|
|
When i select from the menu the the file -> open
then were is the handle to the file
I want to access the data of the file , say i open
a text file and then want to store the data back
to the file .
IS there any clean article for it
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
You don't need a file handle. use the document class's Serialize method instead
the CArchive parameter points to the file being opened (File -> Open) or saved (File -> Save)
void CTestAppDoc::Serialize(CArchive& ar)
{
if (ar.IsStoring())
{
}
else
{
}
}
look up Serialize[^] and CArchive[^] in MSDN for further details
|
|
|
|
|
Subject : An object(file or folder) which can mask only from copy and Paste..
is it possible to mask the properties "Copy" and "Paste"( both by mouse and key board)for a paticular file or folder.ie while right clicking on the file the "copy" and "paste" in the context menu should be inactive.
If any reply on this plz send it to harias25@sify.com
Hareesh A S
Software Developer,
Singapore.
|
|
|
|
|
I have an OCX Control, created with Visual C++ 6.0
I created another new OCX control, modifying the first one with very little changes. I renamed and registered the new one but it replaced the old one.
My problem is that I want both. Renaming the OCX and registering did not help me. How do i do this? Any help is greatly appreciated.
I am sorry if this is a wrong place to have posted this question.
Regards,
Rajesh R. Subramanian
You have an apple and me too. We exchange those and We have an apple each.
You have an idea and me too. We exchange those and We have two ideas each.
|
|
|
|
|
It's not enough to rename it, you have to change it's CLSID too. Use uuidgen.exe tool to generate a new one and then register it again.
|
|
|
|
|
Heartfelt thanks for your reply.
Regards,
Rajesh R. Subramanian
You have an apple and me too. We exchange those and We have an apple each.
You have an idea and me too. We exchange those and We have two ideas each.
|
|
|
|
|
Hello everone
I have a file in which the data is stored in hex format,
i need to convert some bytes to DWORD ,exactly 4 bytes
to a DWORD .
i created such a complex statement for that
DWORD biWidth=(unsigned char)m_FileData[18] +((unsigned char)m_FileData[19]*256) +((unsignedchar)m_FileData[20]*65536) +((unsignedchar)m_FileData[21]*16777216);
But i think this is not an effecient way because a heavy arithmatic is used.
is there any other method that is fast an effecient .
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|