|
Can you try to rename the two.c file to two.cpp. The problem can be caused by modes in which the compiler assigns names to exported symbols based on file extension.
Alternatively, if this is an Visual Studio project, select the two.c file in the Solution Explorer, right-click, select Properties, go to C/C++ -> Advance Options -> Compile As and specify "Compile as C++ Code" option.
|
|
|
|
|
what sequence of events is done in the main window when AddString method of listbox is called? mean does the entire main window refresh? or main window wil again call initialize method?
I need to know this because I am trying to manipulate the data in listbox by thread created by mainwindow
-- modified at 5:37 Monday 5th June, 2006
|
|
|
|
|
From where are you starting the thread for add strings?
- NS -
|
|
|
|
|
i am creating a worker thread inside a button_click event and in that worker thread i am calling AddString.
|
|
|
|
|
Can you give more details of your problem? I did not get it exactly...
- NS -
|
|
|
|
|
I have three list boxes that i need to update(write strings to) on the completion of a loop execution.
the problem is that i need to write to the list boxes in a worker thread
as the values to be written are calculated there.
Also the problem is i have other threads runnin that interface with the parallel port(this is inside a DLL). using AddString in the main MFC thread affects the execution of the hardware interfacing thread for some reason.
Now while writing to the list boxes using AddString my other thread does not write to the parallel port???? is there any reason why this is happening...
|
|
|
|
|
Try to give some free time to other threads also...
Write a Sleep( 1 ) in the loop that fills the listbox. And let me know the status.
- NS -
|
|
|
|
|
no no the listbox is updated outside the loop just after the loop finishes execution..
and we need to fill only one value in each list box in every thread.
|
|
|
|
|
OK... then I suspect it is a heavy calculation. You can try the sleep there.
- NS -
|
|
|
|
|
Sharath86 wrote: ...I am trying to manipulate the data in listbox by thread created by mainwindow
Why? This is a recipe for disaster. A thread should not interact with a GUI component that it does not own. Have it post a message to the owning thread instead.
"The largest fire starts but with the smallest spark." - David Crow
|
|
|
|
|
Hi alls,
I have short interest of C++/CLI.
Is there somebody who use it in a industrial(comercial) project?
And why we can't use C++/CLI in smart device developpement ?
|
|
|
|
|
Can anybody please give link/site/examples for biginers to learn ADO (Database Programming)
Thank You
-- modified at 5:17 Monday 5th June, 2006
|
|
|
|
|
|
i have a GIF image i need to extract its R G B values from the color Palette and combine them to a one hexidecimal value .how can i convert the 3 colors of each pixel to one hexidecimal value?
|
|
|
|
|
I think you already have the value as COLORREF. Then you just want it print it in hexadecimal, right?
- NS -
|
|
|
|
|
no i have 3 values one for the R value (for e.g 128) , one for the G value and one for the B value i need to combine the three values to form a hexidecimal value for the color as whole in c# language
|
|
|
|
|
|
Try this:
COLORREF colour = RGB(r, g, b);
where r , g and b are three colour components.
For printing in hexadecimal mode:
printf("%06X", (DWORD)colour);
For obtaining red, green and blue components back, use GetRValue , GetGValue and GetBValue .
|
|
|
|
|
CString str;
str.Format("%02X, %02X, %02X", rVal, gVal, bVal);
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
nailahazem wrote: how can i convert the 3 colors of each pixel to one hexidecimal value?
is RGB macro of any use! since COLORREF is defined as DWORD!
"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
Support CRY- Child Relief and You
|
|
|
|
|
Hi All,
I would like to write an application which should receive a message when the current active window loses focus. For example, consider MS-Word is active now. As soon as somebody opens IE then word window will lose its focus. At this event my application should get a message. And after sometime when this IE gets minimized I should get another message. Basically my application should be able to receive messages when different window events happen.
Is this possible? Can somebody give me some information?
Thanks,
Sandeep
|
|
|
|
|
Think about hook...
- NS -
|
|
|
|
|
Hi NS,
Thanks for the info...could you guide me to some good documentation on hooks?
Thanks,
Sandeep
|
|
|
|
|
|