|
_Andrew wrote: Please help me with this problem,
I need to release the project tomorrow morning!
To borrow a quote, lack of planning on your part does not constitute an emergency on ours.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hi
I want to make a loading message box which disappears once the loading was finished.
In order to do that I decided to use the function DialogBox in order to create a modal dialog, however, I couldn't find a message that indicates that dialog has finished drawing itself.
I want to start the loading sequence right after the dialog and the message of "loading" appears on the dialog.
Any suggestions ?
I would like to use a dialog in order to easily make a nice loading message.
Thanks a lot,
Clint
|
|
|
|
|
In wich ambient you are doing this? MFC?
In that case you can take OnInitDialog event or.. WM_INITDIALOG
|
|
|
|
|
I tried WM_INITDIALOG, but it happens before the dialog has finished drawing itself, so the message doesn't appear.
|
|
|
|
|
|
Also WM_PAINT is not good, it happens during the drawing of every control.
|
|
|
|
|
Hi all... how i can convert a Property name to a PROPERTYKEY structure (FMTID/PID) by the name?
Example:
From Registry i take: HKEY_CLASSES_ROOT\*\InfoTip
than in my case, the result is: "prop:DocTitle;Type;Size;FileVersion;FileTitle;ProgramDescription"
I have written a function to get sequentially property by property... so i have:
DocTitle
Type
Size
FileVersion
FileTitle
ProgramDescription
I want to translate the correspondent PROPERTYKEY structure (FMTID/PID) or otherwise translate this string to the correspondent replacement as Windows Explorer do.
Any suggestion is appreciated. Thanks in advance!
|
|
|
|
|
Hi,
I need to know (source code will be more helpful) how can i filter a list of files which will be displayed in files explorer (like windows explorer) with its extension.
For example when i click on desktop (in tree control in the left) the list of files (ONLY a specified type of files (extension i.e doc...)will be displayed not all files in this directory).
I use :
- CTreeCtrl
- CListCtrl
My application is a SDI MFC .
I'm waiting for response, please help.
|
|
|
|
|
khaliloenit wrote: For example when i click on desktop (in tree control in the left) the list of files (ONLY a specified type of files (extension i.e doc...)will be displayed not all files in this directory).
See the description of FindFirstFile()[^] for details.
|
|
|
|
|
Hello,
I'm looking for working sample of native C++ without MFC of simple window application with a web browser control embedded in it.
Thanks, A
|
|
|
|
|
Arnon A wrote: I'm looking for working sample
There are thousands of samples here on CP and elsewhere. Try using Google to search for what you are interested in.
|
|
|
|
|
Thanks but I searched before I asked and didn't found something good for my purpose
Most of the samples here and on the web are using MFC that I can't use.
|
|
|
|
|
|
It's really horrible code (!)
You can do it with 7 lines of code in plain C/Win32 api (with undocumented (or not) native controls)
See on Adv. Win32 api group
for C code
|
|
|
|
|
kilt wrote: You can do it with 7 lines of code in plain C/Win32 api (with undocumented (or not) native controls)
See on Adv. Win32 api group
for C code
Could you point to the article that has the answer, as I could not discover which one you were referring to?
|
|
|
|
|
Hi,
With Visual Studio C++ 2008, how can I put a greek letter in a static
control ?
Thanks,
Claude
|
|
|
|
|
Gagnon Claude wrote: With Visual Studio C++ 2008, how can I put a greek letter in a static
control ?
How would you put any letter in a static control?
|
|
|
|
|
You may, for instance, use the the escape sequence \xhhhh in the control definition (inside the rc script), e.g.
LTEXT L"Omega: \x03A9",IDC_STATIC,10,96,300,8
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]
|
|
|
|
|
Hi
I have a COptionsDlg class delivered from CDialog. I open it when user right clicks on the main window:
...
COptionsDlg* dlg=new COptionsDlg();
dlg->Create(COptionsDlg::IDD,this);
dlg->ShowWindow(TRUE);
...
Now once it's shown I want to close it when user clicks anywhere outside of COptionsDlg. I tried overriding OnKillFocus() of COptionsDlg but it didn't work.
And also one more question: How can I exchange data between my main window and COptionsDlg?
Any help would be greatly appreciated
|
|
|
|
|
When you say you override OnKillFocus and it didn;t work, what did you mean?
It didn't get called? Don't forget ON_WM_KILLFOCUS()...
Did it get called, but the window didn't go? Then you need better code!
Look in Generic Picker Dropdown Control[^] for a window that goes *poof* if you click away from it.
Iain.
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need contract work done, give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
Iain, thank you for your reply.
It gets called.
The problem is it crashes when I use DestroyWindow() inside OnKillFocus().
Looks like you had the same problem(quote from your source code):
void CGenericPickerPopup::OnKillFocus(CWnd* pNewWnd)
{
CWnd::OnKillFocus(pNewWnd);
ReleaseCapture();
}
void CGenericPickerPopup::OnActivateApp(BOOL bActive, HTASK hTask)
{
CWnd::OnActivateApp(bActive, hTask);
if (!bActive)
EndSelection(CPN_SELENDCANCEL);
}
Now I tried overriding OnActivateApp():
void COptionsDlg::OnActivateApp(BOOL bActive, HTASK hTask)
{
CDialog::OnActivateApp(bActive, hTask);
if (!bActive)DestroyWindow();
}
But nothing seems to be happening. What I'm doing wrong?
|
|
|
|
|
Try EndDialog() (you should rarely, if ever, call DestroyWindow().)
|
|
|
|
|
Joe Woodbury, thank you for your reply.
EndDialog(IDOK);
That works, but how do I catch the mouseclick outside of the CDialog that I show? I should close it when user clicks outside of the CDialog. Is it possible?
|
|
|
|
|
Only if you capture the mouse.
|
|
|
|
|
You should call DestroyWindow() to destroy a modeless dialog. In the dialog's PostNcDestroy() method, you should delete the this pointer.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|