|
I have a dialog with 2 CTreeCtrl Controls on it.
I wish to drag items from one to the other.
Anyone know how to do it ?
|
|
|
|
|
Hi ...
look in codeguru.com for vinyatadkas.. drag and drop between two treecontrols.
with love
shafeeque o.k
|
|
|
|
|
Hi ...
look in codeguru.com for vinyatadkas.. drag and drop between two treecontrols.
with love
shafeeque o.k
|
|
|
|
|
user stars program and changes keyboard layout (taskbar small icon)
(clicks at icon in toolbar what) runs new thread with dialog
-> this changes selected keyboard back to system one (taskbar small icon)
escapes dialog
-> returns to its keyboard laybout (what else except laybout?)
when he changes layout in dialog thread all is fine
escaping/reopen dialog keeps his settings
for test i tryed to call fix value (i have sk lang and keyboard installed)
bool bul = SetThreadLocale(MAKELCID(MAKELANGID(LANG_SLOVAK, SUBLANG_DEFAULT), SORT_DEFAULT));
before dialog opening (in new thread) but it not helped (makes nothing except returns true)
i found is possible to GetKeyboardLayout in mail thread (HKL)
but (from help) for ActivateKeyboardLayout is necessary (expecialy w9x) call LoadKeyboarLayout before
and its oputut set to ActivateKeyboardLayout
1.
is any back tranformation from HKL to parameters wanted for LoadKeyboarLayout?
2.
why SetThreadLocale "makes nothing"? or for what is good?
what all is necessary to set for new thread to keep main thread lang etc. settings?
more details:
first try
seems working (keyboar icon in taskbar relives)
but under nt4, w2000 only
under w98 ignores
main thread
StData *pData = new (StData);
pData->m_Layout = GetKeyboardLayout(0);
if((hThread = CreateThread(NULL, 0, Thread, (void*)pData, 0, &ThreadID)) == NULL)
ui thread
StData *pData = (StData*) pVoid;
HKL boo = ActivateKeyboardLayout(pData->m_Layout, 0);
AfxMessageBox("!");
second try again not works under w98
main
BOOL boo = GetKeyboardLayoutName(pData->m_LayoutName);
ui
//HKL Layout = GetKeyboardLayout(0);
//UnloadKeyboardLayout(Layout);
HKL hkl = LoadKeyboardLayout(pData->m_LayoutName, 0);
ActivateKeyboardLayout(hkl, 0);
AfxMessageBox("!");
do you see reason?
thanks for reply
t!
|
|
|
|
|
Hi!
I have two question to the experts:
1.Can i incorporate HTMLHelp window in my application? HHCTRL.OCX is not insertable.
2.Can i retrieve contents of chm-file?
Thank you, i am grateful to you for the help.
|
|
|
|
|
Could somebody please give me a simple example of a Mfc app using Threads???
greetz joEp mEloEn
|
|
|
|
|
There are several example programs in the platform SDK that use multiple threads.
Stephen
|
|
|
|
|
Hi
I have an CFrameWnd that i use in an Ext. DLL
The problem is, when is cleans up, i get an error
with the heap. (something with not local heap)
Have any one an solution ?
pFrame->Create(NULL,
_T("Print"),
WS_OVERLAPPEDWINDOW,
CFrameWnd::rectDefault,
AfxGetApp()->m_pMainWnd,
MAKEINTRESOURCE(IDR_PRINTMENU));
// start the modal loop
pFrame->RunModalLoop(MLF_SHOWONIDLE);
pFrame->DestroyWindow();
|
|
|
|
|
I want copy items from the tree view (in application) to a Desktop or explorer,
but i don't know.
I want a sample please.
|
|
|
|
|
I want copy items from the tree view (in application) to a Desktop or explorer,
but i don't know.
I want a sample please.
|
|
|
|
|
I'd appreciate a pointer here, MSDN, VC++6 docs, etc., to where the structure or field definitions are shown for the varios types of strings in the resouce string tables. I'm looking for "this is the title, this is the default extension" type info so I can edit these with the string table resource edititor
|
|
|
|
|
I am using this call to print a bitmap from one picture box to another:
BitBlt(*m_Field.GetDC(), 0, 0, 48, 48, *m_Skin.GetDC(), 0, 0, SRCCOPY);
this works but it doesn't get repainted.. for example when I minimize the dialog or drag another window on top of it.
anyone know how I can make this auto refresh?
|
|
|
|
|
You need to do it in OnPaint, which is called whenever a window needs repainting.
|
|
|
|
|
Thanks but this doesn't work for me. I tried reBlting it in OnPaint() but this didn't make it refresh all of the time.. only when going off the screen and back on.. but not when minimizing and restoring and other situations. I'm sure there has to be a proper way to do this. Any examples or suggestions?
|
|
|
|
|
Greetings. I am interested in thoughts and advice on parallel ports. I have equipment that is controlled thru the LPT1. Under DOS, I used the biosprint function, which is now defunct in C++.
I have tried using CreateFile and WriteFile in MFC, but have found Windows 98 to be very finicky about allowing the user to directly control the port - I can verify that the data has been sent to the port using CreateFile and WriteFile, but my equipment does not respond. Yet, I can go to the DOS prompt on the same machine and use the old functions and the equipment responds immediately. (But to fit in with the rest of the program, I have to do this in Windows 98)
Does anyone have suggestions or experience sending integer data to the LPT1 - or ideas about where I am going wrong?
Thanks in advance.
|
|
|
|
|
Hi,
I want to draw MDI child outside MainFrame..
How can I implement this?
I searched all the MSDN and other sources just to fail..
Any suggestion will be appreciated..
Thanks in advance!!
Regardz
-Ryan
|
|
|
|
|
Hi all,
I have a textbox (Microsoft Forms 2.0 ActiveX control). I want to do something after user press down arrow keys (VK_DOWN). when i used classwizard to add the event on the textbox, here is the function:
void CSubtitlerView::OnKeyDownMytextbox(LPDISPATCH KeyCode, short Shift)
{
// TODO: Add your control notification handler code here
}
I have no idea how to get the key information from KeyCode. Can anyone help me?
|
|
|
|
|
Hello, I have a problem using my .exe on a computer other than mine. Everything works fine on my computer. When the user right clicks to get my popup menu an application error pops up which states "Memory could not be read". I've narrowed the problem down to the line of code where I call TrackPopupMenu. Here is the line:
menu.GetSubMenu(0)->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON | TPM_RETURNCMD, point.x, point.y, this, NULL);
Do I need a dll? Can anyone help? Thank You
|
|
|
|
|
Hi,
I want to write one small scree saver application.
what are the basic interfaces to built screen saver?
Give me sugestion how to proceed this one?
Thanks,
-- Koteswara rao
|
|
|
|
|
|
Helloo..
I have to write an application that stay listening on the input line of a sound card (like Microphone) and when receive something starts to register it in a file on disk.
There are any ActiveX that already do this? If not, how can I access the status of the input line of a sound card?
Thanks to all You........
|
|
|
|
|
Hello Norbert:
There are a couple of ActiveX controls that could do this.
Visual C++ comes with a registered multi-media control - you can get info on it by looking under your registered ActiveX controls and clicking on MS Communications Control.
If you need more flexibility and ActiveX controls that easily fit into dialog boxes, you might try TegoSoft. You can look over their ActiveX controls at www.tegosoft.com
If you are looking for some very simple classes that you can include in your project to set levels automatically, I can point you in some directions. Email me at:
<myles_k@email.com>
Regards,
Myles
|
|
|
|
|
I'd like to send e-mails in HTML format with MAPI if possible. I'd appreciate any pointers on this/example code.
Thanks,
Mark.
|
|
|
|
|
Hi All,
I am working on a telecom project.
I am facing CPU 100% problem.
Can any one tell me different reasons for a system CPU to reach 100%. I am reading a telephon number from a text file after that dialing the same number. After successfully done I am deleting the text file and updating the counter in DataBase (SQL). All these operations are done within a thread. The Application is a multithreaded application. I am not able to trace why the system CPU is reaching 100%.
OS is Windows NT.
Waiting for your suggestion(s).
Thanks in Advance.
Kumar.
|
|
|
|
|
In multithreaded programming, you must be careful not to monopolize the CPU. The OS of course looks after scheduling, but it's up to you to let the OS know that you don't need every available timeslice for your loop.
A simple thing to do is to Sleep() your thread for a reasonable period of time between checks to see if it has work to do.
As a simple test, try putting Sleep(500) somewhere inside your loop and see what kind of effect it has on your CPU usage. You likely should architect a more elegant solution than a simple Sleep() call, one that better matches your program logic, but this should get you started.
You should also check out WaitForSingleObject() and its cohorts, it may make sense for your app.
|
|
|
|