|
Frank Reich wrote: would like to add a menu to my starting dialog window using WinAPI (I know how to do it with MFC). The code until now looks like I attached it at the end of the message.
But I dont know how to modify the "DialogBox(hInstance,MAKEINTRESOURCE
(IDD_MAIN), NULL, DlgProc);" - command to make it include my menu "IDR_MENU1" from the "resource.h"-file also
Attach the Menu Directly to the Dialog Box.. you will option of that on right clicking on the dialog box resource
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
1. when windows sends WM_QUERYENDSESSION message to the applicaitons at logoff, does it send it to all at once or send it to the applications one by one?
2. does it send it to the apps in any specific order or is it undefined?
3.
thanks!
|
|
|
|
|
|
Sphere ++ wrote: 1. when windows sends WM_QUERYENDSESSION message to the applicaitons at logoff, does it send it to all at once or send it to the applications one by one?
It is send to all the top level window simultaneously
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
How do I get the list of subfolders under the recycle bin directory C:\RECYCLER (which I get querying for CSIDL_BITBUCKET)? And how do I know which drive those subfolders refer to?
thanks!
|
|
|
|
|
|
Is it prossible to create a MemDC without a screen or printer DC to base it on.
I have an MFC program that I want to be executed by a web service. The program writes to a DC and then saves the bitmap.
If I run this program from a web service, presumably there is no window to base the DC for the bitmap to draw on. so I jsut want to create a Mem DC to draw on.
If I want to draw on say a 1024x1024 bitmap with a bit depth of of 32 bits.
How can I do this?
Bbly
|
|
|
|
|
Use the desktop DC. I have a graphing library running as a web service doing exactly what you describe and it works great.
Snippet of code that sets up the DC:
CRect oBmpSize(0,0,lWidth,lHeight);
oMemDC.CreateCompatibleDC(NULL);
int iOldMapMode = oMemDC.SetMapMode(MM_TEXT);
CWindowDC dcScreen(NULL);
oBmp.CreateCompatibleBitmap(&dcScreen,oBmpSize.Width(), oBmpSize.Height());
pOldBmp = oMemDC.SelectObject(&oBmp);
onwards and upwards...
|
|
|
|
|
|
I think you should be able to use SetRedraw() turning it off while sizing, then turning it back on when finished.
My articles
BlackDice
|
|
|
|
|
Hi
Anybody has a VC++ sample code for an ActiveX control to be viewed via IE browser that is capable of downloading a file (say via winsock or http api) from the website where it is hosted?
thanx in advance
|
|
|
|
|
hi
you can build ActiveX control with MFC ActiveX control wizard.so it is not a big deal.
main thing is to show it in browser.
for that you have to sign your activeX control.other wise it wont be shown due to default security settings of the browser wont let it(unsigned ActiveX control) execute.
to sign your control for testing purpose you can use codesigning SDK.
sanket patel
|
|
|
|
|
I am getting this error by compiler when I compile my code in VC.NET. Note it was previously compiled correctly in VC 6.0 .
e:\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\afxdlgs.h(430): error C2146: syntax error : missing ';' before identifier 'm_pdex'
Any reason. I shall be very grateful.
Best Regards,
|
|
|
|
|
Hi,
In stdafx.h
Try changing WIN_VER to 0x0501, which is Windows XP and 2003 specific.
Bye,
Cool Ju
Dream Ur Destiny
|
|
|
|
|
Hi everyone,
I am trying to create an array dynamically with CString, here is an example:
<br />
CString *a = new CString [nSize];
<br />
<br />
delete a;<br />
<br />
but I catch an exception ....
Would you mind suggest the problem here?
Thanks a lot~
|
|
|
|
|
oops ... I am foolish
I should use CStringArray with SetSize()
|
|
|
|
|
Did you try this?
delete[] a;
|
|
|
|
|
Hi,
Always follow the rule
a = new => delete a
a = new [] => delete a[]
Bye,
Cool Ju
Dream Ur Destiny
|
|
|
|
|
delete a[]; is the clue
... she said you are the perfect stranger she said baby let's keep it like this... Dire Straits
|
|
|
|
|
Really suddenly forget delete array should use delete [] =.=
foolish me
thanks everyone~
|
|
|
|
|
Hi
i have a shell extension dll which i am using as a Drag drop handler . i have built the DLL using the x64 settings . Although the DLL is getting registered the shell extension doesnt perform any function when drag drop is performed . Any idea on how to overcome this
Thanks in advance
|
|
|
|
|
Hi,
I have a question.When I run my program ,it has no problem. After I send it to surcesafe, it can not run rightly.In my program ,there are three button in my dialog, and each button will active another dialog. And the program is " m_ToolDialog.DoModal()". After sending it to sourcesafe, when pressing the button in the dialog, the dialog will not show. And the error is :"Debug Assertion Failed! File: dlgdata.cpp line:43 Stop, Retry, Ignore ", what is the problem? why in my compute my program can run rightly, when sending it to souresafe ,it will show error?
thanks
xiaoyan liu
|
|
|
|
|
liuxiaoyan0603 wrote: After sending it to sourcesafe, when pressing the button in the dialog, the dialog will not show. And the error is :"Debug Assertion Failed! File: dlgdata.cpp line:43 Stop, Retry, Ignore", what is the problem?
Please check it there is any rc file or not
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Hi,
i open a excel file through code ,but it shows up a dialog box and says it contains a link to other data source do we need to update ,but this is odd since if the user selects 50 files the dialog comes 50 times is there any Method of application by which i can supress these messages.
Thanx in advance
Farpointer
|
|
|
|
|
We have an EditBox control. We have the following questions:
1. Is it possible to paste different characters (say, 1 japanese, 1 chinese, 1 spanish, 1 hindi and 1 arabic) in the control without changing the characterset or the locale? MS Word does the same. Any idea how it can be done?
2. Is there any generic/universal characterset that supports most of the fonts and the unicode standard?
3. What does UCS do and how it is used?
Sanghamitra
|
|
|
|