|
Look at Q165076 in the knowledge base. You may need to remove the _ATL_MIN_CRT preprocessor define if it is present in you release configuration. This is often the cause of unresolved external errors in ATL .dll's. You will find this in the Project Settings dialog, C/C++ tab, the preprocessor selection in the dropdown.
Hope that helps,
Aaron
|
|
|
|
|
When I add a menu on a Dialog Box....the hot keys of menu did not work although i set the caption of menu item right such as "&Edit...\tCtrl+E". When I do the same work in SDI Appliaction...In single document Application it works fine....but when i made Dialog based application and design menu manually...here it not works.....
I have checked the .rc file in SDI and here class wizard
added more lines for Hot Keys like
IDR_MAINFRAME ACCELERATORS PRELOAD MOVEABLE PURE
BEGIN
"N", ID_FILE_NEW, VIRTKEY, CONTROL
END
I added these lines in .rc of Dialog application but all in vain....any help
Have a nice wishes for Helper
|
|
|
|
|
You'll have to override PreTranslateMessage in CYourDlg. Inside the function, call ::TranslateAccelerator.
BOOL CYourDlg::PreTranslateMessage(MSG* pMsg)
{
if (::TranslateAccelerator(m_hWnd, m_hAccelTable, pMsg))
{
return TRUE;
}
return CDialog::PreTranslateMessage(pMsg);
}
Init m_hAccelTable in OnInitDialog - call LoadAccelerators.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
HACCEL LoadAccelerators(
HINSTANCE hInstance, // handle to module
LPCTSTR lpTableName // accelerator table name
);
the prototype of LoadAccelerators is like
how i can get lpTableName value....I dont know what to pass in 2nd parametre of function...Thanks foe early help.
|
|
|
|
|
HACCEL LoadAccelerators(
HINSTANCE hInstance, // handle to module
LPCTSTR lpTableName // accelerator table name
);
the prototype of LoadAccelerators is like
how i can get lpTableName value....I dont know what to pass in 2nd parametre of function...Thanks foe early help. if u have any chat contact...i want to chat with u ...thanks.
|
|
|
|
|
Chief ....the problem has been solved.....thanks for your
help.
"VC is an incubus and to tame this monster experience is a mandatory Field."
|
|
|
|
|
Hi,
i just want to know.
Whats your way to look into stl-container.
For example a stl::list that contains structs.
Thanx
Olivier
|
|
|
|
|
I am interested in understanding how to change the capture resolution of a webcam without using the property pages (i.e., dialog boxes). I want to be able to set this in my program independently of the dialog boxes. Does anyone know how to do this? I am using the DirectShow interface for capturing. Any help would be appreciated.
Thanks,
John
|
|
|
|
|
hello all,
could anyone tell me of a possible way to get a CBitmap/HBITMAP from imagelist (CImageList/HIMAGELIST)
best regards,
|
|
|
|
|
|
hi
what can be wrong in my project when i can't start class wizard?
menu item is disabled, ctrl-w beeps only, there is no .clw file
deleting all except .dsp,.cpp and .h and rebuild not helped
it is dll project without resources (.rc)
it contains general cresizabledialog and similar classes only
thanks
t!
|
|
|
|
|
solution at
http://www.codeguru.com/cgi-bin/bbs/wt/showpost.pl?Board=vc&Number=297562&page=0&view=collapsed&sb=5
t!
|
|
|
|
|
Hi,
I am developing activeX control in VC++.
My control is built with usage of two other OCX files so I pack three OCX files and INF file in one single CAB file.
It is being placed on the web page with CODEBASE tag and class id of my control.
It works fine but I need to get USER_LOGON to verify user's permissions to access database (this is INTRANET application)
to get user login I am using VBScript:
<%
full_user_id = Request.ServerVariables ("LOGON_USER")
Response.Write full_user_id
i=InStrRev(full_user_id,"\",-1,vbTextCompare)
if i>0 then
user_login = Right(full_user_id,len(full_user_id)-i)
else
user_login = full_user_id
end if
%>
and i get the proper string in 'user_login'
the question is - how can I pass this user_login variable to my C++ code ?
i would guess by setting :
<param name="web_user_name" value="<%" response.write="" user_login="" %="" />>
Am I on the right track ? Does anyone know how to pass USER_LOGON variable from the html page to activex control's code (VC++) ?
thank you
|
|
|
|
|
You could set a property in your ActiveX and use JavaScript or VBScript code to assign it at the HTML side, but it isn't a good way to do that.
This is my advice!...
In the HTML page you could use the PARAM tag of your ActiveX like this.
<object id="YourActiveX" classid="CLSID:11111111-2222-3333-4444-555555555555" viewastext="">
<param name="USER_LOGON" value="user_login" />
...
At your VC++ ActiveX code, all you have to do is to create an internal member variable, for example "CString m_sUserLogin"
In the method,
void DoPropExchange(CPropExchange* pPX) {
// ...
// all you have to do is to append the next line
PX_String(pPX, _T("USER_LOGON"),m_sUserLogin, _T(""));
}
Ok, that's it!
I hope it solves your problem.
Ricardo Beja
|
|
|
|
|
I want to create an Add-In for the Visual C++ IDE.
My Add-In needs to create and open a window, a window like like that which displays the code of a file. I need this window to display a graph.
Anybody got any ideas?
Take no prisoners
|
|
|
|
|
I have a CTreeView and a member m_TreeCtrl which is of CTreeCtrl type.
Everytime I use m_TreeCtrl.DeleteItem() to remove an item from the tree, all of the items will be collapsed automatically!!!
Have any of you met this problem? How could I solve this problem?
Thanx in advance.
Alex Dong
|
|
|
|
|
i sent you this mail:
just idea:
haven't you TVS_SINGLEEXPAND?
t!
and now it returned me:
This is the Postfix program at host mta1.etang.com.
I'm sorry to have to inform you that the message returned
below could not be delivered to one or more destinations.
For further assistance, please contact <postmaster@etang.com>
If you do so, please include this problem report. You can
delete your own text from the message returned below.
The Postfix program
ÄúşĂŁş
±§Ç¸µÄ֪ͨÄúŁ¬ÄúµÄÓĘĽţÎŢ·¨Í¶µÝµ˝ÄżµÄµŘÖ·Ł¬
ÇëĽě˛éÄúµÄÓĘĽţµŘÖ·ĘÇ·ńŐýČ·Ł¬»ňÓëÎŇĂǵĹÜŔíÔ±ÁŞĎµŁşpostmaster@etang.com
ллŁˇ
<ltmail@bpme.com>: Name service error for domain bpme.com: Host found but no
data record of requested type
|
|
|
|
|
No, I haven't set the TVS_SINGLEEXPAND. Here is the code:
if (!m_TreeCtrl.Create( WS_VISIBLE | WS_CHILD |
TVS_HASBUTTONS | // Adds a button to the left of each parent item.
TVS_HASLINES | // Has lines linking child items
// to their corresponding parent items.
TVS_LINESATROOT | // Has lines linking child items to
// the root of the hierarchy.
TVS_EDITLABELS | // Allows users to edit the labels of tree view items.
TVS_SHOWSELALWAYS,// Causes a selected item to remain selected when
// the tree-view control loses focus.
rc,
this,
0x1005 ) )
Thank you!
|
|
|
|
|
Hi,
I am new to MFC and work on a physical simulation application. I am a bit insecure on how to build up the program and would be thankful for any advise.
The simulation shall be updated as often as possible. The update of the simulation then affects the viewing data (vertices and polygons etc) displayed using OpenGL. The framerate of the viewupdate shall be fixed to around 12/sek.
1.Where is best, most natural, to put the simulationupdate-call? Is it in a CWinApp derived class´s Idle-Event-handler? In that case, how do I get a pointer to the CDocument-derived class that holds the simulation-data?
2.Where is best to put the view-update-call, i.e the call that updates the viewing data and then redraws the display-window? Is it in a timer-event of a CView derived class?
Thanks/JoNy
JoNy
|
|
|
|
|
The simulation shall be updated as often as possible.
This leaves only one option: put the simultation-update code into separate worker thread.
The framerate of the viewupdate shall be fixed to around 12/sek.
Isn't it contradictory with previous requirement? I mean, if you're going to display 12 frames per second, why do you need maximum speed in the data-update code?
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Thanks,
no it is not contradictory since I am not interested in sync between physical simulation and the view of it. If the simulation iterates 100 times/sek and the view of it 12 times/sek that means that the action (i.e every tiny little change)occurs faster than what is possible to show. But the thing with physical simulations is that it has to take all those small steps to reach a certain point.
How do I create separate worker threads? Are there any good articles on it?
Thanks again /JoNy
|
|
|
|
|
How do I create separate worker threads?
AfxBeginThread in MFC, _beginthread, _beginthreadex in C/C++ Runtime library. There's also CreateThread if you're playing directly with Win32 API, but it's not recommended if your thread use standard C/C++ functions (they need to be initialized on per-thread basis; CreateThread is a Windows function that doesn't know anything about C/C++ library).
search for these function names, I'm sure MSDN has lot of multithreading samples. Here at CodeProject look at 'Threads, Processes and IPC' section.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
hi, hav'n problems in making 2 processes to communicate with each other .. actually 1 of these invokes the other using CreateProcesss and thne when i try to senda message it is not captured by the other (child) process ..... need guidance or maybe some alternative to achieve this ....
thanks in advance ... :
|
|
|
|
|
Hi !
You can use old things that work quite right, "Memory File Mapping" or "Named pipes", there you open a file in memory and you send that to the other proccess, quite fast and quite good for simple communication.
But... If you want something more complex, you can use COM, and use a Sink interface.
If you need more help, please ask me, Bye !
Braulio
|
|
|
|
|
I want App A to Tell App B to do something.
i.e. I want the 2 processes to communicate. App A and App B are both written by me so I can make modifications ot the code if required. can anyone help.
Maliha
|
|
|
|