本文整理汇总了C++中UserInterface::InitializeDialog方法的典型用法代码示例。如果您正苦于以下问题:C++ UserInterface::InitializeDialog方法的具体用法?C++ UserInterface::InitializeDialog怎么用?C++ UserInterface::InitializeDialog使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserInterface
的用法示例。
在下文中一共展示了UserInterface::InitializeDialog方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: WndProc
//.........这里部分代码省略.........
hwndFperm = CreateWindow(TEXT("button"), TEXT("f/m"),
WS_CHILD | WS_VISIBLE | BS_RADIOBUTTON, 10, 490, 60, 20, hwnd,
(HMENU) FPERM, (HINSTANCE) GetWindowLong (hwnd, GWL_HINSTANCE), NULL);
hwndMpers = CreateWindow(TEXT("button"), TEXT("m/s"),
WS_CHILD | WS_VISIBLE | BS_RADIOBUTTON, 10, 510, 60, 20, hwnd,
(HMENU) MPERS, (HINSTANCE) GetWindowLong (hwnd, GWL_HINSTANCE), NULL);
// Fill combo box with intervals
SendMessage (hwndCombo, CB_ADDSTRING, 0, (LPARAM) "1 Point Interval");
SendMessage (hwndCombo, CB_ADDSTRING, 1, (LPARAM) "3 Point Interval");
SendMessage (hwndCombo, CB_ADDSTRING, 2, (LPARAM) "6 Point Interval");
// Set default radio button
SendMessage (hwndFpers, BM_SETCHECK, 1, 0);
// Set userInterface private member _hwnd to WndProcs hwnd
userInterface.setHwnd (hwnd);
// Set mapControls private member _balloon to balloon
mapControl.setData (&balloon);
// Set windDataReaders private member _balloon to balloon
windDataReader.setBalloon (&balloon);
// Set userInterfaces private member _mapControl to mapControl
userInterface.setMapControl (&mapControl);
// Set up file initialize to common open dialog for .ptm files
mapControl.mapFileInitialize (hwnd);
// Start the Initialize dialog box
userInterface.InitializeDialog (hwnd);
// If the user chose to read in from serial
if (userInterface.getIsSerial())
{
// Populate wind data reader
if ( !userInterface.getWindFrom().empty() )
windDataReader.GenerateWindData(userInterface.getWindFrom());
else
MessageBox (hwnd, "No wind data table.", "Critical Error.", 0);
// Set abstract parser to a new SerialParser
parser = new SerialParser (serial, hwnd);
// Open the com port
if ( !userInterface.getReadingFrom().empty() )
parser->openCom( userInterface.getReadingFrom().c_str() );
else
MessageBox (hwnd, "No COM port selected.", "Critical Error.", 0);
// Attach parser to the observer
parser->attach (&controlState);
}
else
{
// If the user didn't select serial, then they had to select
// from file, so set abstract parser to a FileParser and pass
// the file it is reading from
parser = new FileParser (userInterface.getReadingFrom());
}
// Set parsers private member _balloon to balloon