|
How do I force the redisplay of a dialog box after it was hidden by
another dialog then unhidden ? If my application is idle the system
does this automatically but when my application is actively processing
data including serial IO it will not redisplay until it is idle again.
Can anyone help ?
|
|
|
|
|
The serial I/O code should be placed in a separate thread. This allows the main thread (the one that owns the UI) to remain responsive. By putting the Serial I/O code in the same thread as the UI, painting-related problems are to be expected.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
hi all,
i have a CListCtrl on a dialog box. i want to have the rows of the CListCtrl with variable height which is determined dynamically during program execution. i have used MeasureItem which is called only once to set the row height. also i have used DrawItem to draw the elements in the CListCtrl rows. also the CListCtrl used has three columns. how can i get columns in the CListBox
|
|
|
|
|
maxsteel wrote:
i want to have the rows of the CListCtrl with variable height which is determined dynamically during program execution.
You've found a limitation of list view controls. You might want to try a CListBox instead, which allows items to be of variable height (set the LBS_OWNERDRAWVARIABLE style).
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Hi all,
I always thought that it is possible to create own user rights in Windows XP like the ones you see in the "Local security settings" but I couldn't find anything about it.
Is this just impossible? Or how can it be done?
Thanks for any help,
Jens
|
|
|
|
|
|
How can I remove the caption bar from the frame widnow in an SDI app ?
ff
|
|
|
|
|
Without the WS_SYSMENU and WS_CAPTION styles, I'm not sure it would still be considered an SDI application. The WS_SYSMENU style can easily be removed in the frame's PreCreateWindow() method.
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
cs.style &= ~WS_SYSMENU;
return CFrameWnd::PreCreateWindow(cs);
}
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I have been asked to see if I can use a Java control from within an MFC app. I don't know enough Java to know if this is possible. The control I am trying to hook in is the thinkmap control (http://www.thinkmap.com[^])
Does anyone have any idea of whether this is possible, and if so, how I would go about doing it?
"The way of a fool seems right to him, but a wise man listens to advice" - Proverbs 12:15 (NIV)
|
|
|
|
|
You can port Java code to C++ if that's what you mean.
I think it's called JRI but I'm not sure.
I have no experience myself though.
Hope it helps!
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
Well the first thing is this, no Java can execute without a JVM context for it to execute in. Therefore you are not going to be able to just "use" a Java component in a Win32 application since there is no JVM context. After that there is a multitude of possibilities.
Their web site requires registration to get the White Papers and I don't have any requirements for your application. Therefore I can't make any informed comments on your particular situation.
|
|
|
|
|
Hello all!
I have a problem over which i cannot continue the project. Please, if anybody can, help me.
So, the task is: I have pdf document, i need to convert its colorscheme to the CMYK.
I will very happy with any idea on this point: libraries, algorithms, other apps that could be used from my program (e.g. via command line) etc. Please help, its very important for me.
I hope for the answer, thanks in advance.
|
|
|
|
|
|
Thanks a lot!
But how i can use it? i mean that i need to convert pdf document... Seems that it will be very much problems with pdf format if i use manual conversion of each pdf object.
Enyway thanks, Bikram Singh. Maybe you or somebody else know how to solve my problem with pdf document?
Good luck!
|
|
|
|
|
Well, pass in the RGB values and u get the CMYK values back. I dont know about PDF conversion, but the Adobe site does have the PDF specs i think...check that out
Bikram Singh
|
|
|
|
|
Norton antivirus's corporate version automatically discovers all the clients when installed on the server and THEN AUTOMATICALLY INSTALLS A client version of antivirus on the remote system
How does it do that ?
All the users and their IP address can be found out i guess , but how can it install on the remote machine ?
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
http://www.mastishk.com
|
|
|
|
|
After using the abysmal Sophos antivirus software, which employs a similar technique, I would guess that each machine will have a small client already installed. This client will download any new updates, and install them itself.
|
|
|
|
|
mailMonty wrote:
How does it do that ?
My guess is with RPC.
Remote Task Manager works in a similar fashion. When connecting to a remote machine, if it detects that the remote machine does not have the RTM service installed and running, it will install and start the service, and then connect. It is very seamless.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I've got an mp3/wav player working quite well, but when i use the application to record and then play the file back, the time (length) is wrong. The file saves/plays fine.
mciSendString("open new type waveaudio alias current wait", 0, 0, 0);
mciSendString("set current format tag pcm bitspersample 16 channels 1 samplespersec 44100 wait", 0, 0, 0);
mciSendString("record current from 0 overwrite", 0, 0, 0);
.
.
.
if(m_saveFile.DoModal() == IDOK)
{
CString saveFile = "save current "+ m_saveFile.GetPathName() + " wait";
mciSendString(saveFile, 0, 0, 0);
mciSendString("close current wait", 0, 0, 0);
when i open the file and query the time format it returns "milliseconds", but the time it gives me (querying length) is usually about ten times what it actually is. The application gives the correct length of pre-saved files.....
ring any bells?
|
|
|
|
|
HI ,
I m biulding an application like Video Media player .
I saw many appliction on Codeproject ,, but no one is of mine kind help
I have a slider in it ,, to move the video postion same as in Windows Media Player.
I m Using MCI Api's ....
Slider Control only Gives three Message Handlers
1. CustomDraw (..........)
2, OutofMemory(..............)
3. ReleasedCapture(...)
Which one i Should use..
Or some thing else way
Means i want to click on slider thumb and move it ,, too n froo.
or click on on any where on slider and thumb goes there.
thanx
|
|
|
|
|
use releasedcapture, getpos() of the slider, then play from that position. need to be sure of your current time format in relation to the slider values.
|
|
|
|
|
I m not Capturiong the Slider's THumb.
HAve u any Sample..
plz send at
zahid_ash@yahoo.com
thanx
|
|
|
|
|
this isnt an actual block of code as such, just bits pasted together to illustrate the point....
void CSPlayerDlg::OnReleasedcapturePosSlider(NMHDR* pNMHDR, LRESULT* pResult)
{
nextPos = m_position.GetPos()
mciSendString("play current from 0 notify",0 ,0, this->GetSafeHwnd());
}
you'd want to play from m_position.GetPos(), not from zero, you'll have to format the string appropriately....
you also want to set the slider range to the length of the file your playing.
|
|
|
|
|
|
Hi Friends,
I've Problem exporting a Modal Dialog from a Regular MFC DLL (Shared Library). But on runtime i'm getting error when i call the DoModal on the DLL side. This is happening for both MFC DLL Depended Host Application as well as the Win32 Host Application .
The Code is like this
//on the DLL Side
extern "C" void __declspec(dllexport) TestFunction();
void TestFunction()
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
CMyDialog dlg;
dlg.DoModal();
}
//On the Caller Side
extern "C" void __declspec(dllimport) TestFunction();
void CMyTestApp::OnAppAbout()
{
TestFunction();
}
Please Help Me... !
Kind regards,
Subbi.
|
|
|
|