|
Hi all,
anyone know how copy and paste a .bmp image?
Thanx.
|
|
|
|
|
refer to Clipborad in MS Platform SDK or MSDN
Ganesh Ramaswamy
|
|
|
|
|
How can I get rid of "Extended" tab
when I'm writing ActiveX with ATL or MFC???
thanks
|
|
|
|
|
I have a dialog based app and want my app away from task bar. I have used Chris Maunders CSystemTray class to put a tray icon and a class for putting a picture as background in the app that will be hided in task bar. But when I use the code that you can see here, the menu items in the tray menu is disabled and the app wont be hided directly when I start my app, I need to minimize and then maximize it to see it hided in task bar.
I "stealed" the code to do this from the MSDN magazine. I downloaded it and did a class as they've done:
The subclassed CFrameWnd:
CHideInTaskBar public: CFrameWnd
{
...
}
I I override the PreCreatWindow(..) in the CHideInTaskBar class and it looked like this:
BOOL CHideInTaskBar::PreCreateWindow(CREATESTRUCT& cs)
{
if (CFrameWnd::PreCreateWindow(cs)) {
cs.dwExStyle |= WS_EX_TOOLWINDOW;
return TRUE;
}
return FALSE;
}
and in my app dialog (the main dialog that will be hided in task bar) Initinstance:
// The IDR_POPUP is the tray menu that all items becomes disabled!
...
CHideInTaskBar *pFrame = new CHideInTaskBar;
m_pMainWnd = pFrame;
pFrame->LoadFrame(IDR_POPUP, WS_OVERLAPPED, NULL, NULL);
// CReminderSEDlg is the dialog that is the main dialo and the dialog that will be hided in task bar
CReminderSEDlg dlg(pFrame);
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{}
else if (nResponse == IDCANCEL)
{}
...
Now I think you know everything that you should know... hm...
ASK FOR MORE!! I NEED THIS TO F***ING WORK!! YOU ARE WORTH A MILION OF DOLLARS IF YOU CAN HELP ME!!!!!!
------------------------------
©0d3 ©®4©k3® - That's me!
------------------------------
|
|
|
|
|
i dont have VC++ now to chk this. But i think u have to set the EX_TOOLWINDOW property in for the dialog box also so the it refrains from appearing in the task bar. Try this. I am not responsible if it doesnt work
Ganesh Ramaswamy
|
|
|
|
|
1. Using a pointer to the CDialog
CMyDialog *p_lpMyDialog = new CMyDialog();
p_lpMyDialog->m_csMyCString = _T("Crash");
2. Not using a pointer
CMyDialog p_MyDialog;
p_MyDialog.m_csMyCString = _T("Crash");
Why does 1. cause a crash and 2. work without problem, anyone ?
I am developing with MS Visual C++/MFC 6.0 on Win98 SE.
Regards
Ray
"Je Suis Mort De Rire"
|
|
|
|
|
The only thing I can think of is that maybe the 2. is also causing an out of bounds indirection but the crash does not show as p_MyDialog is being created in the stack.
It's hard to say what the cause of the problem could be with that little information. Try with "Rebuild all", sometimes precompiled headers do funny things like this.
Better yet, post the code of CMyDialog and we'll have a better chance to spot some bug.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Joaquín M López Muñoz wrote:
Try with "Rebuild all", sometimes precompiled headers do funny things like this.
Damn precompiled headers, a clean rebuild sorted it out, I should have guessed. Thanks for the help.
Regards
Ray
"Je Suis Mort De Rire"
|
|
|
|
|
Hi all,
Given a string containing the shortcut name, how do I get the shortcut target path?
I tried to use BOOL SHGetShortcutTarget(...) but to no avail... My MSC++ couldn't find it, even after including Shellapi.h and linking to Shortcut.lib.
Any one has a clue on how to do this?
Thx!
/T
|
|
|
|
|
AFAIK SHGetShortcutTarget is for WinCE only. I assume you're not using WinCE cos you'd probably have said so...
Frankly, i'd use the CShellLink class available on this site.
You'll also note that links like those which link to microsoft office are in fact special kinds of links which the API can't decode. and they're not documented. It's annoying.
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
Hi, all.
=======
I need to:
void DoIt()
{
1) Grayscale_All ( desktop, windows, ...);
2) Open_My_New_Colored_Window_And_Dont_Ever_Lose_Focus();
}
OS: Win2000.
My problem is... number 1 .
Where should I start? What should I do ?
10x.
BTW: come to #CodeProject on DalNet (mIRC)
|
|
|
|
|
Yes , It is again I ,
The nagger with the DLLs in VC++ for Delphi .
I at last succesed to find out what was the problem with my DLL by the generous help of Tom Nuydens,
Well,
When the VC++ linker generates its output it changes the names of the export functions If you gave to a function the name "foo" it will look something like "_foo@4" and This is the name you haveto import in your Delphi app client program. To see the export table, you have run :
"dumpbin.exe /exports mydll.dll" from the command line.
_________________________________________________________________-
Simple ?
Not exactly !
I , for example , dont success to run "dumpbin.exe" im order to find out the export table of my DLL to see the names of the functions.
Is Someone know how to do it exactly ?
|
|
|
|
|
You can force your DLL to export the function names without any decoration just by declaring it to be extern "C" like this:
extern "C" {
}
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Thank you ,
I would try it,
But nevertheless I'm want to know how can to know the names of the export functions whith the addition of VC++.
|
|
|
|
|
|
The name is the result of the _stdcall calling sequence. The @4 means that four bytes must be subtracted from the stack pointer by the calling code when the function returns.
Make sure that your functions look something like this :
__declspec(dllexport)
int __stdcall foo( int argument )
{
return 0;
}
This will insure that they are exported.
What problem are you having with dumpbin ? If it is not showing any exports then the problem is most likely with the dllexport statement.
|
|
|
|
|
Hi:
I use InternetOpenUrl to get a HTTP file.
But in Windows 98 if InternetOpenUrl fail, I call ShellExecute will hang.Some one know the problem?
Give me some hints.Thanks
|
|
|
|
|
Hello Everybody,
I'm trying to insert a CView object
inside a TabControl.
I follow the following step:
a) Create a Dialog;
b) Inserted a TabCtrl
c) Created a CMyTabCtrl derived from CTabCtrl
d) Inserted a CView Object in CMytabCtrl.
e) Used CView->Create(...) to create a Child window inside the tab control
Is this the only way to create a view in the tabControl? Why the View position
is not perfectly inside the Tab Control Client Area?
BYE.
Have a good day
|
|
|
|
|
Please advise me how am I convert the modeless dialogs to modal dialogs.
1. i hid the modeless dialogs by using the ShowWindows(FALSE)
2. How ever the program icon disappear in the task bar.
3. I thinking of making the modeless dialogs so that it appear in the task bar.
thank you.
please advise
|
|
|
|
|
Are you using MFC? Is this the main app's dialog box? Have you tried just changing the code to use DoModal instead of Create? If you show some code, I may help you better.
Regards,
Alvaro
|
|
|
|
|
Hi.
Let say there is a standard STL vector contain with data in it. How do you assign a character arrays the data inside the vector contain either through value or pointer?
I need to do that so I could write the data to a file in binary mode.
Thanks,
Kuphryn
|
|
|
|
|
I'm not sure I've understood your request, but if what you're after is getting a char * to the contents of a vector , then the expression &v[0] does the trick (v being the vector ), as in
std::vector<char> v;
...
fwrite(&v[0],1,v.size(),fp); Hope this helps.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hi,
I have an SDI 'windows explorer'-like application (generated by the AppWizard), with a left pane (CLeftView) and a right pane (CRightView).
Here are my questions :
- When the user opens a new file, a file selector is automatically openned. How can I choose the file type (*.xxx instead of *.*) ?
- I would like that when the user chooses to save the file, no matter which view is active, the same method is called. But, with the ClassWizard, the function to react to the 'OnCommand' for a menu is different for each view. How can I have a unique method for the 'File save', no matter which view is active ?
Thank you in advance for your help !
Jerome
|
|
|
|
|
- When the user opens a new file, a file selector is automatically openned. How can I choose the file type (*.xxx instead of *.*) ?
I assume you are using CFileDialog, look at its m_ofn member, this is of type 'OPENFILENAME' structure. The 'OPENFILENAME' has two members you need to modify lpstrFilter and lpstrCustomFilter.
How can I have a unique method for the 'File save', no matter which view is active ?
Create a static function somewhere to do the work, and then call it from everywhere else.
Regards
Ray
"Je Suis Mort De Rire"
|
|
|
|
|
Hello,
Is the clipboard in WinNT unicode? ie. can I copy - paste Japanese characters from one editor to another (both editors support unicode) without loss of data or junk characters filling the data?
Regards,
~A.
|
|
|
|