I am rewriting an old application in VS2010 that was developed in vc++6.0. I am trying to keep the basic structure of the GUI the same which consists of a main Dialog in which I have multiple child dialogs. All the child dialogs except one are simple with no border, title bar or system menu. This works fine in VC++6.0, but on VS2010, none of the controls that I have in those child dialogs show up when I run the program.
Am I missing something simple here that I am not aware of?
Its a MFC dialog based application. Main dialog is created when the application is created using "New Project" wizard and the child dialog is created by inserting a "Insert Dialog" in resource view and then adding dialog controls to it.
A tooltip should be a top level window to ensure that it is visible. It is only shown when requested by the user and closed when clicking anywhere with the mouse. So it does not interfere with other GUI elements. If you have a working solution I would stay with that.
I really do not know where to post this and I hope I can explain my question , so be gentle.
I am using SAM3x8e hardware timer (TC3) as an interrupt.
The “TC3_Handler” (callback?) global function name is “hardcoded” somewhere and fires as expected at desired intervals.
I do some verification of this by outputting simple message to LCD.
The LCD “class” is declared / instantiated as a global class to the entire application and works amicably.
Simple “lcd.print(“OK”)” is executed just fine in the TC3 handler.
I also do some hardware output – turn on / off LED – just for an additional indication the handler is being executed.
Now I want to execute a method / function of ANOTHER globally defined / instantiated class, again in same TC3 handler.
Adding cpal.Run(); did not compile – undefined “cpal”.
I had to ADD extern CPAL cpal; so it would compile and execute cpal.Run();
My question is
both LCD and CPAL classes are global, the LCD can be used OK, but the CPAL has to have the extern “reference” added into the TC3 handler. Why?
Thanks for reading, appreciate any help.
makes perfect sense.
I am not sure I'll spent time to actually look for such declaration, but I need to learn more about hardware interrupts so maybe I'll run into it sooner or later.
You know, it's one thing to obfuscate, it's another to code in such a style as approaching enemy action. It's hard enough to write clear code. The style of code I posted just seems easy to break and difficult to debug. The debugger is going to treat that like one line of code.
Caveat: I freely admit that I choose to restrict how much code I put on a line. I like using ternary or conditional operator as it can make things much cleaner, as long as you don't get silly with it.
<italic>Stuck in a dysfunctional matrix from which I must escape...
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759